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

Adjust tag naming for better consistency #140

Merged
merged 5 commits into from
Oct 13, 2017
Merged

Conversation

tylerbenson
Copy link
Contributor

No description provided.

@palazzem palazzem added this to the 0.2.6 milestone Oct 13, 2017
@palazzem palazzem added the comp: core Tracer core label Oct 13, 2017
references to entries below were using the wrong instance and thus not being cleaned properly.
public static final String THREAD_NAME = "thread-name";
public static final String THREAD_ID = "thread-id";
public static final String SPAN_TYPE = "span.type";
public static final String SERVICE_NAME = "service.name";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is going to break most of Java instrumentation. We should provide a migration guide in the release note and notify our beta customers about this breaking change. But yea, I prefer the dot notation too.

@@ -89,7 +90,7 @@ class DDApiTest extends Specification {
[SpanFactory.newSpanOf(1L)] | [new TreeMap<>([
"duration" : 0,
"error" : 0,
"meta" : ["thread-name": Thread.currentThread().getName(), "thread-id": "${Thread.currentThread().id}"],
"meta" : [(DDTags.THREAD_NAME): Thread.currentThread().getName(), (DDTags.THREAD_ID): "${Thread.currentThread().id}"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here?

Probably there are more places where we need to update these values with correct ones. Worth looking why with the change tests are not fully broken. We may need to test Span.service / Span.resource with fixed values (so getTag('service.name') instead of getTag(DDTags.SERVICE_NAME)) otherwise we're going to break things without knowing that.

If it's the case, would be great to add these changes to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you'd rather leave the (corrected) literal values in the tests instead of the field references?

@tylerbenson tylerbenson merged commit 1654a8a into master Oct 13, 2017
@tylerbenson tylerbenson deleted the tyler/consistency branch October 13, 2017 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants