Last active
May 28, 2024 07:44
-
-
Save majk-p/595a3d8e160c568044998928f8c29421 to your computer and use it in GitHub Desktop.
Reproduce issue with non-daemon threads spawned by datadog agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using dep "com.datadoghq:dd-trace-api:1.34.0" | |
//> using dep "org.typelevel::cats-effect:3.5.4" | |
import datadog.trace.api.civisibility.* | |
import cats.effect.* | |
object HelloIOApp extends IOApp.Simple { | |
val run = IO.delay { | |
println("Hello!") | |
val testSession = | |
CIVisibility.startSession("my-project-name", "my-test-framework", null) | |
testSession.setTag("my-tag", "additional-session-metadata") | |
val testModule = testSession.testModuleStart("my-module", null) | |
val testSuite = testModule.testSuiteStart("my-suite", null, null) | |
val ddTest = testSuite.testStart("myTestCase", null, null) | |
ddTest.setTag("my-test-case-tag", "additional-test-case-metadata") | |
ddTest.setTag("my-test-case-tag", "more-test-case-metadata") | |
println("Executing fake test") | |
ddTest.end(null) | |
testSuite.end(null) | |
testModule.end(null) | |
testSession.end(null) | |
println("Bye!") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment