How to use parent-less spans for 'additional reactor work' when coupled with agent-based instrumentation #9679
Unanswered
crankydillo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a reactor-based web server. For each inbound request, I need an 'official' trace that correlates it with all outbound HTTP requests for 'official work'. Auto-instrumentation seems to work quite well for this. However, I also need to make additional outbound HTTP requests that need traces, but should not be associated with the 'official trace'. We can call it the 'shadow trace' for 'shadow work'.
I've read as much as I could find on open-telemetry and reactor and have the following example code.
Of course, 'shadow work' may make HTTP calls that happen long after the 'official work' completes.
In all the scenarios I've thrown at it, this seems to work; however, I have also been burned by 'testing' my way to conclusions about how reactor works.
Does the above code look good for what I've described when paired with auto-instrumentation? If not, do you have any guidance? I'm thinking that TraceSubscriber is the secret sauce that makes things works.
Beta Was this translation helpful? Give feedback.
All reactions