pinpoint-apm/pinpoint · error · RuntimeException
ServiceType code of can't have ALIAS and RECORD_STATISTICS…
Error message
ServiceType code of ${pair} can't have ALIAS and RECORD_STATISTICS at the same time What it means
Flag-combination validation in TraceMetadataLoader.ServiceTypeChecker: the ServiceType declares both ALIAS and RECORD_STATISTICS attributes, which are mutually exclusive — an alias points at another type and cannot itself record statistics.
Solutions
- Drop RECORD_STATISTICS from alias ServiceTypes, or drop ALIAS and define a full statistics-capable type
- Review the ServiceTypeProperty flags set in the provider plugin
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at commons-profiler/src/main/java/com/navercorp/pinpoint/common/profiler/trace/TraceMetadataLoader.java:230 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/4ff9ed97e0922ecf.
Report an issue: GitHub.
Appendix: source
Thrown at commons-profiler/src/main/java/com/navercorp/pinpoint/common/profiler/trace/TraceMetadataLoader.java:230
if (prev != null) {
// TODO change exception type
throw new RuntimeException("ServiceType name of " + serviceTypePairToString(pair) + " is duplicated with " + serviceTypePairToString(prev));
}
prev = serviceTypeCodeMap.put(type.getCode(), pair);
if (prev != null) {
// TODO change exception type
throw new RuntimeException("ServiceType code of " + serviceTypePairToString(pair) + " is duplicated with " + serviceTypePairToString(prev));
}
if(type.isAlias()){
if(!type.isRpcClient()){
throw new RuntimeException("ServiceType code of " + serviceTypePairToString(pair) + " should be between range of RPC");
}
if(type.isRecordStatistics()){
throw new RuntimeException("ServiceType code of " + serviceTypePairToString(pair) + " can't have ALIAS and RECORD_STATISTICS at the same time");
}
}
}
private void logResult() {
logger.info("Finished loading ServiceType:");
List<Pair<ServiceType>> serviceTypes = new ArrayList<>(serviceTypeCodeMap.values());
serviceTypes.sort(Comparator.comparingInt(this::getCode));
for (Pair<ServiceType> serviceType : serviceTypes) {
logger.info(serviceTypePairToString(serviceType));
}
}
private int getCode(Pair<ServiceType> p) {
return p.value.getCode();
}View on GitHub (pinned to 744c3d3075)