Skip to content

Commit

Permalink
fix: load telemetry for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifosmin Simon committed Sep 12, 2024
1 parent 212cf5c commit 97c2816
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ func RunServer(config *Config) error {

grpcServer := grpc.NewServer(
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
otelgrpc.StreamServerInterceptor(),
grpc_logrus.StreamServerInterceptor(logrusEntry),
otelgrpc.StreamServerInterceptor(),
)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
authInterceptor,
grpc_logrus.UnaryServerInterceptor(logrusEntry),
enrichLogrusFields(),
otelgrpc.UnaryServerInterceptor(),
nrgrpc.UnaryServerInterceptor(nrApp),
authInterceptor,
enrichLogrusFields(),
grpc_recovery.UnaryServerInterceptor(
grpc_recovery.WithRecoveryHandler(func(p interface{}) (err error) {
logger.Error(context.Background(), string(debug.Stack()))
Expand Down
2 changes: 1 addition & 1 deletion pkg/opentelemetry/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func initGlobalTracer(ctx context.Context, res *resource.Resource, cfg Config) (
tracerProvider := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithResource(res),
sdktrace.WithSpanProcessor(sdktrace.NewBatchSpanProcessor(exporter)),
sdktrace.WithBatcher(exporter),
)

otel.SetTracerProvider(tracerProvider)
Expand Down

0 comments on commit 97c2816

Please sign in to comment.