Questions tagged [micrometer]

micrometer is a facade to log different kind of metrics to data sinks of multiple vendors.

https://micrometer.io/

Think SLF4J, but for metrics.

Contains built-in support for Prometheus, Netflix Atlas, CloudWatch, Datadog, Graphite, Ganglia, JMX, Influx/Telegraf, New Relic, StatsD, SignalFx, and Wavefront.

563 questions
28
votes
3 answers

Spring Boot 3 Micrometer Tracing Example

If I understand the answer to this question correctly, Spring Cloud Sleuth will be replaced by Micormeter Tracing with Spring Boot 3. My experiments with Spring Boot 3 milestone 3 to implement tracing have failed so far. Is there an example project…
stse
  • 281
  • 1
  • 3
  • 6
20
votes
3 answers

Where does Micrometer fit in OpenTelemetry project

With OpenTelemetry trying to become the de-facto standard for Observability of applications/services, where does Micrometer fit in? Micrometer website claims that it is SLF4J for metrics, but does it not contradict OpenTelemetry's Metrics APIs? I…
Niranjan
  • 2,601
  • 8
  • 43
  • 54
20
votes
2 answers

Dynamic tag values for the Counter metric in Micrometer

Newbie here, trying to learn more about the micrometer. I'm currently exploring ways on how to accomplish this: I'm using Spring boot 2 with actuator and micrometer enabled. Consider the following class: @Component class MyService { @Autowired …
Vimalraj Selvam
  • 2,155
  • 3
  • 23
  • 52
17
votes
3 answers

Spring Boot Actuator/Micrometer Metrics Disable Some

Is there a way to turn off some of the returned metric values in Actuator/Micrometer? Looking at them now I'm seeing around 1000 and would like to whittle them down to a select few say 100 to actually be sent to our registry.
Joel Holmes
  • 943
  • 2
  • 12
  • 23
14
votes
2 answers

custom path for prometheus actuator

I am currently trying to migrate our prometheus lib to spring boot 2.0.3.RELEASE. We use a custom path for prometheus and so far we use a work around to ensure this. As there is the possibility for a custom path for the info- and health-endpoint,…
Ruth
  • 856
  • 2
  • 13
  • 26
14
votes
2 answers

Adding 'mean', 'min' or 'percentiles' to Spring Boot 2 metrics?

I am using the new MicroMeter metrics in Spring Boot 2 version 2.0.0-RELEASE. When publishing metrics over the /actuator/metrics/{metric.name} endpoint, i get the following: For a DistributionSummary : "name": "sources.ingestion.rate", …
gotson
  • 3,613
  • 1
  • 23
  • 40
13
votes
3 answers

Spring-boot micrometer timer() how does it work?

I am new to using spring-boot metrics and started with micrometer. I couldn't find good examples(the fact that its new) for performing timer Metrics in my spring-boot app. I am using spring-boot-starter-web:2.0.2.RELEASE dependency . But running…
anonymous-explorer
  • 365
  • 1
  • 12
  • 26
13
votes
6 answers

Micrometer - Prometheus Gauge displays NaN

I am trying to generate Prometheus metrics with using Micrometer.io with Spring Boot 2.0.0.RELEASE. When I am trying to expose the size of a List as Gauge, it keeps displaying NaN. In the documentation it says that; It is your responsibility to…
13
votes
7 answers

How to use Micrometer Timer to record duration of async method (returns Mono or Flux)

I'd like to use Micrometer to record the execution time of an async method when it eventually happens. Is there a recommended way to do this? Example: Kafka Replying Template. I want to record the time it takes to actually execute the…
Mark
  • 4,970
  • 5
  • 42
  • 66
12
votes
3 answers

@Timed not working despite registering TimedAspect explicitly - spring boot 2.1

I need to measure method-metrics using micrometer @Timed annotation. As it doesn't work on arbitrary methods; i added the configuration of @TimedAspect explicitly in my spring config. Have referred to this post for exact config Note: have tried…
Rahul
  • 131
  • 1
  • 1
  • 5
11
votes
4 answers

How to define additional or custom tags for default Spring Boot 2 metrics?

Recently I switched to Spring Boot 2 with Micrometer. As I got these shiny new metrics, I talked with our DevOps guys and we started exporting them to Telegraf. To distinguish between different applications and application nodes, we decided to use…
stepio
  • 865
  • 2
  • 9
  • 22
11
votes
2 answers

Micrometer's equivalent of Prometheus' labels

I'm transforming a Spring Boot application from Spring Boot 1 (with the Prometheus Simpleclient) to Spring Boot 2 (which uses Micrometer). I'm stumped at transforming the labels we have with Spring Boot 1 and Prometheus to concepts in Micrometer.…
Martin Schröder
  • 4,176
  • 7
  • 47
  • 81
10
votes
1 answer

How to update MicroMeter gauge according to labels

I use MicroMeter gauges in a Spring Boot 2 application to track statuses of objects. On status change, the statusArrived() method is called. This function should update the gauge related to that object. Here is my current implementation: public…
neophat
  • 187
  • 1
  • 10
10
votes
3 answers

In Spring Boot, how to reset the metrics registry before each test?

I have tests and want to make assertions against micrometer metrics, but the tests run in random order so I want to reset or clear all the micrometer metrics before each test so my assertion are always correct.
lfmunoz
  • 822
  • 1
  • 9
  • 16
9
votes
2 answers
1
2 3
37 38