Questions tagged [spring-micrometer]

Micrometer is the metrics collection facility included in Spring Boot 2’s Actuator. It has also been backported to Spring Boot 1.5, 1.4, and 1.3 with the addition of another dependency.

About

Micrometer is a dimensional-first metrics collection facade whose aim is to allow you to time, count, and gauge your code with a vendor neutral API. Through classpath and configuration, you may select one or several monitoring systems to export your metrics data to. Think of it like SLF4J, but for metrics!

Links

357 questions
8
votes
1 answer

Spring boot with micrometer Elasticsearch registry indexes only empty documents

I have a simple spring boot 2.1.7.RELEASE project using micrometer Elasticsearch registry (using Elasticsearch 7.2.0). The project is available here on github. It has only two classes and looks like this pom.xml has the following…
7
votes
3 answers

Micrometer gauge never gets updated

I'm trying to build a custom gauge for micrometer which should monitor custom ThreadPoolTaskExecutor. The problem is that the gauge values are stays the same and never get updated since application start. However executer statistics (which can be…
AnMi
  • 223
  • 1
  • 3
  • 10
7
votes
1 answer

Is there a way to capture the Micrometer @Timed annotation into the Prometheus metrics store/registry?

I want to capture the data from Micrometer's @Timed annotation into the Prometheus metrics store/registry. I can't find any explanations on how to do this online. These are the versions I am using: compile…
G Lor
  • 205
  • 2
  • 3
  • 10
6
votes
1 answer

Use Micrometer with OpenFeign in spring-boot application

The OpenApi documentation says that it supports micrometer. How does the integration works? I could not find anything except this little documentation. I have a FeignClient in a spring boot application @FeignClient(name = "SomeService", url = "xxx",…
Marius
  • 365
  • 4
  • 18
6
votes
3 answers

Are counters thread safe in Micrometer

I am trying to publish number of events my App is processing. This is the code I have at the receiving end: public void process(List batch) { logger.info ("Processing batch of size " + batch.size()) …
NewUser
  • 3,729
  • 10
  • 57
  • 79
6
votes
1 answer

How do I get templated values in uri tag for http-client-requests metrics using Spring-Boot's RestTemplate?

We are using Spring Boot 2.1.4 and the micrometer-registry-prometheus dependency to capture metrics. We have a case where a Spring Boot service uses a RestTemplate to call out to another service. The metrics being generated by this call contain the…
6
votes
1 answer

Is there anyway to get http.client.requests metrics from AsyncResttemplate?

I'm trying to monitor rest template metrics for my spring boot application via micrometer & prometheus. When I use Resttemplate built with ResttemplateBuilder and use to call for another api, it did get the expected http.client.requests metrics. But…
6
votes
1 answer

Nullpointer in Spring Boot 2 Actuator Starter w. TomcatMetrics

I have recently upgraded our system from Spring Boot 1.5 to 2.1.3 and added the spring-boot-starter-actuator. Apparently, something is misconfigured, as there is a NullPointerException in…
fsperrle
  • 1,262
  • 1
  • 14
  • 26
6
votes
4 answers

Including spring boot endpoint path variable as a metric dimension

I have api endpoint : /user/{tenant}/create I am using spring boot 2 with micrometer for metrics. By default @Timer annotation for spring boot 2 endpoint includes the following tags: exception,method, uri, status I want to add the passed value for…
Rohan Shetty
  • 227
  • 2
  • 9
5
votes
0 answers

Custom Async Executor with Tracing in Spring Boot 3

I'm migrating a Spring Boot project to version 3. The project uses asynchronous task and tracing. Following the documentation on Micrometer GitHub wiki, we tried to define the Async executor like that: @Configuration(proxyBeanMethods =…
5
votes
0 answers

Is there a Hibernate Metrics micrometer available to capture Hibernate/JPA SQL Statements, min, max time

HibernateMetrics expose via spring boot actuator does not to capture the SQL statements. The SQL statements are needed to analyze individual query execution plan. new HibernateMetrics(sessionFactory, "myapp",…
user2891237
  • 71
  • 2
  • 7
5
votes
0 answers

kafka producer metrics not exposed on http endpoint with Actuator

I'm using Spring boot 2, Kafka 2.1.4 and I want to expose the kafka Producer metrics in the actuator/metrics endpoint of spring boot actuator pom.xml org.springframework.boot
5
votes
3 answers

Why do reading Micrometer measurement returns NaN sometimes?

I'm trying to programmatically read the Meters as follows: Get registry: MeterRegistry registry = Metrics.globalRegistry.getRegistries().iterator().next(); Read measurement: double systemCpuUsage =…
IsaacLevon
  • 2,260
  • 4
  • 41
  • 83
5
votes
1 answer

MicroMeter: remove/disable a certain tag

I'm using the default MicroMeter binders, one of them creating the Gauage jvm.memory.used. The issue is that it comes with 2 availableTags: "area" and "id". This is practically generating 6 Gauges which I'm not interested in. I was able to do…
5
votes
1 answer

How to use the same Counter object for multiple metric names using different tags

I want to record counts for multiple metric names like metricA, metricB, metricC so on and so forth. One option is to create multiple counter objects like this Counter .builder("metricA") .register(registry); However, this is going to lead to a lot…
Hary
  • 1,127
  • 4
  • 24
  • 51
1
2
3
23 24