wy471x opened a new issue, #7615: URL: https://github.com/apache/shenyu/issues/7615
Part of #7566. ## Scope - New `shenyu-plugin-tracing` module plus the `shenyu-spring-boot-starter-plugin-tracing` starter, disabled by default (`shenyu.tracing.enabled=false`). - Extract the W3C Trace Context (`traceparent` / `tracestate`) and baggage from inbound requests, and start a new trace when the request carries no valid context. - Create a ShenYu server span which wraps the remaining plugin chain, and end it once the reactive request completes, fails or is cancelled. - Expose the trace id through the existing `shenyu-agent-trace-id` exchange attribute so the logging plugins correlate the access log without duplicating tracing logic. - Carry the trace context across Reactor thread switches through the Reactor context and the exchange attributes instead of a thread local. - The plugin module depends on the OpenTelemetry API only, the SDK is owned by the starter. ## Tests - `TracingPluginTest`: inbound trace continued, new trace without a context or with a malformed one, span ends on success / error / cancellation, one span per subscription, no span when the chain fails while it is assembled, a no-op tracer keeps forwarding. - `TraceContextExtractorTest`: valid, not sampled and reserved trace flags, malformed contexts, repeated `traceparent` rejected, repeated `tracestate` and baggage combined. - `TracingPluginConfigurationTest`: disabled by default and by an explicit `false`, enabled wiring, service name from configuration, existing OpenTelemetry beans do not break the wiring. ## Acceptance criteria AC1, AC2, AC6 (partial), AC7. AC3, AC4 (full), AC5, AC8, AC9 and AC10 belong to the follow-up tasks. Status: implemented and verified locally, pull request pending. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
