-
Notifications
You must be signed in to change notification settings - Fork 561
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
Helidon tracing custom spans #8861
Comments
The issue description talks about creating custom spans but the code deals quite a bit with context propagation. A few thoughts...
|
Yes, you are right - my main concern is the "correct" current span being propagated in various ways; and the propagation for
is all different. I'll find some time to build a demonstrator to show what I'm encountering - hopefully this week. |
I've been working on a reproducer, and you're right @tjquinno that 4.0.10 fixes the main issue I was having in that the context propagation was looking for the current span in the Helidon I did find weirdness though - the code in Optional<Context> context = Contexts.context();
if (context.isPresent()) { But But what that means is that if you don't have a Helidon Context no propagation happens - even though one is not required. Interestingly So I wonder if the problem isn't tracing at all, but the |
TL;DR: As you mentioned, there are several types of "propagation" possibly in play in this discussion, some involving tracing specifically, some using But if--even with the recent tracing improvements--you are still seeing specific problems, please report them here (or in other issues) so we can reproduce and track each one...preferably with a reproducer. Longer discussion... You pasted a bit of code from As you point out, that code propagates nothing if there is no current context to propagate into. But I think--perhaps @tomas-langer can confirm--that there is almost always--perhaps always always--a current context, the global context if nothing else: helidon/common/context/src/main/java/io/helidon/common/context/Contexts.java Lines 66 to 77 in aa3ab17
You mentioned that the Helidon OTel propagation provider does not use the context, but it does not really need to. The
Any code can register data in a |
What is the correct way to create custom spans in Helidon Tracing? I see different places use different approaches to getting the current span, so I end up having to use a utility like the below
If I miss any of the 3 above steps, my custom scope is only propagated "sometimes" and I end up with a mess
Environment Details
The text was updated successfully, but these errors were encountered: