Skip to content

OTel Tracer Not Propagating Events - Missing Steps in Docs. #1144

@hofucai

Description

@hofucai

Hello again team,

Referencing my last issue: #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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions