helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.44k stars 562 forks source link

Harden WebClientSecurity against absent or disabled tracing #8809

Closed tjquinno closed 1 month ago

tjquinno commented 1 month ago

Description

Resolves #8800

If tracing as a whole is disabled, or if tracing on certain paths is disabled, then the tracer or the parent span context will be absent from the request context delivered to the web client security code.

This PR adds null checks in key spots for the tracer and parent span context.

Documentation

Bug fix; no doc impact.