pinpoint-apm/pinpoint · warning
Failed to request. header={}
Error message
Failed to request. header={} What it means
Pinpoint collector's SpanService dispatch catches any Throwable thrown by the span SimpleHandler and logs it with the request header, then calls onNextError(e) on the response stream. It signals that span data sent by an agent could not be processed by the handler.
Source
Thrown at collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/SpanService.java:184
} else if (spanMessage.hasSpanChunk()) {
PSpanChunk spanChunk = spanMessage.getSpanChunk();
UidFetcher fetcher = call.getUidFetcher();
ServerRequest<PSpanChunk> request = serverRequestFactory.newServerRequest(context, fetcher, MessageTypes.SPANCHUNK, spanChunk);
this.dispatch(this.spanCheckHandler, request, responseObserver);
} else {
if (logger.isInfoEnabled()) {
logger.info("Found empty span message, header:{}", ServerContext.getAgentInfo(context));
}
}
}
private <T> void dispatch(SimpleHandler<T> handler,
ServerRequest<T> request,
ServerCallStream<PSpanMessage, Empty> responseObserver) {
try {
handler.handleSimple(request);
} catch (Throwable e) {
logger.warn("Failed to request. header={}", request.getHeader(), e);
responseObserver.onNextError(e);
}
}
}View on GitHub (pinned to 744c3d3075)
Solutions
- Read the attached exception (e) in the log for the real root cause
- If caused by 'PTransactionId is not set', fix or upgrade the agent producing malformed spans
- Verify collector storage backend is healthy and reachable
- Check that header fields (applicationName/agentId) in the log point to the offending agent and inspect its traffic
Defensive patterns
Strategy: try-catch
Try / catch
try {
spanService.dispatch(handler, request, responseObserver);
} catch (Throwable e) {
logger.warn("Failed to request. header={}", request.getHeader(), e);
// root cause is e; correlate agent via header
} Prevention
- Correlate the logged header (applicationName/agentId) to find the offending agent
- Verify agents send complete span payloads including transactionId
- Monitor this warning rate as a signal of agent/collector version drift
- Ensure collector storage backend health is monitored
When it happens
Trigger: handler.handleSimple(request) throws while processing a PSpanMessage — e.g. SpanBinder failures (missing transactionId), deserialization errors, or downstream write failures inside the handler.
Common situations: Agents sending spans with missing/invalid PTransactionId; collector cannot write to storage; protocol incompatibility between agent and collector versions causing malformed fields.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- list size not same
- Failed to request. {} header={}
- Failed to request. header={}
- PTransactionId is not set
- unsupported message
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/cb637dc69e32090b.
Report an issue: GitHub.