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
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 67
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-telemetry/opentelemetry-java のほかの issue
-
Fix `otel.sdk.log.created` counting semantics対応中かも @anuraaga が 74 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-java#8688 ·
メンテナーはふだん 2 日以内に返信
-
Support configuring PeriodicMetricReader maxExportBatchSize in autoconfigure対応中かも @psx95 が 6 日前に担当しました。 オープンFeature Request
open-telemetry/opentelemetry-java#8936 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Feature Request
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
open-telemetry/opentelemetry-java#8831 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Make declarative config YAML parsing and object mapping requirements pluggable via SPI再び着手できるかも @jack-berg が 34 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンFeature Request
open-telemetry/opentelemetry-java#8820 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Apply null guard advice throughout project再び着手できるかも @jack-berg が 37 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンFeature Request
open-telemetry/opentelemetry-java#8802 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
open-telemetry/opentelemetry-java の issue をすべて見る
似ている issue
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the app対応中かも @falkloewert が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug grammar sev-0
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
oracle/graalvm-reachability-metadata#11026 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信