micrometer-metrics/tracing

OTel Tracer Not Propagating Events - Missing Steps in Docs.

Open

#1,144 opened on Jul 26, 2025

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Java (59 forks)github user discovery
documentationhelp wanted

Repository metrics

Stars
 (293 stars)
PR merge metrics
 (PR metrics pending)

Description

Hello again team,

Referencing my last issue: https://github.com/micrometer-metrics/tracing/issues/1123

I found the issue why OTel Tracer was not propagating events. The sample codes provided here is incomplete.

Essentially, the EventPublishingContextWrapper provided by Micrometer OTel bridge was not wired up. What's missing:

            OtelTracer.EventPublisher eventPublisher = event -> {
                slf4JEventListener.onEvent(event);
                slf4JBaggageEventListener.onEvent(event);
            };

            ContextStorage.addWrapper(new EventPublishingContextWrapper(eventPublisher));

I had attempted to update the documents at here but realized that the sample in documentation was an extraction of top level variables initialization within the class (I.e. it wasn't possible to invoke the addition of the wrapper)

Contributor guide