{"record":{"id":"4ff9ed97e0922ecf","repo":"pinpoint-apm/pinpoint","slug":"servicetype-code-of-pair-can-t-have-alias-and-r","errorCode":null,"errorMessage":"ServiceType code of ${pair} can't have ALIAS and RECORD_STATISTICS at the same time","messagePattern":"ServiceType code of (.+?) can't have ALIAS and RECORD_STATISTICS at the same time","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"commons-profiler/src/main/java/com/navercorp/pinpoint/common/profiler/trace/TraceMetadataLoader.java","lineNumber":230,"sourceCode":"    \n            if (prev != null) {\n                // TODO change exception type\n                throw new RuntimeException(\"ServiceType name of \" + serviceTypePairToString(pair) + \" is duplicated with \" + serviceTypePairToString(prev));\n            }\n    \n            prev = serviceTypeCodeMap.put(type.getCode(), pair);\n    \n            if (prev != null) {\n                // TODO change exception type\n                throw new RuntimeException(\"ServiceType code of \" + serviceTypePairToString(pair) + \" is duplicated with \" + serviceTypePairToString(prev));\n            }\n\n            if(type.isAlias()){\n                if(!type.isRpcClient()){\n                    throw new RuntimeException(\"ServiceType code of \" + serviceTypePairToString(pair) + \" should be between range of RPC\");\n                }\n                if(type.isRecordStatistics()){\n                    throw new RuntimeException(\"ServiceType code of \" + serviceTypePairToString(pair) + \" can't have ALIAS and RECORD_STATISTICS at the same time\");\n                }\n            }\n        }\n\n        private void logResult() {\n            logger.info(\"Finished loading ServiceType:\");\n\n            List<Pair<ServiceType>> serviceTypes = new ArrayList<>(serviceTypeCodeMap.values());\n            serviceTypes.sort(Comparator.comparingInt(this::getCode));\n\n            for (Pair<ServiceType> serviceType : serviceTypes) {\n                logger.info(serviceTypePairToString(serviceType));\n            }\n        }\n\n        private int getCode(Pair<ServiceType> p) {\n            return p.value.getCode();\n        }","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/commons-profiler/src/main/java/com/navercorp/pinpoint/common/profiler/trace/TraceMetadataLoader.java#L212-L248","documentation":"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.","triggerScenarios":"Thrown at commons-profiler/src/main/java/com/navercorp/pinpoint/common/profiler/trace/TraceMetadataLoader.java:230 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}