{"record":{"id":"cb637dc69e32090b","repo":"pinpoint-apm/pinpoint","slug":"failed-to-request-header-cb637d","errorCode":null,"errorMessage":"Failed to request. header={}","messagePattern":"Failed to request\\. header=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/SpanService.java","lineNumber":184,"sourceCode":"        } else if (spanMessage.hasSpanChunk()) {\n            PSpanChunk spanChunk = spanMessage.getSpanChunk();\n            UidFetcher fetcher = call.getUidFetcher();\n            ServerRequest<PSpanChunk> request = serverRequestFactory.newServerRequest(context, fetcher, MessageTypes.SPANCHUNK, spanChunk);\n            this.dispatch(this.spanCheckHandler, request, responseObserver);\n        } else {\n            if (logger.isInfoEnabled()) {\n                logger.info(\"Found empty span message, header:{}\", ServerContext.getAgentInfo(context));\n            }\n        }\n    }\n\n    private <T> void dispatch(SimpleHandler<T> handler,\n                              ServerRequest<T> request,\n                              ServerCallStream<PSpanMessage, Empty> responseObserver) {\n        try {\n            handler.handleSimple(request);\n        } catch (Throwable e) {\n            logger.warn(\"Failed to request. header={}\", request.getHeader(), e);\n            responseObserver.onNextError(e);\n        }\n    }\n\n}","sourceCodeStart":166,"sourceCodeEnd":189,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/SpanService.java#L166-L189","documentation":"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.","triggerScenarios":"handler.handleSimple(request) throws while processing a PSpanMessage — e.g. SpanBinder failures (missing transactionId), deserialization errors, or downstream write failures inside the handler.","commonSituations":"Agents sending spans with missing/invalid PTransactionId; collector cannot write to storage; protocol incompatibility between agent and collector versions causing malformed fields.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    spanService.dispatch(handler, request, responseObserver);\n} catch (Throwable e) {\n    logger.warn(\"Failed to request. header={}\", request.getHeader(), e);\n    // root cause is e; correlate agent via header\n}","preventionTips":["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"],"tags":["grpc","collector","span","pinpoint"],"backgroundTag":"api-request-failed","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}