pinpoint-apm/pinpoint · error · IllegalArgumentException
unknown operator. operator=
Error message
unknown operator. operator=${operator} What it means
traversal() dispatches on the operator's type (AND/OR etc.). When the operator's opcode matches none of the supported branch types, it falls into the final else and throws IllegalArgumentException. This means the MatcherOperand carried an operator code unknown to this matcher implementation.
Solutions
- Print/log the operator value and confirm it is one of MatcherOperator's supported constants (AND/OR/JOIN...)
- Extend DefaultTransformerMatcher.traversal() to handle the new operator type, or replace the operand with a supported combination
- Align plugin and profiler versions so both sides use the same operator constants
Example fix
// before MatcherOperand op = new MatcherJoinOperator(MatcherOperator.XOR, left, right); // unsupported // after MatcherOperand op = left.joinAnd(new NotOperand(right)); // express with supported AND/NOT
Defensive patterns
Strategy: validation
Validate before calling
int opcode = operator.getOperator();
if (opcode != MatcherOperator.AND && opcode != MatcherOperator.OR && opcode != MatcherOperator.JOIN) {
throw new IllegalArgumentException("operator not supported by DefaultTransformerMatcher: " + opcode);
} Type guard
boolean isSupportedOperator(MatcherOperand op) {
return op instanceof MatcherBinaryOperator
&& (op.getOperator() == MatcherOperator.AND || op.getOperator() == MatcherOperator.OR);
} Try / catch
try {
transformerMatcher.match(classLoader, operand, metadata);
} catch (IllegalArgumentException e) {
logger.warn("Unsupported operator skipped: {}", e.getMessage());
} Prevention
- Only use documented MatcherOperator constants
- If adding a new operator, extend traversal() in the same change
- Pin plugin and profiler to the same version
When it happens
Trigger: A MatcherOperand whose operator value is outside the set handled by traversal() (JOIN/AND/NOT etc.) is passed to match(); typically from custom or newly-defined operator constants not supported by this Pinpoint version.
Common situations: Adding a custom operator code to the matching DSL without extending DefaultTransformerMatcher; mixing operand objects from different Pinpoint versions whose operator constants differ.
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 matcher
- Ignore class file transformer
- Transformer already exist. className
- agentStartTimeIndex not found
- application serviceType not found. code:, name:
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/7360577ef51174b5.
Report an issue: GitHub.
Appendix: source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/transformer/DefaultTransformerMatcher.java:294
// cost-based execution plan.
firstOperand = rightOperand;
secondOperand = leftOperand;
}
if (operand instanceof OrMatcherOperator) {
// OR
if (match(classLoader, firstOperand, classMetadata)) {
return true;
}
return match(classLoader, secondOperand, classMetadata);
} else if (operand instanceof AndMatcherOperator) {
// AND
if (match(classLoader, firstOperand, classMetadata)) {
return match(classLoader, secondOperand, classMetadata);
}
return false;
} else {
throw new IllegalArgumentException("unknown operator. operator=" + operator);
}
}
}View on GitHub (pinned to 744c3d3075)