{"record":{"id":"06337cac9d2d1236","repo":"apache/skywalking","slug":"slot-value-numtext-exceeds-the-supported-ran-06337c","errorCode":null,"errorMessage":"{slot} value '{numText}' exceeds the supported range (must fit in a Java int)","messagePattern":"(.+?) value '(.+?)' exceeds the supported range \\(must fit in a Java int\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java","lineNumber":909,"sourceCode":"        try {\n            return Long.parseLong(numText);\n        } catch (NumberFormatException e) {\n            throw new IllegalArgumentException(\n                slot + \" value '\" + numText + \"' exceeds the supported range \"\n                    + \"(must fit in a Java long)\");\n        }\n    }\n\n    /**\n     * Like {@link #parseStrictInteger} but additionally requires the value\n     * to fit in a Java {@code int}. Used by the {@code [index]} grammar\n     * slot, where silent narrowing of an oversized literal would wrap to a\n     * negative index instead of producing a clear error.\n     */\n    private static int parseStrictInt(final String numText, final String slot) {\n        final long value = parseStrictInteger(numText, slot);\n        if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {\n            throw new IllegalArgumentException(\n                slot + \" value '\" + numText + \"' exceeds the supported range \"\n                    + \"(must fit in a Java int)\");\n        }\n        return (int) value;\n    }\n\n    /**\n     * Parse a NUMBER literal text (which may carry an L/F/D suffix) as a Java double\n     * for use in {@link NumberConditionValue}. Suffix is stripped before parsing.\n     */\n    private static double parseLiteralAsDouble(final String numText) {\n        String t = numText;\n        if (!t.isEmpty()) {\n            final char last = t.charAt(t.length() - 1);\n            if (last == 'L' || last == 'l' || last == 'F' || last == 'f'\n                    || last == 'D' || last == 'd') {\n                t = t.substring(0, t.length() - 1);\n            }","sourceCodeStart":891,"sourceCodeEnd":927,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java#L891-L927","documentation":"IllegalArgumentException from MeterSystem.create(metricsName, functionName, ScopeType): the functionName is not present in the function register built at boot by scanning @MeterFunction classes under org.apache.skywalking. MAL scripts declare a function per metric value (avg, sum, max, min, rate...); an unknown name means the annotation's functionName() value and the script disagree, or the class carrying it never loaded.","triggerScenarios":"A MAL rule using a function name that has no @MeterFunction(functionName=...) match — e.g. a typo ('averge'), a function only available in a newer OAP, or a custom function jar missing from the classpath.","commonSituations":"Hand-editing MAL YAML and misspelling the function keyword; upgrading MAL rules ahead of the OAP binary (or vice versa); forgetting to drop the custom meter-function plugin into oap-libs.","solutions":["Correct the function name in the MAL value definition to a known function (avg, sum, max, min, rate, etc.)","If the function is a custom one, deploy the jar containing the @MeterFunction class where the OAP classloader scans it (org.apache.skywalking package)","Align MAL rule files with the deployed OAP version's function set"],"exampleFix":"# before\nmetricsMY_SERVICE:\n  value: my_service_qps\n  avgerage: true   # typo\n# after\nmetricsMY_SERVICE:\n  value: my_service_qps\n  avg: true","handlingStrategy":"validation","validationCode":"// known built-in functions include: avg, sum, max, min, rate, percent, etc.\nboolean known = Arrays.asList(\"avg\",\"sum\",\"max\",\"min\",\"rate\").contains(functionName);","typeGuard":null,"tryCatchPattern":"catch (IllegalArgumentException e) { log.error(\"MAL rule rejected, unknown function: {}\", e.getMessage()); /* fail rule load, keep OAP up */ }","preventionTips":["Spell-check function names in MAL YAML against the docs","Keep MAL rule files versioned with the OAP release they target"],"tags":["skywalking","oap","meter","mal","configuration"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}