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

Allow service name mapping to apply without setting the tag. #398

Merged
merged 3 commits into from
Jul 25, 2018

Conversation

tylerbenson
Copy link
Contributor

Previously the mapping only applied when the service.name tag was set, not on the default or configured service name.

@tylerbenson tylerbenson added this to the 0.12.0 milestone Jul 23, 2018
@tylerbenson tylerbenson requested a review from realark July 23, 2018 02:45
@@ -522,6 +525,10 @@ private DDSpanContext buildSpanContext() {
serviceName = DDTracer.this.serviceName;
}

if (serviceNameMappings.containsKey(serviceName)) {
serviceName = serviceNameMappings.get(serviceName);
}
Copy link
Contributor

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?

Copy link
Contributor Author

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 . 😉

@tylerbenson
Copy link
Contributor Author

This would be a good feature to use with a SpanInterceptor as we discussed for API.next.

Previously the mapping only applied when the `service.name` tag was set, not on the default or configured service name.
Otherwise the context decorator doesn’t know if it should change the span name or not.
If done in the decorator, it would be applied twice.  Only want it done once.
@tylerbenson tylerbenson merged commit e2e4c9b into master Jul 25, 2018
@tylerbenson tylerbenson deleted the tyler/service-mapping branch July 25, 2018 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants