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 with Jaeger #258

Closed
laci9 opened this issue Nov 13, 2023 · 6 comments
Closed

Tracing with Jaeger #258

laci9 opened this issue Nov 13, 2023 · 6 comments

Comments

@laci9
Copy link

laci9 commented Nov 13, 2023

Hi,
I've tried to trace the system with Jaeger by sidecar injection. In Jaeger UI, I can see all the traces with correct spans but everything has the same operation name op. Is it possible to trace the system and be able to see correct operation names and has someone some experience with that? Thank you for your answer.

@SimonEismann
Copy link
Contributor

Hi @laci9, I unfortunately don't have any experience with instrumenting the TeaStore via Jaeger in Kubernetes.

Could you add a screenshot/example traces to better highlight your issue? Maybe someone with more Jaeger experience comes across this issue :)

@laci9
Copy link
Author

laci9 commented Nov 14, 2023

Hi @SimonEismann, thank you for your answer.

I've used this tutorial to set up Jaeger for monitoring and in the screenshots below can be seen that all operation names are just op. I'm using Jaeger version 1.49 and after some investigation I've found out that Jaeger is not using openTracing anymore (from version 1.48 higher) but openTelemetry, so that might be causing issues, but I'm not really sure if that is the root cause as all traces have correct structure.

EDIT: Jaeger should still support openTracing based on 1.49 documentation

Snímka obrazovky 2023-11-14 o 19 24 06 Snímka obrazovky 2023-11-14 o 19 24 24 Snímka obrazovky 2023-11-14 o 19 24 38 Snímka obrazovky 2023-11-14 o 19 25 19 Snímka obrazovky 2023-11-14 o 19 27 01

@laci9
Copy link
Author

laci9 commented Nov 14, 2023

I've found the root cause. When building span, it is hardcoded to set the oparation name to op.
Link to the source code, where it is set: file

@laci9
Copy link
Author

laci9 commented Dec 2, 2023

I solved my issue by adding a parameter to the buildSpanFromHeaders method signature for operation name. Then from extractCurrentSpan(HttpServletRequest request) can be sent also an URL or URI of the request as the operation name.

@SimonEismann
Copy link
Contributor

Glad to hear that you were able to resolve this! Could you open up a PR with your changes? I think this might be useful for other users as well. Hardcoding the operation name to op seems ... not optimal :)

@laci9
Copy link
Author

laci9 commented Dec 5, 2023

Sure, here's the link to the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants