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
1
vote
1 answer

Aggregate metric with unique id over defined time period in micrometer?

In spring-boot metrics ( with micromter and prometheous ) I can get no of log events for each threshold as follows. HELP logback_events_total Number of error level events that made it to the logs TYPE logback_events_total…
Viraj
  • 5,083
  • 6
  • 35
  • 76
1
vote
0 answers

Grafana Alerting - Send an alert notification per new condition check for Spring-Boot Prometheus metrics

I am trying to create alerts using Grafana for Spring Boot metrics scraped from Prometheus. The use-case is to alert for exceptions thrown from each service. I'm using the http_server_requests_seconds_count metric and mentioned below is the…
1
vote
1 answer

How to fix issue with karate-core not working with spring boot 2.5.0 due to clash MongoMetricsConnectionPoolListener

I have a spring boot project that uses actuator that I am testing using karate. I recently attempted to update my project from using spring boot 2.4.5 to 2.5.0. Since making the change my tests are now failing with the following error: …
1
vote
0 answers

Kafka metrics not exported / not updating

I'm trying to monitor kafka lag that is exposed via prometheus kafka_consumer_fetch_manager_records_lag_max, but the value is always either 0 or NaN Config factory.addListener(new MicrometerProducerListener<>(meterRegistry)); factory.addListener(new…
user3960875
  • 965
  • 1
  • 13
  • 24
1
vote
1 answer

Spring Actuator Metrics preserve "dot" in tags

I'm creating tags in my metrics exporter, in this way: metrics: export: elastic: host: "xx" index: "metricbeat-k8s-apps" user-name: "elastic" password: "xx" step: 30s connect-timeout: 10s …
1
vote
1 answer

How to configure additional tags depending on metric name for actuator metrics

Is there anyway I can configure what tags to add to @Timed metrics? I know overriding MebMvcTagsProvider or WebMvcTagsContributor classes will return a standard set of tags common for all mvc metrics. But is there any way I can exclude or include…
1
vote
0 answers

How to use Tags from Body in WebFluxTagsProvider

I am attempting to get an element from my body as a tag to the http.requests metrics. I attempted to use the WebFluxTagProvider but it wants an Iterable when the information is coming from the ServerWebExchange request body which is a…
1
vote
1 answer

Apache Kafka JMX Metrics with Spring Boot

All, I have a requirement to expose the Apache Kafka metrics to the spring boot (v 2.3.0.RELEASE) actuator endpoint. Please note, I am NOT using spring-kafka library . I am using the following libraries
1
vote
0 answers

Spring boot micrometer metrics mbean suffixed with type=timers

I have spring boot app with some classes annotated as timed from micrometer. the layout is that it uses telegraph to send metrics to graphite. Did not go with custom metrics or actual declaration of Timers anywhere in the code, just simple "timed"…
PK0513
  • 57
  • 10
1
vote
0 answers

Spring actuator not logging health endpoint

I am having trouble with Actuator, where I want to get metrics on how many health check requests were made. This does not show in the http://localhost:9090/system/metrics/http.server.requests I did not find any reason why it shouldn't, and I haven't…
Gleeb
  • 10,773
  • 26
  • 92
  • 135
1
vote
1 answer

Spring Boot metrics for Prometheus using Micrometer or Spring Metrics

I am building a Spring Boot application and planning to use the /actuator/prometheus for data scraping by Prometheus. It seems that the main way is to use Micrometer. However, I see that there is another library, which is Spring Metrics. What is the…
WeiTang Lau
  • 103
  • 1
  • 11
1
vote
1 answer

For the project with camunda-bpm-spring-boot-starter-rest hibernate properties affects the metrics, output is not working properly (only partially)

The Spring Boot application uses camunda-bpm-spring-boot-starter-rest that supplies the Hibernate/Entity Manager to the application. In order to set up the Spring Boot Actuator Prometheus (Actuator) Metrics, we have added this line to our…
1
vote
1 answer

How to output Apache Camel metrics like metrics:timer:simple.timer to Prometheus using Micrometer format with /actuator/prometheus

Based on the Camel's metrics documentation, I'd like to meter 2 different timers within one route: @Override public void configure() { from( getMqttRouteConfiguration( sourceId, mqttHost,…
1
vote
1 answer

Prometheus query by label with range vectors

I'm defining a lot of counters in my app (using java micrometer) and in order to trigger alerts I tag the counters which I want to monitor with "error":"alert" so a query like {error="alert"} will generate multiple range vectors: …
user1934513
  • 693
  • 4
  • 21
1
vote
1 answer

Resolving POST /** request URL to full request URL using micrometer

With the micro-service architecture I have written a generic POST request handler which is consumed by all the micro-services. The post mapping in spring look like this: @RestController @RequestMapping(value = "/v1/", consumes =…