Skip to content

Context Propagation broken for Pulsar Functions #8996

@damienburke

Description

@damienburke

Describe the bug
Pulsar functions can consume messages and produce messages, where a receive and publisher Span will be created respectively. Re context propagation, the receive Span is created with the trace context of the incoming message (so works as expected) - but the trace context of the outgoing message (i.e. the publisher Span) has a different trace ID set.

Steps to reproduce
I created a specific github repo for this - https://github.com/damienburke/pulsar_otel_function. But in short, I have a docker compose env that creates a pulsar broker and deploys an instrumented pulsar function. I have a script that then publishes a message to this function, where upon I can see in logs that the trace IDs differ.

What did you expect to see?
The publisher Span created by the Pulsar Function should have the same Trace ID as the receive Span.

What did you see instead?
The publisher Span created by the Pulsar Function had a different Trace ID from the receive Span.

What version are you using?
1.28 of the Java Agent
2.11.1 of the Pulsar Broker

Environment
Docker Compose

Additional context
I put some effort into making this easily re-createable via my github repo, so if any issues getting that working please let me know.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeenhancementNew feature or requestnew instrumentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions