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

Micrometer filter is ignored with CompositeMeterRegistry

I use Spring Boot 2.1.2.RELEASE, and I try to use Micrometer with CompositeMeterRegistry. My goal is to publish some selected meters to ElasticSearch. The code below shows my sample config. The problem is, that the filter is completely ignored (so…
2
votes
1 answer

Setting common tags with Micrometer for InfluxDB metrics

I have a separate module which contains common classes. Two of the classes are setting up common tags for metrics for our services. When I start the service the metrics (counters) are sent to the InfluxDb, but the common tags, that are set in…
daniyel
  • 652
  • 10
  • 28
2
votes
2 answers

Datadog event using micrometer

I am utilizing DogStatsD approach to send metrics to datadog using micrometer. I get the normal metrics like counter and gauge but I am not able to generate events. Is there a way to generate datadog events?
Mark
  • 833
  • 1
  • 9
  • 27
2
votes
1 answer

Unable to see RestTemplate metrics using micrometer

Unable to see the RestTemplate metrics on springboot 2 micrometer. @Bean public RestTemplate restTemplate() { RestTemplate restTemplate = new RestTemplateBuilder().build(); restTemplate.setRequestFactory(getClientHttpRequestFactory()); …
user3221430
  • 71
  • 1
  • 6
2
votes
1 answer

querying data with micrometer

We have this fancy monitoring system to which our spring-boot services are posting metrics to an influx DB with micrometer. There's a nice grafana frontend, but the problem is that we're now at a stage where we have to have some of these metrics…
UncleBob
  • 1,233
  • 3
  • 15
  • 33
2
votes
4 answers

Spring Boot 2 Actuator doesnt publish jvm metric

I am running a Spring Boot 2 Application and added the actuator spring boot starter dependency. I enabled all web endpoints and then called: http://localhost:8080/actuator/metrics result is: { "names": ["jdbc.connections.active", …
2
votes
1 answer

Micrometer With Microservice

I am newbie to micrometer. could anyone let me know how to manage microservice metrics centrally in spring boot ? Where i can get all registered service information and matrices and stored metrics in influxdb ?
Bhargav Patel
  • 1,098
  • 10
  • 23
1
vote
1 answer

TracingClientHttpRequestInterceptor equivalent for Apache http client

I've been attempting to set up distributed tracing using Spring Micrometer. To propagate the traceId across various services, it appears necessary to configure our HTTP clients to include this information in the headers. For the RestTemplate client,…
1
vote
0 answers

Improperly tagged metrics when using Swagger/OpenAPI codegen with a RestTemplate

My team generates some Java code using RestTemplates from an OpenAPI spec using the maven plugins for this. We have used both the swagger-codegen-maven-plugin and openapi-generator-maven-plugin which both seem to generate approximately the same…
1
vote
0 answers

Pause SpringBoot application on shutdown so Prometheus can gather metrics

Prometheus gathers metrics of a SpringBoot application every 15 seconds. We use micrometer for producing the metrics. If the application is shut down (pod restart etc.), we might loose metrics data of the last 15s. This might be bearable.…
1
vote
1 answer

Why is Tracer.getCurrentSpan() not working in spring cloud gateway after switching from sleuth to micrometer

Tracer.getCurrentSpan() does return null in my globalFilter on a spring cloud gateway service after i've switched from spring cloud sleuth to micrometer tracing. I'm using spring boot 3.1.x, micrometer-tracing 1.1.2 and…
1
vote
1 answer

Spring Boot upgrade to Spring Boot 2.7.11 failing with java.lang.NoSuchMethodError for PrometheusMetricsExportAutoConfiguration

Getting the below Exception while trying to upgrade to spring boot version 2.7.11 fro existing Spring Boot version 2.2.6.RELEASE Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name…
1
vote
1 answer

How to fetch out of box metrics tag value and reuse them in micrometer

I am new to micrometer,so question might be silly.I am using spring actutator with prometheus to register metrics. I am done with the integration, able to fetch metrics in the console with http://localhost:8080/actuator/prometheus Now the…
ABhadauria
  • 59
  • 8
1
vote
0 answers

Spring Boot 3 WebFlux lacks http metrics

I've got a Spring Boot 3 WebFlux application which has actuator on the classpath with enabled metrics. However, going to /actuator/prometheus I can't see the http.metrics. I realize that there were some changes, however those metrics should be out…
ashur
  • 4,177
  • 14
  • 53
  • 85
1
vote
0 answers

Why don't Hibernate 2nd level cache metrics appear under `cache_gets_total` data but well in `hibernate_second_level_cache_requests_total`?

Here is the plan: Showing my Spring boot cache metrics to Prometheus with the stack Hibernate 6, Spring boot 3, Ehcache 3, Micrometer and Prometheus. I have two types of cache (they share the same ehcache.xml file): Classic cache linked to a http…