-
Update: I think this has to do with the After upgrading to v1.74.6, some code that was setting tags started panicking. Before drilling down further, I wanted to ask here just in case this rings any bell. The code that set the tags was like this: import (
trace "gopkg.in/DataDog/dd-trace-go.v1/contrib/net/http"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace"
)
func foo() {
tagger := func(cfg *ddtrace.StartSpanConfig) {
cfg.Tags["x"] = "foo"
}
rt.base = trace.WrapRoundTripper(
rt.base,
trace.RTWithServiceName("xxx"),
trace.RTWithResourceNamer(xxx),
trace.RTWithSpanOptions(tagger),
)
} After the upgrade, this code started panicking with:
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @agis Thanks for the report. I checked the code to understand what could be causing this and this is indeed a bug. As In pure I wrote a fix in #3956 |
Beta Was this translation helpful? Give feedback.
Hi @agis
Thanks for the report. I checked the code to understand what could be causing this and this is indeed a bug.
As
v1.74.x
are transitional releases (v1 with v2 under the hood) we are transforming the options passed toRTWithSpanOptions
intov2
StartSpanOption
.In pure
v1
orv2
thecfg *StartSpanConfig
param of aStartSpanOption
func has already been tagged when the options funcs ofRTWithSpanOptions
are called but that is not the case for thev1.74.x
, it's an emptyStartSpanConfig
used only for executing the options and then backfilled into thev2 StartSpanConfig
.I wrote a fix in #3956