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

OpenTracing: The operation name is fixed to "kong" which is not easy to identify traces #11511

Closed
1 task done
mong0520 opened this issue Sep 5, 2023 · 4 comments
Closed
1 task done
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... plugins/opentelemetry stale

Comments

@mong0520
Copy link

mong0520 commented Sep 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

Kong 3.4.0

Current Behavior

Environment:

  • A route /hello is configurated as expected response
  • Enable plugin opentelemetry and setup environment variable KONG_TRACING_INSTRUMENTATIONS=all.
  • A running container Jaeger-All-In-One:1.46

In Jaeger UI with Kong 3.2.2, you can see Jaeger shows HTTP method and Path in the red part.
image
image

However, after upgrading to Kong 3.4.0, the operation part is fixed to kong for every request.
image

image

Is that a Bug? Thank you.

Expected Behavior

Set value of operationName with Http method and request path

Steps To Reproduce

No response

Anything else?

diff:
https://github.com/Kong/kong/pull/10577/files#diff-0024105813dd6af8ebaf8ef51bde2f5679ae7892f123b9d8ed9bf436855c0650L232

No response

@mong0520 mong0520 changed the title OpenTracing: The operation name is fixed to "kong" which is not easy to identitfy OpenTracing: The operation name is fixed to "kong" which is not easy to identify traces Sep 5, 2023
@StarlightIbuki
Copy link
Contributor

This is a demanded behavior for some of the users of this feature. It's a headache that different system uses the fields in slightly different ways, and I'm not sure if there's a way to make everyone happy.
You could try filtering with attributes (http.method, http.path, etc.) and see if it fulfills your requirement.
The tracing PDK is not perfectly ready yet. Suggestions are welcomed.
Also pinging @samugi for visibility.

@StarlightIbuki StarlightIbuki added the pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... label Sep 11, 2023
@mong0520
Copy link
Author

mong0520 commented Sep 11, 2023

Understand it's a headache topic.
Take Go's solution for this case. It provides a callback function then let user to implement span name on their own.
Maybe that will be a good idea to set a default formatter and has an option to customize it by user.

https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/github.com/gin-gonic/gin/otelgin/gintrace.go#L76-L79

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

This issue is marked as stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Oct 6, 2023
@github-actions
Copy link
Contributor

Dear contributor,

We are automatically closing this issue because it has not seen any activity for three weeks.
We're sorry that your issue could not be resolved. If any new information comes up that could
help resolving it, please feel free to reopen it.

Your contribution is greatly appreciated!

Please have a look
our pledge to the community
for more information.

Sincerely,
Your Kong Gateway team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... plugins/opentelemetry stale
Projects
None yet
Development

No branches or pull requests

3 participants