admin管理员组

文章数量:1419168

I’m trying to push OTel metrics into Prometheus according to /.

I’m running prometheus:v3.0.1 docker image locally, here is the full config

  prometheus:
    image: prom/prometheus:v3.0.1
    extra_hosts: [ 'host.docker.internal:host-gateway' ]
    volumes:
      - prometheus:/prometheus
      - ./prometheus/:/etc/prometheus/
    command:
      - --web.enable-otlp-receiver
      - --enable-feature=exemplar-storage
      - --web.enable-remote-write-receiver
      - --config.file=/etc/prometheus/prometheus-${profile:-dev}.yml
      - --log.level=debug
    ports:
      - 9090:9090

with Prometheus configuration

storage:
  tsdb:
    out_of_order_time_window: 1m

otlp:
  promote_resource_attributes:
    - service.name
  translation_strategy: NoUTF8EscapingWithSuffixes

I have also setup Spring Boot 3.4. app to push metrics in Otel format to Prometheus endpoint /api/v1/otlp/v1/metrics, by defining

implementation(".springframework.boot:spring-boot-actuator")
implementation("io.micrometer:micrometer-registry-otlp")

and spring properties

management:
  otlp:
    metrics:
      export:
        step: 15s
        url: ${bytechef.metrics.otlp.endpoint}

I can confirm (through Wireshark) my Spring Boot 3.4 app is successfully exporting metrics to HTTP /api/v1/otlp/v1/metrics endpoint, and it gets HTTP 200 OK response from Prometheus.

The problem is there are no metrics in Prometheus. I’m lost as there is no error message or anything indicating what could be wrong. Did anybody else successfully setup OTLP receiver in Prometheus, or is this still a work in progress feature?

Thank you!

本文标签: spring bootOTLP receiver missing exported metricsStack Overflow