1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

exporters/otlp: default max request size to 64 MiB (#8365)

Per https://github.com/open-telemetry/opentelemetry-proto/pull/782 where
we agreed to have 64 MiB as the default limit.
This commit is contained in:
Robert Pająk
2026-05-26 21:00:40 +02:00
committed by GitHub
parent f02feacf86
commit f593185679
17 changed files with 28 additions and 28 deletions
+12 -12
View File
@@ -67,18 +67,18 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` to safely handle zero size.
A capacity check in the constructor initializes the reservoir safely and skips initialization for zero-cap; early returns in `Offer()` and `Collect()` ensure no-op behavior. (#8295)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 32 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
- Fix gzipped request body replay on redirect in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#8135)
- Fix gzipped request body replay on redirect in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8152)
- `go.opentelemetry.io/otel/exporters/prometheus` now uses `Value.String` formatting for label values following the [OpenTelemetry AnyValue representation for non-OTLP protocols](https://opentelemetry.io/docs/specs/otel/common/#anyvalue). (#8170)
+1 -1
View File
@@ -27,7 +27,7 @@ import (
var (
defaultEndpoint = "localhost:4317"
defaultTimeout = 10 * time.Second
defaultMaxRequestSize = 32 * 1024 * 1024
defaultMaxRequestSize = 64 * 1024 * 1024
defaultRetryCfg = retry.DefaultConfig
)
@@ -497,7 +497,7 @@ func TestNewConfig(t *testing.T) {
}(otel.GetErrorHandler()))
c := newConfig(tc.options)
if !tc.want.maxRequestSize.Set {
tc.want.maxRequestSize = newSetting(defaultMaxRequestSize)
tc.want.maxRequestSize = newSetting(64 * 1024 * 1024)
}
// Do not compare pointer values.
+1 -1
View File
@@ -26,7 +26,7 @@ var (
defaultEndpoint = "localhost:4318"
defaultPath = "/v1/logs"
defaultTimeout = 10 * time.Second
defaultMaxRequestSize = 32 * 1024 * 1024
defaultMaxRequestSize = 64 * 1024 * 1024
defaultProxy HTTPTransportProxyFunc = http.ProxyFromEnvironment
defaultRetryCfg = retry.DefaultConfig
)
@@ -512,7 +512,7 @@ func TestNewConfig(t *testing.T) {
}(otel.GetErrorHandler()))
c := newConfig(tc.options)
if !tc.want.maxRequestSize.Set {
tc.want.maxRequestSize = newSetting(defaultMaxRequestSize)
tc.want.maxRequestSize = newSetting(64 * 1024 * 1024)
}
// Do not compare pointer values.
@@ -37,7 +37,7 @@ const (
DefaultMetricsPath string = "/v1/metrics"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultBackoff is a default base backoff time used in the
// exponential backoff strategy.
DefaultBackoff time.Duration = 300 * time.Millisecond
@@ -79,7 +79,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Metrics.Compression)
assert.Equal(t, map[string]string(nil), c.Metrics.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Metrics.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Metrics.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Metrics.Timeout)
},
},
@@ -37,7 +37,7 @@ const (
DefaultMetricsPath string = "/v1/metrics"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultBackoff is a default base backoff time used in the
// exponential backoff strategy.
DefaultBackoff time.Duration = 300 * time.Millisecond
@@ -79,7 +79,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Metrics.Compression)
assert.Equal(t, map[string]string(nil), c.Metrics.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Metrics.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Metrics.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Metrics.Timeout)
},
},
@@ -33,7 +33,7 @@ const (
DefaultTracesPath string = "/v1/traces"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultTimeout is a default max waiting time for the backend to process
// each span batch.
DefaultTimeout time.Duration = 10 * time.Second
@@ -77,7 +77,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Traces.Compression)
assert.Equal(t, map[string]string(nil), c.Traces.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Traces.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Traces.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Traces.Timeout)
},
},
@@ -33,7 +33,7 @@ const (
DefaultTracesPath string = "/v1/traces"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultTimeout is a default max waiting time for the backend to process
// each span batch.
DefaultTimeout time.Duration = 10 * time.Second
@@ -77,7 +77,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Traces.Compression)
assert.Equal(t, map[string]string(nil), c.Traces.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Traces.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Traces.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Traces.Timeout)
},
},
@@ -37,7 +37,7 @@ const (
DefaultMetricsPath string = "/v1/metrics"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultBackoff is a default base backoff time used in the
// exponential backoff strategy.
DefaultBackoff time.Duration = 300 * time.Millisecond
@@ -79,7 +79,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Metrics.Compression)
assert.Equal(t, map[string]string(nil), c.Metrics.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Metrics.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Metrics.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Metrics.Timeout)
},
},
@@ -33,7 +33,7 @@ const (
DefaultTracesPath string = "/v1/traces"
// DefaultMaxRequestSize is the default maximum size of a serialized export
// request, before compression.
DefaultMaxRequestSize int = 32 * 1024 * 1024
DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultTimeout is a default max waiting time for the backend to process
// each span batch.
DefaultTimeout time.Duration = 10 * time.Second
@@ -77,7 +77,7 @@ func TestConfigs(t *testing.T) {
}
assert.Equal(t, NoCompression, c.Traces.Compression)
assert.Equal(t, map[string]string(nil), c.Traces.Headers)
assert.Equal(t, DefaultMaxRequestSize, c.Traces.MaxRequestSize)
assert.Equal(t, 64*1024*1024, c.Traces.MaxRequestSize)
assert.Equal(t, 10*time.Second, c.Traces.Timeout)
},
},