From 3ad344d782d2034fc10e524892641d36531caf7a Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko <121111529+nikita-tkachenko-datadog@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:12:29 +0100 Subject: [PATCH] Mark JUnit 5 setup and teardown action spans as failed if there is an error (#8033) --- .../CiVisibilityInstrumentationTest.groovy | 16 +- .../junit5/BeforeAfterOperationsTracer.java | 3 + .../src/test/groovy/JUnit58Test.groovy | 4 + .../java/org/example/TestFailedAfterAll.java | 24 ++ .../java/org/example/TestFailedAfterEach.java | 24 ++ .../java/org/example/TestFailedBeforeAll.java | 24 ++ .../org/example/TestFailedBeforeEach.java | 24 ++ .../test-before-all-after-all/events.ftl | 16 +- .../test-before-each-after-each/events.ftl | 8 +- .../test-failed-after-all/coverages.ftl | 1 + .../test-failed-after-all/events.ftl | 224 ++++++++++++++++ .../test-failed-after-each/coverages.ftl | 1 + .../test-failed-after-each/events.ftl | 249 ++++++++++++++++++ .../test-failed-before-all/coverages.ftl | 1 + .../test-failed-before-all/events.ftl | 130 +++++++++ .../test-failed-before-each/coverages.ftl | 1 + .../test-failed-before-each/events.ftl | 249 ++++++++++++++++++ 17 files changed, 985 insertions(+), 14 deletions(-) create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterAll.java create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterEach.java create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeAll.java create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeEach.java create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/coverages.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/events.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/coverages.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/events.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/coverages.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/events.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/coverages.ftl create mode 100644 dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/events.ftl diff --git a/dd-java-agent/agent-ci-visibility/src/testFixtures/groovy/datadog/trace/civisibility/CiVisibilityInstrumentationTest.groovy b/dd-java-agent/agent-ci-visibility/src/testFixtures/groovy/datadog/trace/civisibility/CiVisibilityInstrumentationTest.groovy index c232f6e4551..f38bf6e4779 100644 --- a/dd-java-agent/agent-ci-visibility/src/testFixtures/groovy/datadog/trace/civisibility/CiVisibilityInstrumentationTest.groovy +++ b/dd-java-agent/agent-ci-visibility/src/testFixtures/groovy/datadog/trace/civisibility/CiVisibilityInstrumentationTest.groovy @@ -263,15 +263,13 @@ abstract class CiVisibilityInstrumentationTest extends AgentTestRunner { ] + replacements // uncomment to generate expected data templates - // def baseTemplatesPath = CiVisibilityInstrumentationTest.classLoader - // .getResource("test-succeed") - // .toURI() - // .schemeSpecificPart - // .replace('build/resources/test', 'src/test/resources') - // .replace('build/resources/latestDepTest', 'src/test/resources') - // .replace("test-succeed", testcaseName) - // CiVisibilityTestUtils.generateTemplates(baseTemplatesPath, events, coverages, additionalReplacements) - // return [:] + // def clazz = this.getClass() + // def resourceName = clazz.name.replace('.', '/') + ".class" + // def classfilePath = clazz.getResource(resourceName).toURI().schemeSpecificPart + // def modulePath = classfilePath.substring(0, classfilePath.indexOf("/build/classes")) + // def baseTemplatesPath = modulePath + "/src/test/resources/" + testcaseName + // CiVisibilityTestUtils.generateTemplates(baseTemplatesPath, events, coverages, additionalReplacements) + // return [:] return CiVisibilityTestUtils.assertData(testcaseName, events, coverages, additionalReplacements) } diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/main/java/datadog/trace/instrumentation/junit5/BeforeAfterOperationsTracer.java b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/main/java/datadog/trace/instrumentation/junit5/BeforeAfterOperationsTracer.java index 7593abfc7bf..19d56086a4b 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/main/java/datadog/trace/instrumentation/junit5/BeforeAfterOperationsTracer.java +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/main/java/datadog/trace/instrumentation/junit5/BeforeAfterOperationsTracer.java @@ -53,6 +53,9 @@ private static void traceInvocation( agentSpan.setTag(Tags.TEST_CALLBACK, operationName); try (AgentScope agentScope = AgentTracer.activateSpan(agentSpan)) { invocation.proceed(); + } catch (Throwable t) { + agentSpan.addThrowable(t); + throw t; } finally { agentSpan.finish(); } diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/groovy/JUnit58Test.groovy b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/groovy/JUnit58Test.groovy index 76c98102905..5c81fbcecab 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/groovy/JUnit58Test.groovy +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/groovy/JUnit58Test.groovy @@ -22,6 +22,10 @@ class JUnit58Test extends CiVisibilityInstrumentationTest { testcaseName | tests | expectedTracesCount "test-before-each-after-each" | [TestSucceedBeforeEachAfterEach] | 2 "test-before-all-after-all" | [TestSucceedBeforeAllAfterAll] | 2 + "test-failed-before-all" | [TestFailedBeforeAll] | 2 + "test-failed-after-all" | [TestFailedAfterAll] | 2 + "test-failed-before-each" | [TestFailedBeforeEach] | 2 + "test-failed-after-each" | [TestFailedAfterEach] | 2 } private static void runTests(List> tests) { diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterAll.java b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterAll.java new file mode 100644 index 00000000000..b4ba2f5513c --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterAll.java @@ -0,0 +1,24 @@ +package org.example; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Test; + +public class TestFailedAfterAll { + + @AfterAll + public static void tearDown() { + throw new RuntimeException("suite teardown failed"); + } + + @Test + public void test_succeed() { + assertTrue(true); + } + + @Test + public void another_test_succeed() { + assertTrue(true); + } +} diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterEach.java b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterEach.java new file mode 100644 index 00000000000..8aac75d89c3 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterEach.java @@ -0,0 +1,24 @@ +package org.example; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + +public class TestFailedAfterEach { + + @AfterEach + public void tearDown() { + throw new RuntimeException("testcase teardown failed"); + } + + @Test + public void test_succeed() { + assertTrue(true); + } + + @Test + public void another_test_succeed() { + assertTrue(true); + } +} diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeAll.java b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeAll.java new file mode 100644 index 00000000000..28687830add --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeAll.java @@ -0,0 +1,24 @@ +package org.example; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +public class TestFailedBeforeAll { + + @BeforeAll + public static void setUp() { + throw new RuntimeException("suite setup failed"); + } + + @Test + public void test_succeed() { + assertTrue(true); + } + + @Test + public void another_test_succeed() { + assertTrue(true); + } +} diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeEach.java b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeEach.java new file mode 100644 index 00000000000..122c43d22a2 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeEach.java @@ -0,0 +1,24 @@ +package org.example; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class TestFailedBeforeEach { + + @BeforeEach + public void setUp() { + throw new RuntimeException("testcase setup failed"); + } + + @Test + public void test_succeed() { + assertTrue(true); + } + + @Test + public void another_test_succeed() { + assertTrue(true); + } +} diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-all-after-all/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-all-after-all/events.ftl index b7a293bd9fa..22736145e85 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-all-after-all/events.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-all-after-all/events.ftl @@ -16,6 +16,7 @@ "_dd.trace_span_attribute_schema" : 0 }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, "test.type" : "test", "_dd.tracer_host" : ${content_meta__dd_tracer_host}, "test.status" : "pass", @@ -46,9 +47,10 @@ "duration" : ${content_duration_2}, "error" : 0, "metrics" : { - "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count} + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, "test.type" : "test", "test.module" : "junit-5.8", "test.status" : "pass", @@ -76,9 +78,12 @@ "duration" : ${content_duration_3}, "error" : 0, "metrics" : { - "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count} + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, "test.type" : "test", "test.source.file" : "dummy_source_path", "test.module" : "junit-5.8", @@ -86,6 +91,7 @@ "test_session.name" : "session-name", "env" : "none", "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", "library_version" : ${content_meta_library_version}, "component" : "junit", "span.kind" : "test_suite_end", @@ -114,7 +120,7 @@ "process_id" : ${content_metrics_process_id}, "_dd.profiling.enabled" : 0, "_dd.trace_span_attribute_schema" : 0, - "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, "test.source.end" : 18, "test.source.start" : 12 }, @@ -161,7 +167,7 @@ "process_id" : ${content_metrics_process_id}, "_dd.profiling.enabled" : 0, "_dd.trace_span_attribute_schema" : 0, - "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, "test.source.end" : 18, "test.source.start" : 12 }, @@ -203,6 +209,7 @@ "error" : 0, "metrics" : { }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_4}, "test.callback" : "BeforeAll", "library_version" : ${content_meta_library_version}, "env" : "none" @@ -223,6 +230,7 @@ "error" : 0, "metrics" : { }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_5}, "test.callback" : "AfterAll", "library_version" : ${content_meta_library_version}, "env" : "none" diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-each-after-each/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-each-after-each/events.ftl index e3774da1dfa..2090ff27a32 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-each-after-each/events.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-before-each-after-each/events.ftl @@ -16,6 +16,7 @@ "_dd.trace_span_attribute_schema" : 0 }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, "test.type" : "test", "_dd.tracer_host" : ${content_meta__dd_tracer_host}, "test.status" : "pass", @@ -49,6 +50,7 @@ "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, "test.type" : "test", "test.module" : "junit-5.8", "test.status" : "pass", @@ -76,9 +78,12 @@ "duration" : ${content_duration_3}, "error" : 0, "metrics" : { - "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3} + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 }, "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, "test.type" : "test", "test.source.file" : "dummy_source_path", "test.module" : "junit-5.8", @@ -86,6 +91,7 @@ "test_session.name" : "session-name", "env" : "none", "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", "library_version" : ${content_meta_library_version}, "component" : "junit", "span.kind" : "test_suite_end", diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/events.ftl new file mode 100644 index 00000000000..2253dea2640 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/events.ftl @@ -0,0 +1,224 @@ +[ { + "type" : "test_session_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_session", + "resource" : "junit-5.8", + "start" : ${content_start}, + "duration" : ${content_duration}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "test.type" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.status" : "fail", + "test_session.name" : "session-name", + "language" : "jvm", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "_dd.profiling.ctx" : "test", + "span.kind" : "test_session_end", + "runtime-id" : ${content_meta_runtime_id}, + "test.command" : "junit-5.8", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_module_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_module", + "resource" : "junit-5.8", + "start" : ${content_start_2}, + "duration" : ${content_duration_2}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "test.type" : "test", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_module_end", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_suite_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_suite", + "resource" : "org.example.TestFailedAfterAll", + "start" : ${content_start_3}, + "duration" : ${content_duration_3}, + "error" : 1, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "test.type" : "test", + "test.source.file" : "dummy_source_path", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "span.kind" : "test_suite_end", + "error.message" : ${content_meta_error_message}, + "test.suite" : "org.example.TestFailedAfterAll", + "error.stack" : ${content_meta_error_stack}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id}, + "span_id" : ${content_span_id}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedAfterAll.another_test_succeed", + "start" : ${content_start_4}, + "duration" : ${content_duration_4}, + "error" : 0, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "another_test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "pass", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "another_test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedAfterAll", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "_dd.profiling.ctx" : "test", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id_2}, + "span_id" : ${content_span_id_2}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedAfterAll.test_succeed", + "start" : ${content_start_5}, + "duration" : ${content_duration_5}, + "error" : 0, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "pass", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedAfterAll", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "_dd.profiling.ctx" : "test", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_test_session_id}, + "span_id" : ${content_span_id_3}, + "parent_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "tearDown", + "resource" : "tearDown", + "start" : ${content_start_6}, + "duration" : ${content_duration_6}, + "error" : 1, + "metrics" : { }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_4}, + "error.stack" : ${content_meta_error_stack_2}, + "test.callback" : "AfterAll", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/events.ftl new file mode 100644 index 00000000000..180f3341f04 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-each/events.ftl @@ -0,0 +1,249 @@ +[ { + "type" : "test_session_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_session", + "resource" : "junit-5.8", + "start" : ${content_start}, + "duration" : ${content_duration}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "test.type" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.status" : "fail", + "test_session.name" : "session-name", + "language" : "jvm", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "_dd.profiling.ctx" : "test", + "span.kind" : "test_session_end", + "runtime-id" : ${content_meta_runtime_id}, + "test.command" : "junit-5.8", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_module_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_module", + "resource" : "junit-5.8", + "start" : ${content_start_2}, + "duration" : ${content_duration_2}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "test.type" : "test", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_module_end", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_suite_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_suite", + "resource" : "org.example.TestFailedAfterEach", + "start" : ${content_start_3}, + "duration" : ${content_duration_3}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "test.type" : "test", + "test.source.file" : "dummy_source_path", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_suite_end", + "test.suite" : "org.example.TestFailedAfterEach", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id}, + "span_id" : ${content_span_id}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedAfterEach.another_test_succeed", + "start" : ${content_start_4}, + "duration" : ${content_duration_4}, + "error" : 1, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "another_test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "fail", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "another_test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedAfterEach", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "_dd.profiling.ctx" : "test", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id_2}, + "span_id" : ${content_span_id_2}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedAfterEach.test_succeed", + "start" : ${content_start_5}, + "duration" : ${content_duration_5}, + "error" : 1, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "fail", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedAfterEach", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "_dd.profiling.ctx" : "test", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_2}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_trace_id_2}, + "span_id" : ${content_span_id_3}, + "parent_id" : ${content_span_id_2}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "tearDown", + "resource" : "tearDown", + "start" : ${content_start_6}, + "duration" : ${content_duration_6}, + "error" : 1, + "metrics" : { }, + "meta" : { + "error.stack" : ${content_meta_error_stack_3}, + "test.callback" : "AfterEach", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_trace_id}, + "span_id" : ${content_span_id_4}, + "parent_id" : ${content_span_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "tearDown", + "resource" : "tearDown", + "start" : ${content_start_7}, + "duration" : ${content_duration_7}, + "error" : 1, + "metrics" : { }, + "meta" : { + "error.stack" : ${content_meta_error_stack_4}, + "test.callback" : "AfterEach", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/events.ftl new file mode 100644 index 00000000000..7f3a83d6454 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-all/events.ftl @@ -0,0 +1,130 @@ +[ { + "type" : "test_session_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_session", + "resource" : "junit-5.8", + "start" : ${content_start}, + "duration" : ${content_duration}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "test.type" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.status" : "fail", + "test_session.name" : "session-name", + "language" : "jvm", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "_dd.profiling.ctx" : "test", + "span.kind" : "test_session_end", + "runtime-id" : ${content_meta_runtime_id}, + "test.command" : "junit-5.8", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_module_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_module", + "resource" : "junit-5.8", + "start" : ${content_start_2}, + "duration" : ${content_duration_2}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "test.type" : "test", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_module_end", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_suite_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_suite", + "resource" : "org.example.TestFailedBeforeAll", + "start" : ${content_start_3}, + "duration" : ${content_duration_3}, + "error" : 1, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "test.type" : "test", + "test.source.file" : "dummy_source_path", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "span.kind" : "test_suite_end", + "error.message" : ${content_meta_error_message}, + "test.suite" : "org.example.TestFailedBeforeAll", + "error.stack" : ${content_meta_error_stack}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_test_session_id}, + "span_id" : ${content_span_id}, + "parent_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "setUp", + "resource" : "setUp", + "start" : ${content_start_4}, + "duration" : ${content_duration_4}, + "error" : 1, + "metrics" : { }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_4}, + "error.stack" : ${content_meta_error_stack_2}, + "test.callback" : "BeforeAll", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/events.ftl b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/events.ftl new file mode 100644 index 00000000000..6809b426552 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-before-each/events.ftl @@ -0,0 +1,249 @@ +[ { + "type" : "test_session_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_session", + "resource" : "junit-5.8", + "start" : ${content_start}, + "duration" : ${content_duration}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "test.type" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.status" : "fail", + "test_session.name" : "session-name", + "language" : "jvm", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "_dd.profiling.ctx" : "test", + "span.kind" : "test_session_end", + "runtime-id" : ${content_meta_runtime_id}, + "test.command" : "junit-5.8", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_module_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_module", + "resource" : "junit-5.8", + "start" : ${content_start_2}, + "duration" : ${content_duration_2}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "test.type" : "test", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_module_end", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test_suite_end", + "version" : 1, + "content" : { + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test_suite", + "resource" : "org.example.TestFailedBeforeEach", + "start" : ${content_start_3}, + "duration" : ${content_duration_3}, + "error" : 0, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "test.type" : "test", + "test.source.file" : "dummy_source_path", + "test.module" : "junit-5.8", + "test.status" : "fail", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "component" : "junit", + "span.kind" : "test_suite_end", + "test.suite" : "org.example.TestFailedBeforeEach", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id}, + "span_id" : ${content_span_id}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedBeforeEach.another_test_succeed", + "start" : ${content_start_4}, + "duration" : ${content_duration_4}, + "error" : 1, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "another_test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "fail", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "another_test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedBeforeEach", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "_dd.profiling.ctx" : "test", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "test", + "version" : 2, + "content" : { + "trace_id" : ${content_trace_id_2}, + "span_id" : ${content_span_id_2}, + "parent_id" : ${content_parent_id}, + "test_session_id" : ${content_test_session_id}, + "test_module_id" : ${content_test_module_id}, + "test_suite_id" : ${content_test_suite_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "junit.test", + "resource" : "org.example.TestFailedBeforeEach.test_succeed", + "start" : ${content_start_5}, + "duration" : ${content_duration_5}, + "error" : 1, + "metrics" : { + "process_id" : ${content_metrics_process_id}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "meta" : { + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_succeed()V", + "test.module" : "junit-5.8", + "test.status" : "fail", + "language" : "jvm", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "library_version" : ${content_meta_library_version}, + "test.name" : "test_succeed", + "span.kind" : "test", + "test.suite" : "org.example.TestFailedBeforeEach", + "runtime-id" : ${content_meta_runtime_id}, + "test.type" : "test", + "test_session.name" : "session-name", + "env" : "none", + "dummy_ci_tag" : "dummy_ci_tag_value", + "component" : "junit", + "error.type" : "java.lang.RuntimeException", + "_dd.profiling.ctx" : "test", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_2}, + "test.framework_version" : ${content_meta_test_framework_version}, + "test.framework" : "junit5" + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_trace_id_2}, + "span_id" : ${content_span_id_3}, + "parent_id" : ${content_span_id_2}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "setUp", + "resource" : "setUp", + "start" : ${content_start_6}, + "duration" : ${content_duration_6}, + "error" : 1, + "metrics" : { }, + "meta" : { + "error.stack" : ${content_meta_error_stack_3}, + "test.callback" : "BeforeEach", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +}, { + "type" : "span", + "version" : 1, + "content" : { + "trace_id" : ${content_trace_id}, + "span_id" : ${content_span_id_4}, + "parent_id" : ${content_span_id}, + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "name" : "setUp", + "resource" : "setUp", + "start" : ${content_start_7}, + "duration" : ${content_duration_7}, + "error" : 1, + "metrics" : { }, + "meta" : { + "error.stack" : ${content_meta_error_stack_4}, + "test.callback" : "BeforeEach", + "library_version" : ${content_meta_library_version}, + "error.type" : "java.lang.RuntimeException", + "env" : "none", + "error.message" : ${content_meta_error_message} + } + } +} ] \ No newline at end of file