apache/skywalking · error · IllegalArgumentException
Unclosed interpolation in: {s}
Error message
Unclosed interpolation in: {s} What it means
Same unknown-function failure as the 3-arg create, but from the extended MeterSystem.create(metricsName, functionName, ScopeType, ClassPool, ClassLoader, StorageManipulationOpt) overload used by the MAL runtime compiler. The functionName lookup in functionRegister fails for identical reasons: no @MeterFunction class registered under that name.
Source
Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java:1033
}
// Literal text before ${
if (start > pos) {
parts.add(InterpolationPart.ofLiteral(s.substring(pos, start)));
}
// Find matching closing brace, respecting nesting
int depth = 1;
int i = start + 2;
while (i < s.length() && depth > 0) {
final char c = s.charAt(i);
if (c == '{') {
depth++;
} else if (c == '}') {
depth--;
}
i++;
}
if (depth != 0) {
throw new IllegalArgumentException(
"Unclosed interpolation in: " + s);
}
final String expr = s.substring(start + 2, i - 1);
// Parse the expression as a valueAccess through ANTLR
parts.add(InterpolationPart.ofExpression(parseValueAccessExpr(expr)));
pos = i;
}
return parts;
}
/**
* 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.View on GitHub (pinned to 102af09b4a)
Solutions
- Fix the function name in the MAL config to match an existing @MeterFunction functionName
- Ensure custom function classes live under org.apache.skywalking and are on the OAP classpath
- Check the OAP log at startup — the scan-based register is built in the MeterSystem constructor; load errors there explain empty entries
Defensive patterns
Strategy: validation
Try / catch
catch (IllegalArgumentException e) { throw new RuntimeException("MAL compilation failed for function '" + functionName + "'", e); } Prevention
- Validate MAL configs before deploying (OAP dry-run or linter)
- Deploy custom @MeterFunction jars under org.apache.skywalking packages
When it happens
Trigger: The MAL analyzer compiles a rule and calls this overload with a function name absent from the register — typo'd name, custom function not on the classpath, or name drift after upgrading OAP where a function was renamed.
Common situations: Loading meter-analyzer-config YAML at boot or via dynamic configuration; custom MAL functions packaged outside the scanned org.apache.skywalking packages; mixing rule versions with the OAP binary.
Related errors
- {slot} value '{numText}' exceeds the supported range (must f
- Load meter analyzer configs failed
- Unsupported extractor statement in LAL rule at line {sourceL
- {slot} value '{numText}' exceeds the supported range (must f
- Cannot parse interpolation expression: {expr}
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/8dfcd0a145ff91a8.
Report an issue: GitHub.