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

Springboot 3 + Micrometer Tracing: Tracer.currentSpan() null randomly while processing parallel GRPC calls

The value of io.micrometer.tracing.Tracer.currentSpan() becomes null for random calls at the server end. This happens when hitting the server with multiple parallel calls, and not if calls are made sequentially. This is the stack trace at server…
3
votes
1 answer

Can I continue using brave headers in spring boot 3 with micrometer

I started migrating to spring boot 3, and also spring-cloud-sleuth to micrometer (https://github.com/micrometer-metrics/tracing/wiki/Spring-Cloud-Sleuth-3.1-Migration-Guide#samples). Added this dependecies:
3
votes
1 answer

Spring Boot 3 RestTemplate-HttpComponentsClientHttpRequestFactory incomaptible with org.apache.http.client.HttpClient

HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient); 'HttpComponentsClientHttpRequestFactory(org.apache.hc.client5.http.classic.HttpClient)' in…
3
votes
0 answers

Use dropwizard metrics with spring boot metrics

is it possible to use dropwizard metrics with spring boot 2+ metrics? Try to migrate from boot 1 to boot 2, but have some logic written based on dropwizard from boot 1, dont wanna refactor it. Want to use MetricRegistry and Clock, Histogram, etc.…
mrCooger
  • 31
  • 1
3
votes
0 answers

How to enable StatsD in Spring Boot?

I have Spring Boot 2.5.2 and I am trying to send StatsD metrics to Datadog. However, that didn't work for me. So I wrote a single python script to check if my application is sending any data or…
Saif
  • 2,530
  • 3
  • 27
  • 45
3
votes
1 answer

Show metrics in Grafana from the Kubernetes Pod that was scraped last by Prometheus

Context We have a Spring Boot application, deployed into K8s cluster (with 2 instances) configured with Micrometer exporter for Prometheus and visualization in Grafana. My custom metrics I've implemented couple of additional Micrometer metrics, that…
3
votes
0 answers

Spring kafka consumer lag metric is always 0

we're building a monitoring system for our Spring Boot application using micrometer. Metrics gathered are published to an Elasticsearch instance through micrometer-registry-elastic. Everything is fine, except…
3
votes
1 answer

Track no of logged in users as micrometer metric?

I have spring boot application and I want to track no of logged in users using a metric ( I am using micrometer ) . My idea was to track /login rest call which we have and increment a guage. However I don't have a solution to decrease metric ( gauge…
Viraj
  • 5,083
  • 6
  • 35
  • 76
3
votes
1 answer

Integrate Spring Boot Actuator with New Relic

I am trying to integrate New Relic with Spring Boot actuator. Most of the tutorials and response in StackOverflow itself suggest to use New Relic Java Agent but as per Spring Boot documentation installing Java Agent is not mandatory (unless I…
nicholasnet
  • 2,117
  • 2
  • 24
  • 46
3
votes
1 answer

How to set up Spring Boot to make component metered without adding @Timed to each class, but rather specifying already used annotations like @Service

I have a Spring Boot application, full of endpoints (i.e. @Controller's) and @Service's with @Repository's behind them. I'd like to make all of them to export the timed metrics to Micrometer. At some point I'd like to disable them all too. At some…
Eljah
  • 4,188
  • 4
  • 41
  • 85
3
votes
1 answer

How to configure spring-micrometer tags

This blog post "Micrometer: Spring Boot 2's new application metrics collector", mentions "The importance of dimensionality". However, it doesn't include a sufficient example of how the associated tags can be set within a Spring Boot…
Brent Bradburn
  • 51,587
  • 17
  • 154
  • 173
3
votes
2 answers

How to resolve java.lang.ClassNotFoundException: org.aspectj.lang.ProceedingJoinPoint exception?

Hey guys I am getting the following error on Spring-Boot when running an App I have: java.lang.IllegalStateException: Failed to load ApplicationContext at…
3
votes
0 answers

How to specify a meter filter to spring actuator metrics endpoint?

In application.properties I've added value for endpoints.metrics.path. It works, but it returns json containing lots of metrics including jvm, tomcat, logback etc., gauge and counter for every endpoint that is called during runtime. I would like to…
3
votes
0 answers

Collecting business metrics with Spring Boot

I am working on a Spring Boot web application project, and I want to be able to collect, and present, some business and performance metrics. For example: What is the mean time that a certain endpoint takes to finish its processing? What are the…
3
votes
1 answer

spring batch: alert with grafana & prometheus if a job failed in the last xx minutes

I am using spring batch (4.2.2.RELEASE) together with the spring actuator (2.2.6 RELEASE). Since version 4.2, spring batch provides support for batch monitoring and metrics based on micrometer…