pinpoint-apm/pinpoint · warning

OTLP/HTTP trace request rejected. status={}, reason={}, {}

Error message

OTLP/HTTP trace request rejected. status={}, reason={}, {}

What it means

OtlpTraceHttpAdmissionFilter.reject is the central admission-control rejection path: when an OTLP/HTTP trace request fails admission (size limits, oversized/chunked body, rate/byte budget), the filter writes an HTTP status (with a Retry-After header when the rejection is retryable), records a RequestRejectReason in ingest metrics, and logs 'OTLP/HTTP trace request rejected. status={}, reason={}, {}'. It protects the collector from oversized or excessive requests.

Source

Thrown at otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/controller/OtlpTraceHttpAdmissionFilter.java:144

                effectiveRequest = limited;
            }
            filterChain.doFilter(effectiveRequest, response);
        } finally {
            if (limited != null) {
                ingestMetrics.requestBytes(OtlpTraceIngestMetrics.Transport.HTTP, limited.bytesRead());
            }
            admissionBytes.release(reserveBytes);
            concurrency.release();
        }
    }

    private void reject(HttpServletResponse response, int status, boolean retryable, RequestRejectReason reason, String detail) {
        if (retryable) {
            response.setHeader("Retry-After", Integer.toString(retryAfterSeconds));
        }
        response.setStatus(status);
        ingestMetrics.requestRejected(OtlpTraceIngestMetrics.Transport.HTTP, reason);
        logger.warn("OTLP/HTTP trace request rejected. status={}, reason={}, {}", status, reason.tagValue(), detail);
    }

    /**
     * Wraps the request so an unknown-length (chunked) body is read through a size-limited stream.
     */
    private static final class LimitedRequestWrapper extends HttpServletRequestWrapper {
        private final long limit;
        private LimitedServletInputStream stream;

        private LimitedRequestWrapper(HttpServletRequest request, long limit) {
            super(request);
            this.limit = limit;
        }

        @Override
        public ServletInputStream getInputStream() throws IOException {
            if (stream == null) {
                stream = new LimitedServletInputStream(super.getInputStream(), limit);

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Read the log's status/reason fields to identify which limit was hit, then lower client batch size (BatchSpanProcessor max_export_batch_size / max_queue_size).
  2. If retryable, honor the Retry-After header and back off with jitter in the exporter/proxy.
  3. Raise the collector's admission limits (max request/decompressed byte config) if legitimate payloads are being rejected.
  4. Check ingest metrics for the RequestRejectReason to confirm whether it is payload size vs. load, and scale collector replicas if the latter.

Example fix

// before (client)
BatchSpanProcessor.builder(exporter)
    .setMaxExportBatchSize(2048)
    .build();

// after
BatchSpanProcessor.builder(exporter)
    .setMaxExportBatchSize(512)
    .build();
Defensive patterns

Strategy: retry

Validate before calling

// client-side: cap payload before sending
if (estimatedBodyBytes > maxAcceptedBytes) {
    splitBatch(); // export in smaller chunks
}

Try / catch

// retry only when the rejection is retryable and honor Retry-After
if (status == 429 || status == 503) {
    long waitMs = retryAfterHeader != null ? Long.parseLong(retryAfterHeader) * 1000L : backoffMs;
    Thread.sleep(waitMs + jitter());
    retryExport();
}

Prevention

When it happens

Trigger: A request body exceeding the configured max decompressed/accepted size, an unknown-length chunked body too large for the LimitedRequestWrapper, or other admission policy checks in doFilterInternal calling reject() with the corresponding status and RequestRejectReason.

Common situations: Burst traffic from many OTel SDK instances, a batch processor producing very large export payloads, clients ignoring Retry-After on 429/503 responses and hammering the endpoint, or gateway-buffered chunked uploads hitting size limits.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/ed96dfa5d394a5c2. Report an issue: GitHub.