Skip to content

Set WebClient Observation as current in reactor context #29891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bclozel opened this issue Jan 27, 2023 · 0 comments
Closed

Set WebClient Observation as current in reactor context #29891

bclozel opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing type: bug A general bug
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Jan 27, 2023

In DefaultWebClient, the Observation instrumentation creates a new observation and uses the current observation in the reactor context as the parent. This is useful for recording metrics and sending tracing information over the wire.

The current implementation wrongly assumes that there is no other instrumentation in the chain; Reactor Netty HttpClientis itself instrumented and looks into the reactor context for a parent observation but won't find the observation we have created.

DefaultWebClient should set the newly created client observation as the current observation in the reactor context by using contextWrite for downstream operators.

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug theme: observability An issue related to observability and tracing labels Jan 27, 2023
@bclozel bclozel added this to the 6.0.5 milestone Jan 27, 2023
@bclozel bclozel self-assigned this Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant