-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add an example of otel instrumentation usage #660
Add an example of otel instrumentation usage #660
Conversation
c494bf4
to
cdbc1b5
Compare
Hi @grouzen, Automatic instrumentation example should work with this patch: example.patch.txt (had to add Basically everything seemed to be correct, only that OTEL doesn't have instrumentation for I've got both client and server spans: Update: Actually there is instrumentation for |
Thanks a lot @dmytr ! I'll try to run it with your patch and let you know about the results. |
@dmytr Hey! I finally managed to try your solution, and it works great! Unfortunately, I encountered another issue with manipulating traces manually via Also, I've tried to use
|
Hi @grouzen, The problem with the current version of this example seems to be that it creates a separate tracer which is not linked to all the machinery provided by OTEL JVM agent. Tracer has to be obtained using Theoretically, manually created tracer should work as well, as it should be using the same Context storage. I'm not sure why it doesn't 🤷♂️ Also there is no need to extract trace in HTTP handler as this is handled by the agent. And there is no need to add any extra dependencies to With this patch everything works: Regarding test, I'd expect that it's the same problem - it uses a separate tracer. |
@dmytr Thanks! You saved me a lot of hair on my head,
It is a good topic to investigate.
Yeah, I know. My goal was to show how to manually create child spans from those provided by instrumentation.
Right! |
8aaec3c
to
f871fb7
Compare
6f8587c
to
fd76ba7
Compare
fd76ba7
to
490a90f
Compare
It is a part of: #654