pinpoint-apm/pinpoint · error · IllegalStateException
unsupported ObjectType:${objectName}
Error message
unsupported ObjectType:${objectName} What it means
AgentHeaderFactoryProvider.createV4 throws this IllegalStateException when the trace data format object type passed in is not one of the supported versions (V2/V4 etc). The provider builds gRPC client headers for a known data format; any unrecognized objectName means an unsupported TraceDataFormatVersion was configured or plugged in. It is an internal guard so that an unknown version fails fast instead of producing malformed gRPC metadata headers.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/provider/grpc/AgentHeaderFactoryProvider.java:73
int serviceType = agentInformation.getServerType().getCode();
long startTime = agentInformation.getStartTime();
return new ClientHeaderFactoryV1(agentId, agentName, applicationName, serviceType, startTime);
}
private HeaderFactory createV4() {
if (objectName instanceof ObjectNameV4) {
ObjectNameV4 objectName = (ObjectNameV4) this.objectName;
String agentId = objectName.getAgentId();
String agentName = objectName.getAgentName();
String applicationName = objectName.getApplicationName();
String serviceName = objectName.getServiceName();
String apiKey = objectName.getApiKey();
int serviceType = agentInformation.getServerType().getCode();
long startTime = agentInformation.getStartTime();
return new ClientHeaderFactoryV4(agentId, agentName, applicationName, serviceName, apiKey, serviceType, startTime);
}
throw new IllegalStateException("unsupported ObjectType:" + objectName);
}
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Check the configured TraceDataFormatVersion (profiler.traceformat / trace version config) and set it to a supported value (e.g. V2)
- Align agent and collector/plugin versions so the trace format is one the agent supports
- If extending the provider, add a branch for the new ObjectName type before the final throw
- Verify no null or corrupt agent information object is being passed to the provider
Example fix
// before
throw new IllegalStateException("unsupported ObjectType:" + objectName);
// after
if (objectName == null) {
throw new IllegalArgumentException("objectName is required");
}
logger.warn("Unsupported trace format object type: {}", objectName);
throw new IllegalStateException("unsupported ObjectType:" + objectName); Defensive patterns
Strategy: validation
Validate before calling
if (objectName == null || !isSupportedTraceFormat(objectName)) {
throw new IllegalArgumentException("Unsupported trace format object type: " + objectName);
} Type guard
boolean isSupportedTraceFormat(ObjectName o) {
return o instanceof TraceDataFormatMetadata
&& TraceDataFormatVersion.supported(((TraceDataFormatMetadata) o).getVersion());
} Try / catch
try {
ClientHeaderFactory factory = agentHeaderFactoryProvider.get();
} catch (IllegalStateException e) {
logger.error("Agent header factory init failed: {}", e.getMessage());
throw e;
} Prevention
- Pin the trace format version in profiler config to a value supported by the agent build
- Keep agent, collector and plugin versions aligned on upgrades
- Add unit tests covering every supported ObjectName/trace-format branch in the provider
When it happens
Trigger: createV4 (invoked via get()) receives an objectName whose type does not match any supported TraceDataFormatVersion branch, e.g. profiler.traceformat or related metadata is set to a version the profiler does not implement, or a custom/broken ObjectName implementation is passed.
Common situations: Pinpoint agent/config version drift (newer trace format used with an older agent), custom profiler builds that forgot to add a case for a new format, or wiring a provider with a null/unknown version object.
Related errors
- unknown version :${version}
- list size not same
- spanEventList is empty.
- first SpanEvent is null
- unsupported type:${dataType}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/41e44239df624972.
Report an issue: GitHub.