File tree 3 files changed +20
-5
lines changed
3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import (
4
4
"net/http"
5
5
6
6
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
7
- "go.opentelemetry.io/otel/propagation "
7
+ "go.opentelemetry.io/contrib/propagators/autoprop "
8
8
)
9
9
10
- var Propagators = propagation . NewCompositeTextMapPropagator (
11
- propagation. TraceContext {} ,
12
- propagation. Baggage {},
13
- )
10
+ // Propagators uses autprop.NewTextMapPropagator, which automatically sets
11
+ // the correct propagators from OTEL_PROPAGATORS according to the spec. By default ,
12
+ // Trace Context and Baggage are used.
13
+ var Propagators = autoprop . NewTextMapPropagator ( )
14
14
15
15
var DefaultClient = & http.Client {
16
16
Transport : otelhttp .NewTransport (
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ require (
16
16
github.com/prometheus/client_golang v1.14.0
17
17
github.com/stretchr/testify v1.8.2
18
18
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0
19
+ go.opentelemetry.io/contrib/propagators/autoprop v0.40.0
19
20
go.opentelemetry.io/otel v1.14.0
20
21
go.opentelemetry.io/otel/sdk v1.14.0
21
22
)
@@ -129,6 +130,10 @@ require (
129
130
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect
130
131
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
131
132
go.opencensus.io v0.24.0 // indirect
133
+ go.opentelemetry.io/contrib/propagators/aws v1.15.0 // indirect
134
+ go.opentelemetry.io/contrib/propagators/b3 v1.15.0 // indirect
135
+ go.opentelemetry.io/contrib/propagators/jaeger v1.15.0 // indirect
136
+ go.opentelemetry.io/contrib/propagators/ot v1.15.0 // indirect
132
137
go.opentelemetry.io/otel/metric v0.37.0 // indirect
133
138
go.opentelemetry.io/otel/trace v1.14.0 // indirect
134
139
go.uber.org/atomic v1.10.0 // indirect
Original file line number Diff line number Diff line change @@ -648,6 +648,16 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
648
648
go.opencensus.io v0.24.0 /go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo =
649
649
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 h1:lE9EJyw3/JhrjWH/hEy9FptnalDQgj7vpbgC2KCCCxE =
650
650
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 /go.mod h1:pcQ3MM3SWvrA71U4GDqv9UFDJ3HQsW7y5ZO3tDTlUdI =
651
+ go.opentelemetry.io/contrib/propagators/autoprop v0.40.0 h1:Lj33jj7eIrBfIShiK8NU91u2BglKnUS1UUxVemuQJtw =
652
+ go.opentelemetry.io/contrib/propagators/autoprop v0.40.0 /go.mod h1:6QO816FeZ+6zahs6hYqbUCCsnNBm7o+t4iwVySpzcdI =
653
+ go.opentelemetry.io/contrib/propagators/aws v1.15.0 h1:FLe+bRTMAhEALItDQt1U2S/rdq8/rGGJTJpOpCDvMu0 =
654
+ go.opentelemetry.io/contrib/propagators/aws v1.15.0 /go.mod h1:Z/nqdjqKjErrS3gYoEMZt8//dt8VZbqalD0V+7vh7lM =
655
+ go.opentelemetry.io/contrib/propagators/b3 v1.15.0 h1:bMaonPyFcAvZ4EVzkUNkfnUHP5Zi63CIDlA3dRsEg8Q =
656
+ go.opentelemetry.io/contrib/propagators/b3 v1.15.0 /go.mod h1:VjU0g2v6HSQ+NwfifambSLAeBgevjIcqmceaKWEzl0c =
657
+ go.opentelemetry.io/contrib/propagators/jaeger v1.15.0 h1:xdJjwy5t/8I+TZehMMQ+r2h50HREihH2oMUhimQ+jug =
658
+ go.opentelemetry.io/contrib/propagators/jaeger v1.15.0 /go.mod h1:tU0nwW4QTvKceNUP60/PQm0FI8zDSwey7gIFt3RR/yw =
659
+ go.opentelemetry.io/contrib/propagators/ot v1.15.0 h1:iBNejawWy7wWZ5msuZDNcMjBy14Wc0v3gCAXukGHN/Q =
660
+ go.opentelemetry.io/contrib/propagators/ot v1.15.0 /go.mod h1:0P7QQ+MHt6SXR1ATaMpewSiWlp8NbKErNLKcaU4EEKI =
651
661
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM =
652
662
go.opentelemetry.io/otel v1.14.0 /go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU =
653
663
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs =
You can’t perform that action at this time.
0 commit comments