Add service name to default jmx tags
MODIFY
dd-trace-api/src/main/java/datadog/trace/api/Config.java
dd-trace-api/src/main/java/datadog/trace/api/Config.java
@@ -163,6 +163,7 @@ public class Config {
result.putAll(globalTags);
result.putAll(jmxTags);
result.put(RUNTIME_ID_TAG, runtimeId);
+ result.put(SERVICE_NAME, serviceName);
return Collections.unmodifiableMap(result);
}

MODIFY
dd-trace-api/src/test/groovy/datadog/trace/api/ConfigTest.groovy
dd-trace-api/src/test/groovy/datadog/trace/api/ConfigTest.groovy
@@ -33,7 +33,7 @@ class ConfigTest extends Specification {
config.traceResolverEnabled == true
config.serviceMapping == [:]
config.mergedSpanTags == [:]
- config.mergedJmxTags == [(RUNTIME_ID_TAG): config.getRuntimeId()]
+ config.mergedJmxTags == [(RUNTIME_ID_TAG): config.getRuntimeId(), (SERVICE_NAME): config.serviceName]
config.headerTags == [:]
config.jmxFetchEnabled == false
config.jmxFetchMetricsConfigs == []
@@ -76,7 +76,7 @@ class ConfigTest extends Specification {
config.traceResolverEnabled == false
config.serviceMapping == [a: "1"]
config.mergedSpanTags == [b: "2", c: "3"]
- config.mergedJmxTags == [b: "2", d: "4", (RUNTIME_ID_TAG): config.getRuntimeId()]
+ config.mergedJmxTags == [b: "2", d: "4", (RUNTIME_ID_TAG): config.getRuntimeId(), (SERVICE_NAME): config.serviceName]
config.headerTags == [e: "5"]
config.jmxFetchEnabled == true
config.jmxFetchMetricsConfigs == ["/foo.yaml", "/bar.yaml"]
@@ -153,7 +153,7 @@ class ConfigTest extends Specification {
config.traceResolverEnabled == false
config.serviceMapping == [a: "1"]
config.mergedSpanTags == [b: "2", c: "3"]
- config.mergedJmxTags == [b: "2", d: "4", (RUNTIME_ID_TAG): config.getRuntimeId()]
+ config.mergedJmxTags == [b: "2", d: "4", (RUNTIME_ID_TAG): config.getRuntimeId(), (SERVICE_NAME): config.serviceName]
config.headerTags == [e: "5"]
config.jmxFetchMetricsConfigs == ["/foo.yaml", "/bar.yaml"]
config.jmxFetchCheckPeriod == 100

Add service name to default jmx tags