improve grpc lifecycle

This commit is contained in:
2025-03-07 17:04:46 -05:00
parent c5da5f7887
commit e178956eef
3 changed files with 30 additions and 5 deletions

View File

@ -44,7 +44,7 @@ func Init(ctx context.Context) (context.Context, func(context.Context) error) {
cfg := config.MustFromCtx(ctx)
// Nothing to do here if not enabled
if !cfg.OTEL.Enabled {
if !cfg.OTELEnabled() {
opentelemetry.SetMeterProvider(noopMetric.NewMeterProvider())
opentelemetry.SetTracerProvider(noop.NewTracerProvider())
// Won't function with noop providers