Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Prometheus metrics has to be registered after all services are added
Browse files Browse the repository at this point in the history
Enabling server histograms should be done before registering metrics.

Bumping tag cache size since 10K seems pretty low.
  • Loading branch information
niksajakovljevic committed Aug 1, 2022
1 parent 6e0be57 commit 4e8054e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/pgmodel/ingestor/trace/cache.go
Expand Up @@ -6,7 +6,7 @@ const (
urlCacheSize = 10000
operationCacheSize = 10000
instLibCacheSize = 10000
tagCacheSize = 10000
tagCacheSize = 100000
)

func newSchemaCache() *clockcache.Cache {
Expand Down
9 changes: 5 additions & 4 deletions pkg/runner/runner.go
Expand Up @@ -224,10 +224,6 @@ func Run(cfg *Config) error {
}
grpcServer := grpc.NewServer(options...)
ptraceotlp.RegisterServer(grpcServer, api.NewTraceServer(client))
grpc_prometheus.Register(grpcServer)
grpc_prometheus.EnableHandlingTimeHistogram(
grpc_prometheus.WithHistogramBuckets([]float64{0.001, 0.01, 0.1, 0.3, 0.6, 1, 3, 6, 9, 20, 30, 60, 90, 120}),
)

queryPlugin := shared.StorageGRPCPlugin{
Impl: jaegerQuery,
Expand All @@ -237,6 +233,11 @@ func Run(cfg *Config) error {
return err
}

grpc_prometheus.EnableHandlingTimeHistogram(
grpc_prometheus.WithHistogramBuckets([]float64{0.001, 0.01, 0.1, 0.3, 0.6, 1, 3, 6, 9, 20, 30, 60, 90, 120}),
)
grpc_prometheus.Register(grpcServer)

group.Add(
func() error {
listener, err := net.Listen("tcp", cfg.OTLPGRPCListenAddr)
Expand Down

0 comments on commit 4e8054e

Please sign in to comment.