pinpoint-apm/pinpoint · error · UnsupportedOperationException
slot type:${slot}
Error message
slot type:${slot} What it means
DefaultActiveTraceHistogram maintains counters per histogram slot (FAST, NORMAL, SLOW, VERY_SLOW). increment() switches on the slot and has no case for other codes; any unrecognized slot value falls into a default branch that throws UnsupportedOperationException("slot type:" + slot). This means the ActiveTrace histogram was fed a code outside the configured HistogramSchema's expected slots.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/active/DefaultActiveTraceHistogram.java:62
public void increment(HistogramSlot slot) {
Objects.requireNonNull(slot, "slot");
final SlotType slotType = slot.getSlotType();
switch (slotType) {
case FAST:
this.fastCount++;
return;
case NORMAL:
this.normalCount++;
return;
case SLOW:
this.slowCount++;
return;
case VERY_SLOW:
this.verySlowCount++;
return;
default:
throw new UnsupportedOperationException("slot type:" + slot);
}
}
@Override
public HistogramSchema getHistogramSchema() {
return histogramSchema;
}
@Override
public int getFastCount() {
return fastCount;
}
@Override
public int getNormalCount() {
return normalCount;
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Pass slot codes obtained from histogramSchema's slot list (getHistogramSchema().findHistogramSlot(code)) rather than raw codes.
- Verify the HistogramSchema used to construct DefaultActiveTraceHistogram matches the one producing the slot codes (same schema instance/type).
- Log the offending slot value and map it to a valid slot before incrementing; skip unmapped codes defensively.
- Check agent plugin configs for custom slot codes unsupported by the default schema.
- If a custom schema is needed, extend the histogram implementation to handle its slots instead of relying on the default.
Example fix
// before
histogram.increment(rawCode); // may throw for unknown slot
// after
HistogramSlot slot = schema.findHistogramSlot(rawCode);
if (slot != null) {
histogram.increment(slot.getSlotCode());
} Defensive patterns
Strategy: validation
Validate before calling
HistogramSlot slot = schema.findHistogramSlot(code);
if (slot != null && schema.containsSlot(slot.getSlotCode())) {
histogram.increment(slot.getSlotCode());
} Type guard
boolean isValidSlot(HistogramSchema schema, short code) {
return schema.findHistogramSlot(code) != null;
} Try / catch
try {
histogram.increment(slot);
} catch (UnsupportedOperationException e) {
logger.warn("Unknown histogram slot: {}", slot, e);
} Prevention
- Derive slot codes from the histogram's own HistogramSchema, never hardcode
- Use one shared schema instance across producer and histogram
- Map unknown codes through findHistogramSlot and skip nulls
- Cover custom slot configs in unit tests
- Log offending slot values instead of letting them crash telemetry collection
When it happens
Trigger: Calling increment(slot) — directly or via getActiveTraceHistogram()/getCounter() — with a short slot code that is not one of the schema's slot codes, e.g. a code from a different HistogramSchema mixed into the same histogram, or an uninitialized/default (0) slot code.
Common situations: Custom slot/annotation configuration whose schema differs from the one the histogram was built with; plugin code passing raw 'code' values instead of the schema's canonical slot codes; version changes where schema slot codes shifted between agent components.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- UNSUPPORTED_OPERATION
- Failed to detect pinpoint profile. Please add -Dpinpoint.act
- unsupported profile or profile alias:
- startTime not recorded
- value
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/0bb6a7047c476aa5.
Report an issue: GitHub.