apache/skywalking · error · IllegalArgumentException

Unsupported filter: {}

Error message

Unsupported filter: {}

What it means

The final fallthrough in MetricDefinitionEnricher's operator-to-matcher mapping: the filter's value matched none of the known FilterValue kinds (boolean, number, string, array, null, enum). It indicates a value classification the enricher cannot lower to any matcher expression, so it refuses to generate code rather than emit a broken matcher.

Source

Thrown at oap-server/oal-rt/src/main/java/org/apache/skywalking/oal/v2/generator/MetricDefinitionEnricher.java:497

                case LIKE: return "likeMatch";
                case CONTAIN: return "containMatch";
                case NOT_CONTAIN: return "notContainMatch";
                default: throw new IllegalArgumentException("Unsupported string operator: " + op);
            }
        } else if (value.isArray()) {
            return "inMatch";
        } else if (value.isNull()) {
            return op == FilterOperator.EQUAL ? "stringMatch" : "notEqualMatch";
        } else if (value.isEnum()) {
            // Enum comparisons use string matching (e.g., type == RequestType.MQ)
            switch (op) {
                case EQUAL: return "stringMatch";
                case NOT_EQUAL: return "notEqualMatch";
                default: throw new IllegalArgumentException("Unsupported enum operator: " + op);
            }
        }

        throw new IllegalArgumentException("Unsupported filter: " + filterExpr);
    }

    /**
     * Collect persistent fields from metrics class @Column annotations.
     */
    private List<CodeGenModel.DataFieldV2> collectPersistentFields(Class<? extends Metrics> metricsClass) {
        List<CodeGenModel.DataFieldV2> persistentFields = new ArrayList<>();
        Class<?> c = metricsClass;
        while (!c.equals(Object.class)) {
            for (Field field : c.getDeclaredFields()) {
                Column column = field.getAnnotation(Column.class);
                if (column != null) {
                    persistentFields.add(CodeGenModel.DataFieldV2.builder()
                        .fieldName(field.getName())
                        .columnName(column.name())
                        .type(field.getType())
                        .typeName(field.getType().getName())
                        .build());

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Rewrite the OAL filter to use a plainly supported value form (number, string, boolean, in-list, enum, null comparison)
  2. If extending the model, add the new kind to mapOperatorToExpressionType before the fallthrough
  3. Run mvnw clean install to eliminate stale-class inconsistency
Defensive patterns

Strategy: type-guard

Type guard

// Guard: a FilterValue must carry exactly one recognized kind before enrichment
boolean classified(FilterValue v) {
    return v.isBoolean() || v.isNumber() || v.isString()
        || v.isArray() || v.isNull() || v.isEnum();
}

Try / catch

Only relevant to oal-rt contributors: assert in unit tests that every parsed filter classifies; a production hit means a model bug, so file/fix rather than catch.

Prevention

When it happens

Trigger: A FilterValue instance whose kind flags are all false — e.g. a new FilterValue variant added to the model without a mapping branch, or an internal inconsistency where a value is constructed with no type set. Not reachable through well-formed OAL text alone.

Common situations: Developing new FilterValue kinds in oal-rt; corrupt state from partial/incremental builds mixing old and new model classes.

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/fe18246741dd07da. Report an issue: GitHub.