Open pepea23 opened 2 weeks ago
problem locating the hasRequestContext
function return False
:
https://github.com/gin-gonic/gin/blob/9c081de9cdd1948f521d47d170d18cbc2981c33a/context.go#L1240
It seems that the problem is caused by the ContextWithFallback
field, but I am not sure what this field does.
when implementing use otel tracing like this![image](https://github.com/gin-gonic/gin/assets/32633442/dc232282-87a1-4c3b-aaf3-2e2e69d2cf2b)
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![image](https://github.com/gin-gonic/gin/assets/32633442/b1f7d421-5609-4918-905e-09ecc54bd45c)
Environment