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

zipkin-js span name customizer #96

Closed
ImFlog opened this issue Apr 2, 2017 · 3 comments
Closed

zipkin-js span name customizer #96

ImFlog opened this issue Apr 2, 2017 · 3 comments

Comments

@ImFlog
Copy link

ImFlog commented Apr 2, 2017

Hello,
Not sure if I missed something but I think there is no possibility to customize the span name in zipkin-js.

capture d ecran 2017-03-30 a 16 08 55
For example, in the previous screenshot, I would like to show something else than "get" for the first calls (js), rest of the app is polyglot but I managed to put what I wanted to name the spans.

Did I miss something ?
Thanks in advance

@eirslett
Copy link
Contributor

eirslett commented Apr 2, 2017

It's not possible to change, because it's following the B 53 tracing spec (more or less). What you can do is add custom binary annotations to the span, then you can add whatever you want.

The UI could be improved to make it easier to show custom annotations, I guess...

@eirslett eirslett closed this as completed Apr 2, 2017
@ImFlog
Copy link
Author

ImFlog commented Apr 2, 2017

Thank you for your answer.
The problem is not about an particular annotation. After looking at the code, I found that the sent span looks like this :
{ "traceId": "9acbf7ffa64bb1b8", "id": "9acbf7ffa64bb1b8", "name": "get", "timestamp": 1491153705263968, "duration": 1271691, "annotations": [
And I use the same kind of code that the samples gives in the README. In the cujo-js code I found this : https://github.com/openzipkin/zipkin-js/blob/master/packages/zipkin-instrumentation-cujojs-rest/src/restInterceptor.js#L27
So I am wondering where does the "get" comes from ? Looks like a bug for me.

codefromthecrypt pushed a commit that referenced this issue Apr 3, 2017
Default span names are good choices as they are bounded. However, users
may want to change these to other bounded choices (ex names that don't
include variables). This shows how to accomplish this.

Note: it is quite common for custom code to get naming wrong, by using
high cardinality names such as specific http paths. This is one reason
why defaults are limited, as tags/binary annotations can be used to add
more specific lookup criteria without degrading the UI.

See #96
See openzipkin/openzipkin.github.io#70 (comment)
@codefromthecrypt
Copy link
Member

codefromthecrypt commented Apr 3, 2017 via email

codefromthecrypt pushed a commit that referenced this issue Jul 4, 2017
Default span names are good choices as they are bounded. However, users
may want to change these to other bounded choices (ex names that don't
include variables). This shows how to accomplish this.

Note: it is quite common for custom code to get naming wrong, by using
high cardinality names such as specific http paths. This is one reason
why defaults are limited, as tags/binary annotations can be used to add
more specific lookup criteria without degrading the UI.

See #96
See openzipkin/openzipkin.github.io#70 (comment)
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

3 participants