Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publisher does not automatically propagate otel baggage information when publishing event #2242

Open
mroeha opened this issue Oct 24, 2024 · 1 comment
Assignees
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@mroeha
Copy link

mroeha commented Oct 24, 2024

Is your feature request related to a problem? Please describe.
In version 1.133.0, java pubsub client already use OpenTelemetry. But after testing it, it does not automatically propagate baggage information. It only propagates traceparent information.

Describe the solution you'd like
Automatically propagate baggage information.

Describe alternatives you've considered
Automatically propagate context using registered propagators in open telemetry.

Additional context
Similar to how kafka auto instrumentation works, they use openTelemetry.getPropagators().getTextMapPropagator() to get the propagators and inject it using propagator().inject(context, record.headers(), SETTER);.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/e2dd703a8a0d47ed12d3beca79dc9740822da4f1/instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/KafkaTelemetry.java#L226

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label Oct 24, 2024
@michaelpri10
Copy link
Contributor

Hello! Currently, across all languages, the Pub/Sub OpenTelemetry design uses the global propagator. In order to propagate baggage information, we would require allowing users to set their own composite propagators. We are considering this in the future, but do not have current plans to implement this. I would advise creating an issue at https://issuetracker.google.com/issues, so that other users may mark their interest in this as well. Thank you!

@michaelpri10 michaelpri10 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants