Skip to content

Commit

Permalink
Disables Datadog internal tag propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbayar committed Feb 24, 2022
1 parent 226f6a6 commit b81fbe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ddtrace/tracer/textmap.go
Expand Up @@ -25,6 +25,7 @@ type HTTPHeadersCarrier http.Header

var _ TextMapWriter = (*HTTPHeadersCarrier)(nil)
var _ TextMapReader = (*HTTPHeadersCarrier)(nil)
var horizontalPropagation = false

// Set implements TextMapWriter.
func (c HTTPHeadersCarrier) Set(key, val string) {
Expand Down Expand Up @@ -256,8 +257,8 @@ func (p *propagator) injectTextMap(spanCtx ddtrace.SpanContext, writer TextMapWr
writer.Set(p.cfg.BaggagePrefix+k, v)
}
// propagate trace tags
var sb strings.Builder
if ctx.trace != nil {
if horizontalPropagation && ctx.trace != nil {
var sb strings.Builder
ctx.trace.mu.RLock()
for k, v := range ctx.trace.tags {
if !strings.HasPrefix(k, "_dd.p.") {
Expand Down
1 change: 1 addition & 0 deletions ddtrace/tracer/tracer_test.go
Expand Up @@ -61,6 +61,7 @@ func TestMain(m *testing.M) {
timeMultiplicator = time.Duration(2)
}
_, integration = os.LookupEnv("INTEGRATION")
horizontalPropagation = true
os.Exit(m.Run())
}

Expand Down

0 comments on commit b81fbe9

Please sign in to comment.