googleapis / googleapis/google-cloud-java

[java-pubsub] Publisher does not automatically propagate otel baggage information when publishing event

Ouverte
#13,048 1 commentaire 0 réactions 1 personne assignée Réclamée par @michaelpri10 Voir sur GitHub
api: pubsub type: feature request
Langage dominant
Java
Étoiles
2.1k
Forks
1.2k
Merge moyen
1 j 23 h
PR mergées (30 j)
154

Description

**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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.