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
0 answers

How can I prevent Micrometer from adding _total suffix to Counter metric name

In my code I define my custom (counter) metric as follows: Counter.builder("request_count") .tags("method","GET") .tags("path","/my/test/path") .register(meterRegistry) .increment(); You'll note the…
Giles Thompson
  • 1,097
  • 1
  • 9
  • 24
1
vote
2 answers

Distributed tracing with kafka spring boot 3 and opentelemetry not working

I wanted to try out tracing between a spring boot 3 Kafka producer and consumer. I followed the examples from https://spring.io/blog/2022/10/12/observability-with-spring-boot-3 The traceID is added automatically when I make an API call using…
1
vote
0 answers

Different Trace Id while using Feign client in Distributed Tracing

I implementing Distributed tracing in microservices. I'm using feign client for inter service communication and using micrometer for tracing. But I'm getting different trace id when I call Service B from Service A using feign Client. I read a lot of…
1
vote
1 answer

Log metrics in Springboot applicaiton using LoggingMeterRegistry

I have some metrics being created in my springboot application and want to log the details of the metrics in a specific format as below: 2018-07-06 17:00:28,884 [metrics-logger-reporter-thread-1] [INFO] (com.codahale.metrics.Slf4jReporter)…
1
vote
0 answers

How to set signalfx.accessToken in spring application

I have have tried pushing custom metrics to splunk apm using below dependency and setting the properties using springboot application io.micrometer
1
vote
0 answers

SpringBoot - Micrometer Composite Registry order changes behavior of /actuator/metrics/ page

I have three micrometer registries created as beans 0 = {InfluxMeterRegistry@7201} 1 = {AutoConfiguredCompositeMeterRegistry@7339} 2 = {PrometheusMeterRegistry@7330} One of my classes gets injected with the @Primary MeterRegistry…
Vladimir
  • 1,120
  • 2
  • 11
  • 18
1
vote
1 answer

Micrometer prometheus registry clubbing 404 URIs as /**

We are using micrometer-prometheus-registry, metrics are coming fine but for 404 not found exceptions on service we are getting: http_server_requests_seconds_count{exception="None",method="GET",outcome="CLIENT_ERROR",status="404",uri="/**",}…
Ahsan Naseem
  • 1,046
  • 1
  • 19
  • 38
1
vote
1 answer

http_server_requests_seconds_max metrics in spring mvc - using micrometer

I have a spring mvc web application with REST endpoints. I am integrating with prometheus for generating metrics. I have exposed "/prometheus" endpoint and am able to capture jvm matrics and log4j2 matrcis but stuck on how to generate http request…
1
vote
0 answers

Make custom request metrics at Spring Webflux

I have to make next metrics for all http requests of Spring Webflux app: time from receiving a request to being laid to the request pool waiting time for processing in the pool request processing time (untill the response sending) I found class…
strelchm
  • 73
  • 7
1
vote
0 answers

How to integrate micrometer @Timed with prometheus in async service method in springboot application

Have written a springboot application, and wanted to measure the time taken to execute a method using @Timed annotation from micrometer, and display this value in prometheus. Have tried below configuration, however the execution time is not…
1
vote
0 answers

Service, host_name, process_id, runtime information is not available in signalfx when using micrometer for pushing custom metrics

I am trying to send custom metrics to Splunk APM using micrometer dependencies. after adding the dependencies and setting the application properties I am Seeing metrics in the APM dashboard but Service, host_name, process_id, and runtime information…
1
vote
1 answer

How to use Micrometer to measure the duration of an async method called from a controller method

I have to measure the full time of the request, that comes into controller and then the async method is executed of some service: @RestController public class HelloController { @Autowired private SomeService someService; …
Georgii Lvov
  • 1,771
  • 1
  • 3
  • 17
1
vote
2 answers

Stop sending Spring boot metrics to Prometheus with Micrometer

I have a Spring boot application where I am sending custom metrics generated within the service to Prometheus via Pushgateway. I am using Prometheus Pushgateway with Micrometer, mainly based on this tutorial:…
1
vote
1 answer

Creating Custom gauge metrics with description and base unit

I have created my own gauge metrics and exposed them. Below is the snapshot showing my code. Now I cannot set description and base unit of metrics using this way. int rate = (int) ((finPoint - initPoint)/Constants.TIME_IN_MINS); …
1
vote
0 answers

Spring Kafka monitoring in Grafana

As showcased in the following https://docs.spring.io/spring-kafka/docs/current/reference/html/#micrometer and https://docs.spring.io/spring-kafka/docs/current/reference/html/#streams-micrometer, Spring Kafka exposes various metrics via…
Jeremy
  • 31
  • 5