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
{{ message }}
Repository navigation
TraceContext.getCorrelation() cannot obtain the value #13385
bugSomething isn't working and you are sure it's a bug!javaJava agent relatedpluginPlugin for agent or collector. Be used to extend the capabilities of default implementor.
I had searched in the issues and found no similar issues.
Apache SkyWalking Component
Java Agent (apache/skywalking-java)
What happened
In Gateway, the filters use TraceContext.putCorrelation to place custom IDs.
Stringcustom_request_id = request.getHeaders().getFirst("custom_request_id");
if (StringUtil.isNotEmpty(custom_request_id)) {
TraceContext.putCorrelation("custom_request_id", custom_request_id);
}
In the subsequent user services, the custom ID cannot be obtained.
Optional<String> op = TraceContext.getCorrelation("custom_request_id");
What you expected to happen
I think it's because of Gateway's webflux. Because for regular services, such as when the user service calls TraceContext.putCorrelation, and then through Feign calls the order service, the order service can obtain it.
How to reproduce
springboot:2.3.12.RELEASE
gateway:2.2.9.RELEASE
skywalking-java-agent:9.3.0
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
bugSomething isn't working and you are sure it's a bug!javaJava agent relatedpluginPlugin for agent or collector. Be used to extend the capabilities of default implementor.
Activity
wu-sheng commentedon Jul 28, 2025
If this gets lost, I think the trace should be broken too. It could be caused by Feign or some framework?