summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChris Reeves <hey@krak3n.io>2023-03-09 16:02:35 +0000
committerGitHub <noreply@github.com>2023-03-09 09:02:35 -0700
commitb420561737e4589affbfe08c0acf7dcb593381d0 (patch)
tree0520ab671dfe17e3a6d4e19b1947c50fd8669e90 /modules
parentc05e3898b924c3434ee17e9e50cde2bc498e9f88 (diff)
tracing: Support autoprop from OTEL_PROPAGATORS (#5147)
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/tracing/tracer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/tracing/tracer.go b/modules/caddyhttp/tracing/tracer.go
index d113a56..cb72743 100644
--- a/modules/caddyhttp/tracing/tracer.go
+++ b/modules/caddyhttp/tracing/tracer.go
@@ -6,9 +6,9 @@ import (
"net/http"
"github.com/caddyserver/caddy/v2"
-
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+ "go.opentelemetry.io/contrib/propagators/autoprop"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
@@ -62,7 +62,7 @@ func newOpenTelemetryWrapper(
return ot, fmt.Errorf("creating trace exporter error: %w", err)
}
- ot.propagators = propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})
+ ot.propagators = autoprop.NewTextMapPropagator()
tracerProvider := globalTracerProvider.getTracerProvider(
sdktrace.WithBatcher(traceExporter),