spring-projects-experimental / spring-cloud-sleuth-otel

Spring Cloud Sleuth support for OpenTelemetry
https://spring-projects-experimental.github.io/spring-cloud-sleuth-otel/docs/current/reference/html/
Apache License 2.0
111 stars 33 forks source link

Provide support to Otel Metrics exporter #123

Closed anuragk-sportsbet closed 2 years ago

anuragk-sportsbet commented 2 years ago

Is your feature request related to a problem? Please describe. Currently the library does not support sending of OTLP metrics via the https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-exporter-otlp-metrics library

Describe the solution you'd like In order to send traces, the library offers the dependencies with the config

  sleuth:
    otel:
      config:
        trace-id-ratio-based: 1.0
      exporter:
        otlp:
          endpoint: http://localhost:4317
          timeout: 30000

An enhancement could be to extend it to include metrics as well

otel:
  exporter:
    otlp:
      metrics:
         endpoint: http://localhost:4317
         timeout: 30000
marcingrzejszczak commented 2 years ago

Why not use micrometer with an OTLP registry? https://github.com/micrometer-metrics/micrometer/commit/234e58bb45439b4318628e22d093a20eb1302fd3