-
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
Adjust tag naming for better consistency #140
Conversation
aab6cfa
to
7f8b814
Compare
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"; |
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.
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}"], |
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.
Same here?
dd-trace-java/dd-trace/src/test/java/com/datadoghq/trace/sampling/ExampleWithDDAgentWriter.java
Line 27 in 7f8b814
.withServiceName("service-name") |
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.
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.
so you'd rather leave the (corrected) literal values in the tests instead of the field references?
same for resource-name
de740d7
to
aac9457
Compare
No description provided.