440 questions
3
votes
1
answer
104
views
No longer see trace/span IDs after upgrading to spring boot 4
After upgrading to Spring Boot 4 I don't see any span/trace ids in my logs where I used to
@GetMapping
fun hello(): String {
logger.info("Hello World!")
return "Hello World!&...
0
votes
1
answer
180
views
SpringBoot Reactive (Webclient) - TraceId not propagated to reactor?
I'm working on a Spring Boot application using Spring WebFlux with reactive WebClient and Micrometer for tracing. While tracing works correctly in the imperative (servlet) stack, the trace context (...
1
vote
0
answers
66
views
Spring boot kafka listener observation enrichment
I've a kafka based spring boot application (Micrometer + Otel) which consumes a lot of events from a lot of kafka topics and publishes its output on another set of kafka topics.
I want to enrich the ...
0
votes
1
answer
60
views
Spring Boot Actuator 'http.server.requests' metric MIN time
The actuator endpoint /actuator/metrics/http.server.requests can exhibit this informations:
{
"name": "http.server.requests",
"baseUnit": "seconds",
"...
0
votes
1
answer
224
views
micrometer tracing exporter autoconfiguration
Is there any autoconfiguration for OtlpGrpcSpanExporter? I see OpenTelemetryAutoConfiguration class in spring boot actuator but there's no autoconfiguration for exporter. Is it necessary to define a ...
0
votes
0
answers
132
views
Failed to send metrics to datadog: Payload too big
I'm using Micrometer 1.12.13 in a Spring Boot 3 project, with spring boot auto configured DatadogMeterRegistry to export metrics. My code looks like this:
MeterRegistry.counter("metric-name",...
1
vote
1
answer
185
views
how to use percentiles-histogram without risk of high cardinality and human-usable buckets?
I created my own advices in springboot 1 to monitor our apps, and only now try to learn what new versions of springboot offer(currently working with 3.3.1, but will move on to later version later), ...
-2
votes
1
answer
448
views
How to send metrics to Prometheus using Spring Boot 3.5, Micrometer, using Pushgateway, i.e. without scraping
I have a Spring Boot application that needs to send metrics to Prometheus, but I can't use the traditional scraping approach because my application runs in an environment where Prometheus can't reach ...
1
vote
1
answer
86
views
How can I get the start and stop times from an Observation which was run?
I have full control over an observation in my code:
Observation observation = Observation.createNotStarted("something", observationRegistry)
observation.observe(() -> doSomething(...
0
votes
1
answer
222
views
micrometer-registry-prometheus not showing exemplars
I would like to send metrics with exemplars using Spring Boot and Micrometer.
Part of the pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId&...
1
vote
1
answer
248
views
Where can I find the place where Spring Boot kafka listener is setting the TraceId?
I'm searching for the file where Spring Boot Kafka listener is placing en deciding if the TraceId is collected from the header or it has to create a new one. I have debugged now for many hours but can'...
0
votes
1
answer
204
views
Propagate new micrometer tracing context to Reactor Mono
Processing the message from SQS - which has initial traceId in the message and wanted to use the same traceId while processing the message, but unable to reset the traceId in the tracing context. we ...
-1
votes
1
answer
178
views
Tracing per endpoint using Spring Boot and micrometer
I have a REST API which exposes two endpoints.
Endpoint 1 is a low traffic, but mission critical. We need to trace everything from the controller layer all the way to the repository.
Endpoint 2 has ...
-1
votes
1
answer
148
views
Spotbugs + Java: EI_EXPOSE_REP2 may expose internal representation by storing an externally mutable object into MyService.observationRegistry [closed]
Small question regarding a Spotbugs finding I am having a hard time fixing.
In this super simple class:
import io.micrometer.observation.ObservationRegistry;
@Service
public final class MyService {
...
0
votes
1
answer
81
views
Is there way to persist traces on a disk instead of sending them to Zipkin?
I have spring boot 3.4 application configured for metrics.
I've added dependencies:
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io....
0
votes
1
answer
117
views
How to put argument values to traces of method annotated with @Observed
I have a method annotated with @Observed annotation:
@Observed(
name = "foo",
contextualName = "foo",
)
fun foo(arg1: String, arg2: Integer){...}
When I go to Zipkin I see ...
0
votes
1
answer
355
views
What is micrometer performance impact/overhead for tracing? Is it performance safe to have enabled tracing in production?
I try to add observability support to my spring boot 3 application and I've found out that by default there only 10% of traces are collected. To collect all traces I've added following config
...
-1
votes
1
answer
510
views
What is "Baggage" in spring boot tracing?
I read spring boot documentaion about observability and see the section about Baggage
You can create baggage with the Tracer API:
@Component
class CreatingBaggage {
private final Tracer tracer;
...
1
vote
0
answers
121
views
Spring Webflux + Micrometer: difference between .tap(Micrometer.observation(observationRegistry)) before and after the operation to measure
I would like to generate metrics (time) and traces for a reactive operation.
Here is the reactive operation, very straightforward:
@GetMapping("/question")
Flux<String> ...
1
vote
1
answer
1k
views
Micrometer tracing: Propagate context to spring batch (spring boot 3) SimpleAsyncTaskExecutor tasks
I use Spring Boot 3, Spring Batch and micrometer for tracing.
I would like the trace id to be the same across all the parent and child flows and steps.
So I would like to propagate the context ...
1
vote
1
answer
199
views
Baggage field isn't propagated from EventListener of ApplicationReadyEvent
I have the following demo application Spring Boot 3.4.2:
@SpringBootApplication
@RestController
public class BaggageTestApplication {
public static void main(String[] args) {
...
0
votes
0
answers
93
views
Micrometer property to propagate and log field in Spring boot 3.2.x
With Spring boot 2.2.x, we use the below sleuth property tp propagate keys to other microservices as http headers and log the details,
spring:
sleuth:
sampler:
probability: 1.0
keys:
http:
headers: &...
0
votes
0
answers
214
views
Spring Boot 3.4 ECS Logging and Micrometer Tracing Discrepancy
Environment
Spring Boot 3.4
ECS Structured Logging (logging.structured.format.console=ecs)
Micrometer Tracing with Brave (io.micrometer:micrometer-tracing-bridge-brave)
Issue Description
I've ...
0
votes
0
answers
154
views
Automatic Context Propagation fails to work with MDC logging in reactive API Gateway
We have developed our API Gateway using Spring Cloud Gateway framework based on reactive paradigm using below libraries:
Spring Boot: 3.2.0
Spring Cloud: 2023.0.0
Spring: 6.1.1
Spring Cloud Gateway: 4....
0
votes
0
answers
121
views
Spring boot 3 with micrometer 1.4+, how to skip tracing but continue to report metrics
While upgrading to Spring boot 3.4 I'm struggling to figure out how to "only" skip tracing for certain uris/paths while continuing to report metrics.
For some endpoints like actuators and ...
0
votes
0
answers
110
views
Moving from Spring Boot 2/Zipkin/Sleuth to Spring Boot 3/Micrometer: Equivalent of TraceableExecutorService
We are migrating a Spring Boot 2 + Sleuth/Zipkin app to Spring Boot 3 + Micrometer/Zipkin.
import java.util.concurrent.ExecutorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework....
0
votes
1
answer
65
views
Why does MicrometerObservationTracer cause ClassNotFoundException in Apache Camel 4.8.0
I am trying to enable tracing in my Apache Camel project using Micrometer and Brave. My application is based on Spring Boot, and I have the following dependencies in my pom.xml
<dependency>
...
0
votes
0
answers
123
views
Intermittent Spring Boot micrometer failed to send metrics to elastic: premature EOF after Elastic 8.16 upgrade
I am using spring boot 3.3.6, looks like it is using micrometer-elastic-registry:1.13.6. I didn't see this errors until I upgrade Elastic from 8.11.4 to 8.16. There were no changes to anything else so ...
0
votes
1
answer
302
views
DeclarePrecedence not presently supported in Spring AOP
Context:
I'm facing an error while deploying the shade jar on lambda. The jar was is working on Spring Boot 2.6.8 but not on Spring Boot 2.7.18.
Error:
Error creating bean with name 'org....
0
votes
1
answer
108
views
Extend annotation io.micrometer.core.annotation.Timed
I'm using @Timed in Spring Boot app for collecting metrics from methods and it works:
@Timed(percentiles = {0.95, 0.99}, histogram = true, extraTags = {"slice", "client"})
Since I'...
-3
votes
1
answer
287
views
How to add information about topic to metrics of Spring Kafka Template?
I have metric "spring_kafka_template_seconds_count" but there are no topic information. I use 2.8.11 spring-kafka version. In doc https://docs.spring.io/spring-kafka/reference/kafka/...
1
vote
1
answer
467
views
Micrometer counter into Grafana chart
Hi I have the counter that increments with the tags job.id and processing.status
Counter counter = Counter.builder("ri.procession.job.count")
.tag("job....
2
votes
0
answers
359
views
Micrometer and Spring WebClient Logs Missing Trace ID in subscribe and onStatus Methods
I'm experiencing an issue with logging in a Spring Boot application where the trace ID is not appearing in the logs generated inside the subscribe and onStatus methods of a WebClient call. I have ...
1
vote
1
answer
835
views
404 error when accessing actuator/prometheus endpoint
In my spring boot application. I added following dependencies:
spring-boot-starter-actuator
micrometer-registry-prometheus
In application.properties file I added following code:
management.endpoint....
0
votes
0
answers
32
views
Log W3C's parentId in Spring Boot 3 with micrometer/brave bridge [duplicate]
We're currently implementing W3C tracing and a requirement is that we log the span ID, trace ID and parent ID. Logging span and trace is easily done with
pattern="Micrometer Trace ID[%X{traceId}] ...
0
votes
1
answer
72
views
What is the difference between getAsyncExecutor and threadPoolTaskScheduler in Spring MVC ASyncConfigurer?
Could someone please tell me the difference between getAsyncExecutor and threadPoolTaskScheduler, as explained in the spring async-instrumentation document?
I created the config below, as mentioned in ...
1
vote
0
answers
377
views
SpringBoot 2 to SpringBoot 3.3.3 upgrade - breaking changes in metrics
I want to upgrade SpringBoot application from 2.x to latest version(3.3.3).
First of all I am aware of the changes introduced to metrics with SpringBoot 3.0.
Under Spring 2.x I had http.server....
0
votes
1
answer
85
views
How to overwrite @TimedAspect from micrometer.core for WebFlux
TimedAspect catches errors by try/catch that doesn't work in Mono/Flux world. (success calls are okey)
Or how i can fix, for catching errors in WebFlux + GraphQl with my own attributes in metrics (for ...
2
votes
0
answers
286
views
Configure Spring Boot to expose all Actuator endpoints on one port while serving Micrometer metrics on a different port
I'm working on a Spring Boot application where I want to achieve the following:
All Actuator endpoints (like /actuator/health, /actuator/info, etc.) should be exposed on the default application port (...
0
votes
1
answer
584
views
Spring micrometer observe aspect dynamic tags
I am exploring using @observed aspect for method level simpler instrumentation code. This sample blog for the Observe API shows an example
https://spring.io/blog/2022/10/12/observability-with-spring-...
0
votes
1
answer
1k
views
Spring boot 3 open telemetry how does the trace id propagation takes place
I am trying to implement observations and monitoring in my local application.
I have a question that how is the trace id propagated from one application to another application. specifically how or ...
2
votes
1
answer
1k
views
WebClient micrometer trace propagation is not working
Spring boot version 3.3.2
When using WebClient with each request to another microservice new traceId is created:
api-gateway service -> order-service
same traceID for api gateway and order service
...
0
votes
1
answer
577
views
How can I propagate a dynamic header downstream with micrometer tracing?
I have:
Spring Boot 3.3.+
io.micrometer:micrometer-tracing-bridge-brave
Currently, we can set management.tracing.baggage.remote-fields=f-user and expect that the header f-user will be propagated ...
2
votes
1
answer
628
views
Micrometer 1.13.0: Incorrect Metric Name Declaration
I'm encountering an issue with Micrometer 1.13.0 where one of the metric name declarations is outputted incorrectly. Instead of the expected # TYPE jvm_info gauge, it outputs # TYPE jvm info. This ...
1
vote
1
answer
894
views
Micrometer Observation lowCardinalityKeyValue and highCardinalityKeyValue uses/use cases?
I do understand micrometer observation. And i see that it supports adding lowCardinalityKeyValue and highCardinalityKeyValue with something like below -
Observation observation = Observation.start(&...
0
votes
1
answer
627
views
When you create a new span directly in Observability, in what cases do you typically create it?
I'm implementing Observability with Springboot + OpenTelemetry + Micrometer.
I'm still not sure when it's a good idea to create my own spans.
When do you guys usually create your own spans ?
1
vote
1
answer
3k
views
Spring Boot : percentile with micrometer
I need to have a percentile histogram of my metrics (http.server.requests). I have checked the documentation but I cannot make it work.
I'm not using promotheus so the properties here (https://docs....
3
votes
2
answers
3k
views
Spring Boot management.metrics.distribution.percentiles examples
There's a config property for Spring Boot management.metrics.distribution.percentiles
the type of a value of the property is Map<String, double[]>
e.g. it may be set as following:
management....
0
votes
1
answer
714
views
Spring open feign set custom header using baggage (or trace)
I'm developing a spring boot 3 application that must invoke some remote http services.
Inside the application there is a job executing some business logic.
In the business logic there is also the ...
1
vote
0
answers
1k
views
Set custom trace ID with Spring Boot 3, Micrometer and OTEL
I have two proprietary microservices (A and B) and a third-party one (C), both consuming and producing Kafka events.
A produces event1, and B consumes it.
B processes event1 and eventually delegates ...