Skip to content

Commit

Permalink
fix lint (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly authored Mar 22, 2024
1 parent 20dd87a commit fe56324
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fortio_with_otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ func installExportPipeline(ctx context.Context) (func(context.Context) error, er
otel.SetTracerProvider(tracerProvider)
// Needed to get headers, either b3 or traceparent
var propagator propagation.TextMapPropagator
if *b3SingleFlag {
switch {
case *b3SingleFlag:
propagator = b3.New(b3.WithInjectEncoding(b3.B3SingleHeader))
} else if *b3MultiFlag {
case *b3MultiFlag:
propagator = b3.New(b3.WithInjectEncoding(b3.B3MultipleHeader))
} else {
default:
propagator = propagation.NewCompositeTextMapPropagator( /*propagation.Baggage{},*/ propagation.TraceContext{})
}
otel.SetTextMapPropagator(propagator) // key for getting headers
Expand Down

0 comments on commit fe56324

Please sign in to comment.