micrometer-metrics/tracing

OTel Tracer Not Propagating Events - Missing Steps in Docs.

Open

#1 144 ouverte le 26 juil. 2025

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Java (59 forks)github user discovery
documentationhelp wanted

Métriques du dépôt

Stars
 (293 stars)
Métriques de merge PR
 (Métriques PR en attente)

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)

Guide contributeur