OTLP gRPC exporter reads RetryInfo only from the google.rpc.retryinfo-bin trailer, not from the status details
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- grpc, python
调研方向
Start in exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py around the RetryInfo trailer handling at lines 432–440. Read the gRPC status details handling and the test in exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py, which currently mocks only google.rpc.retryinfo-bin. Done means RetryInfo in grpc-status-details-bin sets the retry delay, with the existing trailer behavior covered as a fallback.
由索引模型根据 Issue 内容生成。
描述
Describe your environment
opentelemetry-exporter-otlp-proto-grpc 1.45.2 (the code is the same on main).
What happened?
The OTLP gRPC exporter reads the server's RetryInfo only from a trailer named google.rpc.retryinfo-bin:
The OTLP specification tells a server to send RetryInfo as a detail of the gRPC status (Failures, OTLP/gRPC Throttling). Its sample server code uses status.New(...).WithDetails(&errdetails.RetryInfo{...}). gRPC sends those details in the grpc-status-details-bin trailer, as an encoded google.rpc.Status. A server that follows the specification, such as one written with grpc-go or the OpenTelemetry Collector's receiver, sends no google.rpc.retryinfo-bin trailer.
So the Python exporter never sees the delay that such a server asks for. It falls back to its own backoff of 2**n * uniform(0.8, 1.2) seconds. The OTel Go SDK, the Collector's exporter and the .NET exporter read the delay from the status details.
Steps to Reproduce
- Run a gRPC OTLP server whose
ExportreturnsUNAVAILABLE(orRESOURCE_EXHAUSTED) built withstatus.New(code, msg).WithDetails(&errdetails.RetryInfo{RetryDelay: durationpb.New(3 * time.Second)}). - Export a span with
OTLPSpanExporterto it. - Log the time of each attempt on the server.
Expected Result
The exporter waits the 3 s that RetryInfo asks for before it retries.
Actual Result
The exporter retries after about 1 s, then 2 s, then 4 s: its own backoff. The RetryInfo in grpc-status-details-bin is ignored.
Additional context
A fix could decode grpc-status-details-bin as google.rpc.status_pb2.Status (or use grpc_status.rpc_status.from_call), take the RetryInfo from its details, and keep the google.rpc.retryinfo-bin lookup as a fallback. The test at exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py mocks only the google.rpc.retryinfo-bin trailer.
- 主要语言
- Python
- 星标
- 2.7k
- 派生
- 1.1k
- 平均合并
- 4 天 13 分钟
- 30 天内合并 PR
- 38
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
open-telemetry/opentelemetry-python 的其他 Issue
-
opentelemetry-configuration: OTLP HTTP exporter does not validate TLS files exist at startup可能已有人在做 @Dotify71 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
open-telemetry/opentelemetry-python#5928 ·
维护者通常 2 天内回复
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagate可能已有人在做 @codedbyadiiii 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
open-telemetry/opentelemetry-python#5913 ·
维护者通常 2 天内回复
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
open-telemetry/opentelemetry-python#5891 ·
维护者通常 2 天内回复
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/s可能已有人在做 @knowprasad 于 10 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
open-telemetry/opentelemetry-python#5875 · 1 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
OTLP HTTP exporter reports a 3xx response as a successful export, so redirected batches are dropped without any log可能已有人在做 @d4rshnn 于 18 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
open-telemetry/opentelemetry-python#5865 · 1 条评论 ·
维护者通常 2 天内回复
查看 open-telemetry/opentelemetry-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
docling-project/docling-pipelines#669 ·
维护者通常 1 天内回复
-
blocked kind/enhancement
难度 2/5 1-3 小时 新手友好度 78/100
opendatahub-io/agent-eval-harness#329 · 2 条评论 · 1 个 reaction ·
-
cc_wrapper crashes with ValueError on Windows when a path is on another drive可能已有人在做 @TrapsterDK 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
tweag/rules_haskell#2492 ·
维护者通常 1 天内回复