googleapis / googleapis/google-cloud-java

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

未关闭
#13,048 1 条评论 0 个 reaction 已指派 1 人 已被 @michaelpri10 认领 在 GitHub 查看
api: pubsub type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
154

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。