Skip to content

Commit

Permalink
feat: update otel create new provider
Browse files Browse the repository at this point in the history
  • Loading branch information
arturmon committed Oct 24, 2024
1 parent 8900cbf commit 9697f1e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app/services/otel/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,9 @@ func InitializeTracer(ctx context.Context, cfg *model.Config, logger *logs.Logge

func initProvider(ctx context.Context, config ProviderConfig) (*Provider, error) {
if config.Disabled {
return &Provider{provider: trace.NewNoopTracerProvider(), logger: config.Logger, Disabled: true}, nil //nolint:staticcheck // SA1019 NewNoopTracerProvider() is deprecated
return &Provider{provider: sdktrace.NewTracerProvider(), logger: config.Logger, Disabled: true}, nil
}
/*
if config.Disabled {
return &Provider{provider: sdktrace.NewTracerProvider(), logger: config.Logger, disabled: true}, nil
}

*/
tp, tpErr := jaegerTraceProvider(ctx, config)
if tpErr != nil {
config.Logger.Fatal(tpErr.Error())
Expand Down

0 comments on commit 9697f1e

Please sign in to comment.