Skip to content

Adjust tag naming for better consistency#140

Merged
tylerbenson merged 5 commits intomasterfrom
tyler/consistency
Oct 13, 2017
Merged

Adjust tag naming for better consistency#140
tylerbenson merged 5 commits intomasterfrom
tyler/consistency

Conversation

@tylerbenson
Copy link
Copy Markdown
Contributor

No description provided.

@tylerbenson tylerbenson requested a review from palazzem October 12, 2017 15:25
@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
Copy Markdown
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.

"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
Copy Markdown
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
Copy Markdown
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.

2 participants