Skip to content

Commit 1e40a01

Browse files
fix: tag name
1 parent c0271a7 commit 1e40a01

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

  • dd-java-agent/instrumentation/junit/junit-5/junit-5.3/src
  • internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api

dd-java-agent/instrumentation/junit/junit-5/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/TracingListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private void testMethodExecutionStarted(TestDescriptor testDescriptor, MethodSou
144144
if (JUnitPlatformUtils.isDynamicTest(testDescriptor)) {
145145
AgentSpan span = AgentTracer.activeSpan();
146146
if (span != null) {
147-
span.setTag(Tags.TEST_IS_DYNAMIC, true);
147+
span.setTag(Tags.TEST_JUNIT_IS_DYNAMIC, true);
148148
}
149149
}
150150
}
@@ -258,7 +258,7 @@ private void testMethodExecutionSkipped(
258258
if (JUnitPlatformUtils.isDynamicTest(testDescriptor)) {
259259
AgentSpan span = AgentTracer.activeSpan();
260260
if (span != null) {
261-
span.setTag(Tags.TEST_IS_DYNAMIC, true);
261+
span.setTag(Tags.TEST_JUNIT_IS_DYNAMIC, true);
262262
}
263263
}
264264
}

dd-java-agent/instrumentation/junit/junit-5/junit-5.3/src/test/resources/test-factory/events.ftl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"test.final_status" : "pass",
119119
"test.framework" : "junit5",
120120
"test.framework_version" : ${content_meta_test_framework_version},
121-
"test.is_dynamic" : "true",
121+
"test.junit5.is_dynamic" : "true",
122122
"test.module" : "junit-5.3",
123123
"test.name" : "test_factory",
124124
"test.parameters" : "{\"metadata\":{\"test_name\":\"dynamic_test_succeed\"}}",
@@ -168,7 +168,7 @@
168168
"test.final_status" : "pass",
169169
"test.framework" : "junit5",
170170
"test.framework_version" : ${content_meta_test_framework_version},
171-
"test.is_dynamic" : "true",
171+
"test.junit5.is_dynamic" : "true",
172172
"test.module" : "junit-5.3",
173173
"test.name" : "test_factory",
174174
"test.parameters" : "{\"metadata\":{\"test_name\":\"dynamic_test_succeed\"}}",
@@ -200,4 +200,4 @@
200200
},
201201
"type" : "test",
202202
"version" : 2
203-
} ]
203+
} ]

dd-java-agent/instrumentation/junit/junit-5/junit-5.3/src/test/resources/test-retry-factory/events.ftl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"test.final_status" : "pass",
119119
"test.framework" : "junit5",
120120
"test.framework_version" : ${content_meta_test_framework_version},
121-
"test.is_dynamic" : "true",
121+
"test.junit5.is_dynamic" : "true",
122122
"test.module" : "junit-5.3",
123123
"test.name" : "test_factory",
124124
"test.parameters" : "{\"metadata\":{\"test_name\":\"dynamic_test_succeed\"}}",
@@ -171,7 +171,7 @@
171171
"test.failure_suppressed" : "true",
172172
"test.framework" : "junit5",
173173
"test.framework_version" : ${content_meta_test_framework_version},
174-
"test.is_dynamic" : "true",
174+
"test.junit5.is_dynamic" : "true",
175175
"test.module" : "junit-5.3",
176176
"test.name" : "test_factory",
177177
"test.parameters" : "{\"metadata\":{\"test_name\":\"dynamic_test_failed\"}}",
@@ -224,7 +224,7 @@
224224
"test.failure_suppressed" : "true",
225225
"test.framework" : "junit5",
226226
"test.framework_version" : ${content_meta_test_framework_version},
227-
"test.is_dynamic" : "true",
227+
"test.junit5.is_dynamic" : "true",
228228
"test.is_retry" : "true",
229229
"test.module" : "junit-5.3",
230230
"test.name" : "test_factory",
@@ -279,7 +279,7 @@
279279
"test.failure_suppressed" : "true",
280280
"test.framework" : "junit5",
281281
"test.framework_version" : ${content_meta_test_framework_version},
282-
"test.is_dynamic" : "true",
282+
"test.junit5.is_dynamic" : "true",
283283
"test.is_retry" : "true",
284284
"test.module" : "junit-5.3",
285285
"test.name" : "test_factory",
@@ -334,7 +334,7 @@
334334
"test.failure_suppressed" : "true",
335335
"test.framework" : "junit5",
336336
"test.framework_version" : ${content_meta_test_framework_version},
337-
"test.is_dynamic" : "true",
337+
"test.junit5.is_dynamic" : "true",
338338
"test.is_retry" : "true",
339339
"test.module" : "junit-5.3",
340340
"test.name" : "test_factory",
@@ -390,7 +390,7 @@
390390
"test.framework" : "junit5",
391391
"test.framework_version" : ${content_meta_test_framework_version},
392392
"test.has_failed_all_retries" : "true",
393-
"test.is_dynamic" : "true",
393+
"test.junit5.is_dynamic" : "true",
394394
"test.is_retry" : "true",
395395
"test.module" : "junit-5.3",
396396
"test.name" : "test_factory",
@@ -424,4 +424,4 @@
424424
},
425425
"type" : "test",
426426
"version" : 2
427-
} ]
427+
} ]

internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/Tags.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public class Tags {
9898
public static final String TEST_IS_NEW = "test.is_new";
9999
public static final String TEST_IS_RETRY = "test.is_retry";
100100
public static final String TEST_RETRY_REASON = "test.retry_reason";
101-
public static final String TEST_IS_DYNAMIC = "test.is_dynamic";
101+
public static final String TEST_JUNIT_IS_DYNAMIC = "test.junit5.is_dynamic";
102102
public static final String TEST_IS_MODIFIED = "test.is_modified";
103103
public static final String TEST_HAS_FAILED_ALL_RETRIES = "test.has_failed_all_retries";
104104
public static final String TEST_FAILURE_SUPPRESSED = "test.failure_suppressed";

0 commit comments

Comments
 (0)