You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Declarative config max_request_size: 0 fails SDK creation instead of meaning no limit #8940
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.
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 @ 387f5c5
How did you reference these artifacts? N/A
I think this issue could be expanded to fix the general behavior of the SDK, instead of just fixing it at the declarative config level. I believe that the behavior when configuring SDK programmatically and via declarative config should be consistent.
Activity
psx95 commentedon Oct 13, 2026
I think this issue could be expanded to fix the general behavior of the SDK, instead of just fixing it at the declarative config level. I believe that the behavior when configuring SDK programmatically and via declarative config should be consistent.