Skip to content
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

Tracing propagation example #8903

Open
romain-grecourt opened this issue Jun 21, 2024 · 0 comments
Open

Tracing propagation example #8903

romain-grecourt opened this issue Jun 21, 2024 · 0 comments

Comments

@romain-grecourt
Copy link
Contributor

Environment Details

  • Helidon Version: 4.1.0
  • Helidon SE

Problem Description

There is no example for standalone tracing propagation using the Helidon context.

Context context = Contexts.context().orElseGet(Contexts::globalContext);
Tracer tracer = context.get(Tracer.class).orElseGet(Tracer::global);
Span.Builder<?> spanBuilder = tracer.spanBuilder("my-span");
context.get(SpanContext.class).ifPresent(spanBuilder::parent);
spanBuilder.tag("foo", "bar");
Span span = spanBuilder.start();
try {
    doStuff();
} catch (Throwable th) {
    span.end(th);
} finally {
    span.end();
}
@github-actions github-actions bot added this to Triage in Backlog Jun 21, 2024
@m0mus m0mus moved this from Triage to Normal priority in Backlog Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Backlog
  
Normal priority
Development

No branches or pull requests

2 participants