Damien Mathieu
Damien Mathieu
Note that `errors.Join` does check if the error is nil, and skips adding those into the internal slice. https://github.com/golang/go/blob/a9922d096f0de877fba68739b35367d4c25f6ecb/src/errors/join.go#L33-L35 So I'm not sure we do need to check that errors...
Yes, `errors.Join` will keep nesting new structs for each call of `errors.Join()`. I think Go could possibly still optimize that by detecting that the first error is an `*joinError`, and...
`.alpha` is kinda unique (should there be `.alpha2`, `.alpha.2`?) Also, the [semantic versioning spec](https://semver.org/#semantic-versioning-specification-semver) says: > Major version zero (0.y.z) is for initial development. Anything MAY change at any time....
Your request is rather unclear. You can retrieve the current span and add attributes to it at any moment. ```golang span := trace.SpanFromContext(req.Context()) span.SetAttributes(attribute.Bool("isTrue", true), attribute.String("stringAttr", "hi!")) ``` So all...
If you're talking about the span for an outgoing HTTP call, it's even easier. You can use the [WithSpanOptions](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#WithSpanOptions) option to do just that. ```golang client := http.Client{ Transport: otelhttp.NewTransport(...
A custom HTTP transport would allow you to hook into the middle of the request, and modify the span.
I still fail to see how this would be better than a custom middleware. If we do this for attributes, we should do it for every span method (`AddEvent`, `AddLink`,...
See also https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6092 (which is still a draft).
Could we follow the same pattern as we're doing for otelhttp? https://github.com/open-telemetry/opentelemetry-go-contrib/pull/5876/files
I don't know if we should make metrics so permissive. By their nature, metrics must be low cardinality. Your request looks like a good way to blow them up with...