0

What I would like to achieve:

Send SpringBoot actuator metrics (not traces) to ElasticSearch APM (not just ElasticSearch)

What I tried so far:

using below dependencies

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-core</artifactId>
    </dependency>
    <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-registry-elastic</artifactId>
    </dependency>

And configuration on my code:

management.metrics.distribution.percentiles-histogram.http.server.requests=true
management.metrics.distribution.sla.http.server.requests=100ms, 400ms, 500ms, 2000ms
management.metrics.distribution.percentiles.http.server.requests=0.5, 0.9, 0.95, 0.99
management.elastic.metrics.export.host=http://myelastic:9200
management.elastic.metrics.export.index=metricsapp

I am able to send metrics to ElasticSearch backend, but just ElasticSearch, not APM.

From ElasticSearch Index, I am able to build Kibana dashboards that look like this:

enter image description here

I am also able to send traces, not metrics, to ElasticSearch APM using endpoint http://myelastic:8200, and I am able to see traces (not metrics) in ElasticSearch APM (not just ElasticSearch) like this:

enter image description here

Question:

ElasticSearch APM claims to work not only for traces but also for metrics, quote from their official website: "Simplify infrastructure monitoring and metrics collection at scale."

Yet, with the current setup, APM is not able to pick the metrics (it only picks the traces) If I change the URL management.elastic.metrics.export.host=http://myelastic:8200, not seeing metrics in APM either.

How to see the metrics in APM?

PatPanda
  • 3,644
  • 9
  • 58
  • 154

0 Answers0