Send metrics to DataDog using micrometer-registry-otlp instead of micrometer-registry-datadog

37 Views Asked by At

I am using a SpringBoot 3 with micrometer, actuator, in order to send metrics to Datadog.

My pom contains spring-boot-starter-actuator micrometer-registry-datadog.

I am able to send metrics to datadog using the datadog registry.

However, I would like to send metrics to DataDog using micrometer-registry-otlp instead of micrometer-registry-datadog, and from DataDog's doc, the format should be supported

With the registry datadog, I am using this:

@SpringBootApplication
public class DatadogApplication {

    public static void main(String[] args) {
        SpringApplication.run(DatadogApplication.class, args);
    }

}
@RestController
public class TestController {
    @Timed(value = "firstApi", description = "The description of the first API")
    @GetMapping("/first")
    public ResponseEntity getFirst() {
        return new ResponseEntity(HttpStatus.OK);
    }
management.datadog.metrics.export.api-key=abc
management.datadog.metrics.export.application-key=dce
management.datadog.metrics.export.uri=https://us5.datadoghq.com

And again, it is working fine.

With the registry OTLP, I am changing to this:

management.otlp.metrics.export.url=https://us5.datadoghq.com

And it is not working.

May I ask what is the correct URL, what is the correct OTLP auth to send metrics to DataDog using the OTLP registry?

0

There are 0 best solutions below