-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gin context with tracing not work #3993
Comments
problem locating the Line 1240 in 9c081de
It seems that the problem is caused by the Solution:
|
router.POST("/v4/*xxxx", gatewayPostHandler, WithTracer()) replace by router.POST("/v4/*xxxx", WithTracer(), gatewayPostHandler) can it work ? |
Faced a similar issue too.. Using tracing middleware instead of a handlers chain will help you |
This issue is same with #4074 Add example in gin-gonic/examples#171, hope this helps for you @mgerasimchuk @pepea23 @JimChenWYU |
Do I need to open a new issue to track this? @appleboy |
@FarmerChillax Yes. Please open the new issue. |
when implementing use otel tracing like this
and apply to router like "router.POST("/v4/*xxxx", gatewayPostHandler, WithTracer())"
then tried to get a trace I found that gin context does not save trace id and span id it empty so how to reproduce the problem?
handler function
trace_id and span_id is empty
GetTraceIds function
Environment
The text was updated successfully, but these errors were encountered: