Declarative config max_request_size: 0 fails SDK creation instead of meaning no limit
维护者通常 2 天内回复
评估
调研方向
Read OtlpDeclarativeConfigUtil.configureOtlpExporterBuilder() and trace how max_request_size reaches the OTLP HTTP and gRPC exporter builders. Check the exporter setters that reject zero and compare their behavior with timeout: 0; done means declarative config accepts zero as no limit for all six span, metric, and log exporters, with tests covering those cases.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Setting max_request_size: 0 on an otlp_http or otlp_grpc exporter in declarative config makes SDK creation fail. The configuration schema says 0 means no limit.
Steps to reproduce
Declarative config:
tracer_provider:
processors:
- batch:
exporter:
otlp_http:
max_request_size: 0
What did you expect to see?
The exporter is created with no request size limit. opentelemetry-configuration v1.2.0 schema/common.yaml defines max_request_size with minimum: 0 and says: "Value must be non-negative. A value of 0 indicates no limit (infinity) and is not recommended." timeout: 0 already works this way.
What did you see instead?
DeclarativeConfigException: Error configuring io.opentelemetry.sdk.trace.export.SpanExporter with name "otlp_http", caused by IllegalArgumentException: maxRequestBodySizeBytes must be positive. OtlpDeclarativeConfigUtil.configureOtlpExporterBuilder() passes 0 to setMaxRequestBodySize / setMaxRequestMessageSize, which only accept positive values. All six OTLP HTTP/gRPC span, metric, and log exporters are affected.
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-otlp, opentelemetry-sdk-extension-declarative-config
Version: main @ 387f5c5d4
How did you reference these artifacts? N/A
Environment
Compiler: Temurin 21
OS: N/A
Additional context
The option was wired in #8446. The schema meaning of 0 was agreed in open-telemetry/opentelemetry-configuration#700.
- 主要语言
- Java
- 星标
- 2.5k
- 派生
- 1k
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 68
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
open-telemetry/opentelemetry-java 的其他 Issue
-
OkHttpGrpcSender no longer logs retry attempts可能已有人在做 @thswlsqls 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
open-telemetry/opentelemetry-java#8966 · 1 个 reaction ·
维护者通常 2 天内回复
-
JdkHttpSender passes CompletionException instead of the original exception to onError可能已有人在做 @thswlsqls 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
open-telemetry/opentelemetry-java#8961 · 1 个 reaction ·
维护者通常 2 天内回复
-
Fix `otel.sdk.log.created` counting semantics可能已有人在做 @anuraaga 于 75 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
open-telemetry/opentelemetry-java#8688 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 20/100
open-telemetry/opentelemetry-java#8971 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 35/100
open-telemetry/opentelemetry-java#8970 ·
维护者通常 2 天内回复
查看 open-telemetry/opentelemetry-java 的全部 Issue
相似的 Issue
-
account bug communication lecture
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
Consumer progress rows interleave topics with equal queue IDs可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
apache/rocketmq-dashboard#7250 ·
维护者通常 3 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 67/100
ignatov/intellij-erlang#1093 ·
-
[Bug] QoS count command ignores the times argument after cd可能已有人在做 @CCCLL 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复