-
Notifications
You must be signed in to change notification settings - Fork 277
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
Allow service name mapping to apply without setting the tag. #398
Conversation
@@ -522,6 +525,10 @@ private DDSpanContext buildSpanContext() { | |||
serviceName = DDTracer.this.serviceName; | |||
} | |||
|
|||
if (serviceNameMappings.containsKey(serviceName)) { | |||
serviceName = serviceNameMappings.get(serviceName); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please clarify how this is different from just setting service.name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the latest commit. I realized this didn't work and was fixing it... didn't expect anyone to be looking at it already . 😉
This would be a good feature to use with a |
33dc43e
to
f8176ba
Compare
Previously the mapping only applied when the `service.name` tag was set, not on the default or configured service name.
f8176ba
to
84927a9
Compare
Otherwise the context decorator doesn’t know if it should change the span name or not.
84927a9
to
7807615
Compare
If done in the decorator, it would be applied twice. Only want it done once.
7f31cee
to
5fe08d2
Compare
Previously the mapping only applied when the
service.name
tag was set, not on the default or configured service name.