Configure the OTLP address in spring boot 3

74 views Asked by At

I want to congiure my OTLP addresses like described here

enter image description here

I added the following dependencies to export otlp data

    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'io.micrometer:micrometer-registry-prometheus'
    implementation 'io.micrometer:micrometer-tracing-bridge-otel'
    implementation 'io.opentelemetry:opentelemetry-exporter-zipkin'
    implementation 'io.opentelemetry:opentelemetry-exporter-otlp'

And configured them like so

management:
  zipkin:
    tracing:
      endpoint: http://grafana-k8s-monitoring-grafana-agent.my-namespace.svc.cluster.local:9411
  otlp:
    metrics:
      export:
        url: http://grafana-k8s-monitoring-grafana-agent.my-namespace.svc.cluster.local:4318
  tracing:
    sampling:
      probability: 1.0

But I get the following errors

Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/127.0.0.1:4318
 Failed to export spans
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://grafana-k8s-monitoring-grafana-agent.my-namespace.svc.cluster.local:9411": Failed to connect to grafana-k8s-monitoring-grafana-agent.my-namespace.svc.cluster.local/<IP-I-REMOVED>:9411

What could be the problem here?

0

There are 0 answers