{"record":{"id":"ca093aa2fa0c2d1f","repo":"pinpoint-apm/pinpoint","slug":"unsupported-metric-metricdefinitionid","errorCode":null,"errorMessage":"unsupported metric :<metricDefinitionId>","messagePattern":"unsupported metric :<metricDefinitionId>","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":500,"severity":"error","filePath":"inspector-module/inspector-web/src/main/java/com/navercorp/pinpoint/inspector/web/definition/YMLInspectorManager.java","lineNumber":77,"sourceCode":"            List<String> definitionIdList = metricIdMap.computeIfAbsent(metric.getMetricName(), k -> new ArrayList<>());\n            definitionIdList.add(definitionId);\n        }\n        this.metricIdMap = metricIdMap;\n\n        List<String> metricIdSortOrder = mappings\n                .stream()\n                .map(MetricDefinition::getDefinitionId)\n                .collect(Collectors.toList());\n\n        metricInfoComparator = Comparator.comparing(metricInfo -> metricIdSortOrder.indexOf(metricInfo.getMetricDefinitionId()));\n    }\n\n    public MetricDefinition findElementOfBasicGroup(String metricDefinitionId) {\n        MetricDefinition metricDefinition = this.definitionIdMap.get(metricDefinitionId);\n        if (metricDefinition != null) {\n            return metricDefinition;\n        }\n        throw new UnsupportedOperationException(\"unsupported metric :\" + metricDefinitionId);\n    }\n\n    public static boolean containedMatchingRule(MetricDefinition metricDefinition, MatchingRule matchingRule) {\n        for (Field field : metricDefinition.getFields()) {\n            if (matchingRule.equals(field.getMatchingRule())) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n}\n","sourceCodeStart":59,"sourceCodeEnd":90,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/inspector-module/inspector-web/src/main/java/com/navercorp/pinpoint/inspector/web/definition/YMLInspectorManager.java#L59-L90","documentation":"Thrown by YMLInspectorManager.findElementOfBasicGroup when the requested metricDefinitionId is not present in the definitionIdMap built from the loaded YAML inspector definitions. It indicates the caller asked for a metric that the module does not define. This is an UnsupportedOperationException used as a lookup-miss signal.","triggerScenarios":"Calling findElementOfBasicGroup (directly or via inspector query endpoints) with an id string that has no entry in the inspector definition YAML files loaded into definitionIdMap.","commonSituations":"Typo in the metric id on the caller side; a YAML definition file missing/not deployed on the server (resources not packaged); a version skew where the client requests a metric added only in a newer definition set; id renamed in a definition update while old callers still use the old id.","solutions":["Check the exact metricDefinitionId against the ids in the inspector definition YAML files and correct the caller's id.","Verify the YAML definition resources are present on the server (packaged in the webapp) and loaded at startup without errors.","Align versions: upgrade the definitions (or the client) so the requested metric exists in both.","If the metric was intentionally removed, update callers to use its replacement id."],"exampleFix":"// before\nMetricDefinition def = ymlInspectorManager.findElementOfBasicGroup(\"jvmGcNew\"); // typo id\n// after\nMetricDefinition def = ymlInspectorManager.findElementOfBasicGroup(\"jvmGcNewDetail\"); // id matching YAML","handlingStrategy":"fallback","validationCode":"boolean supported = ymlInspectorManager.getDefinitionIds().contains(metricDefinitionId); // or check the YAML list beforehand\nif (!supported) { /* skip or use default metric */ }","typeGuard":null,"tryCatchPattern":"try { return ymlInspectorManager.findElementOfBasicGroup(id); } catch (UnsupportedOperationException e) { log.warn(\"Unknown metric id {}\", id); return null; }","preventionTips":["Keep metric id constants shared between caller and definitions","Ensure inspector YAML resources ship with the webapp build","Keep client and server definition versions in sync","Grep the YAML files for the id when a request fails"],"tags":["lookup-failure","unsupported-metric","configuration"],"backgroundTag":"unsupported-operation","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"}