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
2
votes
1 answer

Add tags for Spring webclient default metrics

I'm currently working on a Spring webflux project that has Actuator, Micrometer dependencies as follows, io.micrometer micrometer-registry-prometheus
2
votes
0 answers

Track the time taken between two requests using Prometheus

From what I read, I understood that I can go with Histogram metric type if I want to measure the time taken of a single request. But If I want to measure the time taken between two different requests, which approach I can go with? for example, let's…
2
votes
0 answers

feign.Client metric is not capturing ResponseCode

i want to capture responseCode metric using feign client. i am able to capture metrics using feign Client but it is capturing only method,host and client metric. i.e # TYPE feign_Feign_seconds_max…
2
votes
1 answer

Confusion about micrometer metrics - Isn't the gauge supposed to calculate the value automatically just before it is submitted?

I am exploring micrometer and aws cloudwatch. I think there is some understanding gap - I've create a gauge which is supposed to return the number of connections being used in a connection pool. public MetricService(CloudWatchConfig config) { …
2
votes
1 answer

Java Micrometer - What to do with metrics of type *_bucket

Quick question regarding metrics of type *_bucket please. My application generates metrics, like those below: # HELP http_server_requests_seconds # TYPE http_server_requests_seconds…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
2
votes
1 answer

How to make sense of the micrometer metrics using SpringBoot 2, InfluxDB and Grafana?

I'm trying to configure a SpringBoot application to export metrics to InfluxDB to visualise them using a Grafana dashboard. I'm using this dashboard as an example which uses Prometheus as a backend. For some metrics I have no problem figuring out…
Juan Vega
  • 1,030
  • 1
  • 16
  • 32
2
votes
1 answer

CPU metrics in Grafana for Spring Webflux app with Actuator Micrometer and Prometheus

Small question on how to build visual and insight on CPU metrics please. I have a Spring Boot Webflux app, nothing extraordinary. I bring in the Actuator, Micrometer and Prometheus dependencies. The app have out of the box metrics for CPU, which I…
2
votes
0 answers

QueryDSL integration with micrometer

We wanted to integrate queryDSL with micrometer. I search for different solutions. However, haven't able to figure out how to get metrics of DB query execution time. We could use @Timed annotations above the method but that will provide metrics for…
GauravRatnawat
  • 717
  • 1
  • 11
  • 25
2
votes
1 answer

How to solve "java.lang.illegalargumentexception collector already registered that provides name"?

How to solve "java.lang.illegalargumentexception collector already registered that provides name" ? Meter registry class is below : @Configuration public class RegistryConfig { @Bean public MeterRegistryCustomizer
2
votes
2 answers

Spring boot 2.3.4 - Kafka metrics are not visible in /actuator/prometheus

I have a spring boot application (version 2.3.4) and I'm using @KafkaListener to consume records. I also use actuator and micrometer (version 1.5.5) for the metrics. The problem is that I can't see the Kafka metrics in /actuator/prometheus. I'm…
2
votes
0 answers

Creating micrometer histogram with min value as 0.01 and max value as 1

I am trying to create a micrometer histogram with min value as 0.1 and max value as 1 and with 10 buckets. I tried to configure the above properties using below config but it is not giving me the buckets less than…
Anky
  • 111
  • 15
2
votes
0 answers

Exception caught by @ExceptionHandler is not recorded by MetricsWebFilter

Trying to migrate from web-mvc to webflux+coroutines. Faced a problem with http.server.requests metric recording. With web-mvc, when using @RestController, @RestControllerAdvice with multiple @ExceptionHandler, I got exception classes recorded in…
2
votes
2 answers

Micrometer-springboot: Hikaricp , Tomcat and jdbc metrics are not exported to DataDog

Hikaricp , Tomcat and jdbc metrics are not being exported to DataDog we have setup springboot app to push the metrics to datadoghq, it does export 60 metrics, however the metrics like hikaricp, tomcat and jdbc are missing. hikaricp, tomcat and jdbc…
2
votes
1 answer

PromQl: alert on first value of a counter

I have a prometheus counter (spring_batch_job_seconds_count{status=~'FAILED'}) that counts job failures. I want to graph job failures over time and alert on job failures. The increase function gives me what I want except for the first occurrence. …
David Lewine
  • 101
  • 2
  • 12
2
votes
1 answer

Micrometer @Timed annotation write logs to file?

How to configure spring-boot Micrometer @Timed annotation to write logs into some log file instead of endpoint?
Taras
  • 409
  • 4
  • 18