pinpoint-apm/pinpoint · error · UnsupportedOperationException
unsupported metric
Error message
unsupported metric :<metricDefinitionId>
What it means
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.
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.
Example fix
// before
MetricDefinition def = ymlInspectorManager.findElementOfBasicGroup("jvmGcNew"); // typo id
// after
MetricDefinition def = ymlInspectorManager.findElementOfBasicGroup("jvmGcNewDetail"); // id matching YAML Defensive patterns
Strategy: fallback
Validate before calling
boolean supported = ymlInspectorManager.getDefinitionIds().contains(metricDefinitionId); // or check the YAML list beforehand
if (!supported) { /* skip or use default metric */ } Try / catch
try { return ymlInspectorManager.findElementOfBasicGroup(id); } catch (UnsupportedOperationException e) { log.warn("Unknown metric id {}", id); return null; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- - agentId
- - agentName
- - applicationName
- can't find SslProvider. value:+providerType
- Circular placeholder reference
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/ca093aa2fa0c2d1f.
Report an issue: GitHub.
Appendix: source
Thrown at inspector-module/inspector-web/src/main/java/com/navercorp/pinpoint/inspector/web/definition/YMLInspectorManager.java:77
List<String> definitionIdList = metricIdMap.computeIfAbsent(metric.getMetricName(), k -> new ArrayList<>());
definitionIdList.add(definitionId);
}
this.metricIdMap = metricIdMap;
List<String> metricIdSortOrder = mappings
.stream()
.map(MetricDefinition::getDefinitionId)
.collect(Collectors.toList());
metricInfoComparator = Comparator.comparing(metricInfo -> metricIdSortOrder.indexOf(metricInfo.getMetricDefinitionId()));
}
public MetricDefinition findElementOfBasicGroup(String metricDefinitionId) {
MetricDefinition metricDefinition = this.definitionIdMap.get(metricDefinitionId);
if (metricDefinition != null) {
return metricDefinition;
}
throw new UnsupportedOperationException("unsupported metric :" + metricDefinitionId);
}
public static boolean containedMatchingRule(MetricDefinition metricDefinition, MatchingRule matchingRule) {
for (Field field : metricDefinition.getFields()) {
if (matchingRule.equals(field.getMatchingRule())) {
return true;
}
}
return false;
}
}
View on GitHub (pinned to 744c3d3075)