apache/skywalking · error · IllegalArgumentException
Cannot parse interpolation expression: {expr}
Error message
Cannot parse interpolation expression: {expr} What it means
The internal counterpart of the previous two: MeterSystem.createInternal cannot find functionName in the function register. All public create overloads delegate here after resolving the data type, so the same root cause (unknown @MeterFunction name) surfaces at this line depending on which overload was entered.
Source
Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java:1062
/**
* Parses a standalone valueAccess expression string by wrapping it in
* a minimal LAL script and extracting the parsed ValueAccess.
*/
private static ValueAccess parseValueAccessExpr(final String expr) {
// Wrap in: filter { if (EXPR) { sink {} } }
// The expression becomes a condition, parsed as ExprCondition
// whose ValueAccess is what we want.
final String wrapper = "filter { if (" + expr + ") { sink {} } }";
final LALScriptModel model = parse(wrapper);
final IfBlock ifBlock = (IfBlock) model.getStatements().get(0);
final LALScriptModel.Condition cond = ifBlock.getCondition();
if (cond instanceof ExprCondition) {
return ((ExprCondition) cond).getExpr();
}
if (cond instanceof ComparisonCondition) {
return ((ComparisonCondition) cond).getLeft();
}
throw new IllegalArgumentException(
"Cannot parse interpolation expression: " + expr);
}
}
View on GitHub (pinned to 102af09b4a)
Solutions
- Log/verify the exact functionName string against the registered names (inspect the @MeterFunction(functionName=...) values on the classpath)
- Fix the rule or caller to use a registered name
- Redeploy the custom function jar intact and confirm OAP boots without classload errors
Example fix
// before
meterSystem.create("my_metric", "avgerage", ScopeType.SERVICE, pool, cl, opt);
// after
meterSystem.create("my_metric", "avg", ScopeType.SERVICE, pool, cl, opt); Defensive patterns
Strategy: validation
Try / catch
catch (IllegalArgumentException e) { log.error("meter creation failed: {}", e.getMessage()); /* reject the single rule, don't crash the receiver */ } Prevention
- Cross-check functionName against @MeterFunction annotations when writing custom integrations
- Watch boot logs for classload errors that silently shrink the function register
When it happens
Trigger: Any meter creation path whose functionName lookup misses — MAL rule compilation, custom code calling MeterSystem.create directly with a wrong name, or a custom function class that failed to load during the boot scan (broken jar suppressed the registration).
Common situations: Direct MeterSystem API use in custom receivers; a partially deployed custom-plugin jar where some classes failed to load; renaming a function without updating all rule files.
Related errors
- Unsupported extractor statement in LAL rule at line {sourceL
- {slot} value '{numText}' exceeds the supported range (must f
- {slot} value '{numText}' exceeds the supported range (must f
- Unclosed interpolation in: {s}
- tag() requires exactly one string literal argument, e.g. tag
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/666888c6ae9cf3a4.
Report an issue: GitHub.