Reputation: 61
I wish to send traces to DataDog using the latest SpringBoot 3 and micrometer. DataDog propose a way to use a "DataDog Agent" to help the process. However, I wish to send traces without the agent (which is possible with many other trace aggregation systems)
To achieve sending trace to DataDog without the agent, I am using this code:
import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporter;
@Bean
public SpanExporter spanExporter() {
return OtlpHttpSpanExporter.builder().setEndpoint("https://us5.datadoghq.com/api/v0.3/traces").addHeader("apiKeySecretArn", "abc").build();
}
And the micrometer-tracing-bridge-otel
With this, I would expect the trace to go to DataDog.
Unfortunately, it is not.
Just to avoid confusion, the same code is working with Grafana Cloud, and Zipkin server, etc
@Bean
public SpanExporter spanExporter() {
return OtlpHttpSpanExporter.builder().setEndpoint("https://tempo-prod-prod-us-east-0.grafana.net:443").addHeader("Authorization", "Basic abc").build();
}
May I ask what is the correct URL and authentication mechanism to send traces to DataDog without agent?
Upvotes: 4
Views: 619
Reputation: 9844
Direct OTLP ingest is not currently supported. To send traces via OTLP you need send them via the Datadog Agent or OTel Exporter.
Upvotes: 1