Skip to content

Commit

Permalink
Merge pull request #377 from ww24/use-zipkin-propagator
Browse files Browse the repository at this point in the history
fix: use Zipkin B3 propagator
  • Loading branch information
ww24 authored Oct 25, 2022
2 parents feff0bc + 6053ddb commit 8526bce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ require (
github.com/tenntenn/testtime v0.2.2
go.opencensus.io v0.23.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4
go.opentelemetry.io/contrib/propagators/b3 v1.11.1
go.opentelemetry.io/otel v1.11.1
go.opentelemetry.io/otel/bridge/opencensus v0.33.0
go.opentelemetry.io/otel/sdk v1.11.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 h1:aUEBEdCa6iamGzg6fuYxDA8ThxvOG240mAvWDU+XLio=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4/go.mod h1:l2MdsbKTocpPS5nQZscqTR9jd8u96VYZdcpF8Sye7mA=
go.opentelemetry.io/contrib/propagators/b3 v1.11.1 h1:icQ6ttRV+r/2fnU46BIo/g/mPu6Rs5Ug8Rtohe3KqzI=
go.opentelemetry.io/contrib/propagators/b3 v1.11.1/go.mod h1:ECIveyMXgnl4gorxFcA7RYjJY/Ql9n20ubhbfDc3QfA=
go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4=
go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE=
go.opentelemetry.io/otel/bridge/opencensus v0.33.0 h1:DnSFYr/VxUVwkHL0UoaMcxx74Jugb1HO0B08cYBmi0c=
Expand Down
6 changes: 4 additions & 2 deletions tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/GoogleCloudPlatform/opentelemetry-operations-go/propagator"
octrace "go.opencensus.io/trace"
"go.opentelemetry.io/contrib/propagators/b3"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/bridge/opencensus"
"go.opentelemetry.io/otel/propagation"
Expand Down Expand Up @@ -63,9 +64,10 @@ func New(c *Config, conf repository.Config, exporter sdktrace.SpanExporter) (tra

otel.SetTextMapPropagator(
propagation.NewCompositeTextMapPropagator(
// propagation.TraceContext{},
// propagation.Baggage{},
propagator.CloudTraceOneWayPropagator{},
propagation.TraceContext{},
propagation.Baggage{},
b3.New(),
),
)

Expand Down

0 comments on commit 8526bce

Please sign in to comment.