You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the other hand the gin behavior has changed in 1.8.0 so that the Context.Deadline() Context.Done() Context.Err() fallback to Context.Request.Context() if they exist so maybe it would make sense to inject the tracing data also to the gin context.
The big problem is that gin context is also a context and i cannot prevent the programmers to pass gin context instead of context to downstream functions and this will cause breaking trace data.
More specifically we can rely on gin 1.8.1 and then write the following code:
if c.engine.ContextWithFallback && c.Request != nil || c.Request.Context() != nil {
// inject span into c
}
The text was updated successfully, but these errors were encountered:
In the current implementation the tracing data is injected into the request context and the gin context is unchanged: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/github.com/gin-gonic/gin/otelgin/gintrace.go#L77
As outlined in #322 this is the wanted behavior.
On the other hand the gin behavior has changed in 1.8.0 so that the Context.Deadline() Context.Done() Context.Err() fallback to Context.Request.Context() if they exist so maybe it would make sense to inject the tracing data also to the gin context.
The big problem is that gin context is also a context and i cannot prevent the programmers to pass gin context instead of context to downstream functions and this will cause breaking trace data.
More specifically we can rely on gin 1.8.1 and then write the following code:
The text was updated successfully, but these errors were encountered: