otelgin uses non-standard error field to transport error information #5252
Labels
area: instrumentation
Related to an instrumentation package
bug
Something isn't working
instrumentation: otelgin
Description
otelgin uses a span attribute
gin.errors
to transport information about errors attached to the handlers/middleware. This isopentelemetry-go-contrib/instrumentation/github.com/gin-gonic/gin/otelgin/gintrace.go
Lines 86 to 93 in a111e3e
Expected behavior
I expect otelgin to either:
error
according to spec. This is debatable, because we don't know whether these attached errors are the cause of the returned status code.Option 2. seems a preferable option to me. As this would be leveraging standard tracing fields to transport the information. Previously, there would be one error field and with this change this would be split across multiple attributes that will then permit searching/filtering/grouping in o11y solutions.
I would be happy to contribute option 2.
The text was updated successfully, but these errors were encountered: