Spring Gateway(2.x, 3.x, 4.x) Filter Enhancement in Java agent 9.4(release in 2025Q1) #12860
wu-sheng
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summarized by @yqw570994511
This is a new thing started from #12839 and PR lands via apache/skywalking-java#736. It enhances the Spring Gateway plugins for GW 2.x, 3.x and 4.x with enhanced context.
Previously, we rely on Fetch APIs in Webflux Tracing Assistant APIs to obtain relative IDs and print out, but it provides inconsistent format in the logs. The official Trace ID/Context placeholder only prints
N/A
.With the apache/skywalking-java#736 and released in 9.4, all filters that implement the GlobalFilter and GatewayFilter interfaces can output the logs automatically, meaning without manual codes requirement. And the trace/context IDs are injected into log placeholder.
TraceContext.traceId();
and TraceContext.spanId();` for better readings, the log screenshot indicates the consistent outputs.The logs and manual APIs output are consistent
But there is still an exceptional case that users still need manual APIs, when they use
chain.filter(exchange).then(...)
as followingBeta Was this translation helpful? Give feedback.
All reactions