I have spring-boot application and it has the next dependencies:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation "com.datadoghq:dd-java-agent:0.75.0"
annotationProcessor "com.datadoghq:dd-java-agent:0.75.0"
testImplementation 'org.springframework.boot:spring-boot-starter-test'}
bootRun {
jvmArgs = ["-javaagent:" + configurations.runtimeClasspath.files.find { f -> f.path.contains('dd-java-agent') }.path]
}
I execute Datadog agent in the container and configure it there(KEY, ENV).
When I use API from dd-trace (like datadog.trace.api.Trace
), I can see traces in Datadog. But when I use sleuth API to create spans/tags/events I cant see traces.
Is it possible to use sleuth API to send traces to Datadog via Datadog agent? If yes, what do I need to do for it?
Spring Cloud Sleuth supports two tracing libraries:
There are a few things you can do: