Damien Mathieu
Damien Mathieu
That seems like a good idea.
I'm not sure extracting the entire baggage into the span is the correct generic behavior. It seems it would be better to have a custom middleware on your end which...
Spans are only immutable once ended. They can be extended with new attributes and events at any moment, until End() has been called.
You will need to sign the CLA. And this will need a test.
otelhttp has a [WithSpanOptions](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/net/http/otelhttp/config.go#L138) which allows doing that.
You're making outgoing requests with the default net/http client. https://github.com/Connect2naga/Examples/blob/main/Standalone/book/main.go#L102 You need to use the otelhttp one (or at least its transport), or outgoing HTTP requests won't include the trace...
We require a specific involvement for new instrumentations in this repository. See https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/README.md#new-instrumentation Why should this new instrumentation have to be in this repository, and why can't it be located...
I think simpler, and [testable examples](https://go.dev/blog/examples) would be better than this. What we need is a code sample, not a full-blown runnable app.
> Not sure how to do this and actually add examples for the NewMiddlware function. If I add this into the root of the otelhttp module it'll add a bunch...
Related, for mongo: https://github.com/open-telemetry/opentelemetry-go-contrib/pull/3662 I wonder if it wouldn't be good to start an otep on this, so every SDK can use similar approaches.