Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dd-trace-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ private static boolean addPropToMapIfDefinedByEnvironment(
final Map<String, String> map, final String propName) {
final String val = getSettingFromEnvironment(propName, null);
if (val != null) {
return !val.equals(map.put(propertyNameToSystemPropertyName(propName), val));
return !val.equals(map.put(propName, val));
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1246,13 +1246,13 @@ class ConfigTest extends DDSpecification {
setup:
environmentVariables.set(DD_ENV_ENV, "test_env")
environmentVariables.set(DD_VERSION_ENV, "1.2.3")
environmentVariables.set(DD_TAGS_ENV, "dd.env:production , dd.version:3.2.1")
environmentVariables.set(DD_TAGS_ENV, "env:production , version:3.2.1")

when:
Config config = new Config()

then:
config.mergedSpanTags == ["dd.env": "test_env", "dd.version": "1.2.3"]
config.mergedSpanTags == ["env": "test_env", "version": "1.2.3"]
}

def "propertyNameToEnvironmentVariableName unit test"() {
Expand Down