Skip to content

Commit 64b2c95

Browse files
Do not include system-properties in test session command tag
1 parent 8085070 commit 64b2c95

4 files changed

Lines changed: 1 addition & 32 deletions

File tree

dd-java-agent/instrumentation/gradle/src/main/groovy/datadog/trace/instrumentation/gradle/CiVisibilityGradleListener.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ private static String recreateStartCommand(StartParameter startParameter, String
151151
}
152152
}
153153

154-
for (Map.Entry<String, String> e : startParameter.getSystemPropertiesArgs().entrySet()) {
155-
String propertyKey = e.getKey();
156-
String propertyValue = e.getValue();
157-
command.append(" -D").append(propertyKey);
158-
if (propertyValue != null && !propertyValue.isEmpty()) {
159-
command.append('=').append(propertyValue);
160-
}
161-
}
162-
163154
return command.toString();
164155
}
165156

dd-java-agent/instrumentation/gradle/src/main/groovy/datadog/trace/instrumentation/gradle/legacy/GradleUtils.groovy

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ abstract class GradleUtils {
4949
}
5050
}
5151

52-
for (Map.Entry<String, String> e : startParameter.getSystemPropertiesArgs().entrySet()) {
53-
String propertyKey = e.getKey()
54-
String propertyValue = e.getValue()
55-
command.append(" -D").append(propertyKey)
56-
if (propertyValue != null && !propertyValue.isEmpty()) {
57-
command.append('=').append(propertyValue)
58-
}
59-
}
60-
6152
return command.toString()
6253
}
6354

dd-java-agent/instrumentation/maven-3.2.1/src/main/java/datadog/trace/instrumentation/maven3/MavenLifecycleParticipant.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void afterProjectsRead(MavenSession session) {
104104
// otherwise reference to "@{argLine}" that we add when configuring tracer
105105
// might cause failure
106106
// (test executions config is changed even if auto configuration is disabled:
107-
// for passing module and sesion IDs to child JVM)
107+
// for passing module and session IDs to child JVM)
108108
projectProperties.setProperty("argLine", "");
109109
}
110110
}

dd-java-agent/instrumentation/maven-3.2.1/src/main/java/datadog/trace/instrumentation/maven3/MavenUtils.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.lang.invoke.MethodHandle;
55
import java.util.Iterator;
66
import java.util.List;
7-
import java.util.Map;
87
import java.util.Objects;
98
import java.util.Properties;
109
import org.apache.maven.BuildFailureException;
@@ -164,18 +163,6 @@ public static String getCommandLine(MavenSession session) {
164163
command.append(' ').append(goal);
165164
}
166165

167-
Properties userProperties = request.getUserProperties();
168-
if (userProperties != null) {
169-
for (Map.Entry<Object, Object> e : userProperties.entrySet()) {
170-
command
171-
.append(" -")
172-
.append(CLIManager.SET_SYSTEM_PROPERTY)
173-
.append(e.getKey())
174-
.append('=')
175-
.append(e.getValue());
176-
}
177-
}
178-
179166
if (!request.getActiveProfiles().isEmpty()) {
180167
command.append(" -").append(CLIManager.ACTIVATE_PROFILES);
181168
Iterator<String> it = request.getActiveProfiles().iterator();

0 commit comments

Comments
 (0)