SigNoz/signoz · error

unsupported operator: %s

Error message

unsupported operator: %s

What it means

buildResourceFiltersFromFilterItems encountered a FilterOperator that has no entry in resourceLogOperators and is therefore unsupported for resource (index) filters on logs. Only the operators mapped in resourceLogOperators can be used.

Source

Thrown at pkg/query-service/app/resource/resource_query_builder.go:259

		if logsOp, ok := resourceLogOperators[op]; ok {
			members := []string{keyName}
			if resolveSemconvFamilies {
				members = semconv.Members(semconv.KindAttribute, telemetrytypes.FieldKeySelector{
					Name:         keyName,
					Signal:       telemetrytypes.SignalTraces,
					FieldContext: telemetrytypes.FieldContextResource,
				})
			}
			// the filter
			if resourceFilter := buildResourceFilter(logsOp, keyName, op, value, members); resourceFilter != "" {
				conditions = append(conditions, resourceFilter)
			}
			// the additional filter for better usage of the index
			if resourceIndexFilter := buildResourceIndexFilter(keyName, op, value, members); resourceIndexFilter != "" {
				conditions = append(conditions, resourceIndexFilter)
			}
		} else {
			return nil, fmt.Errorf("unsupported operator: %s", op)
		}

	}

	return conditions, nil
}

func buildResourceFiltersFromGroupBy(groupBy []v3.AttributeKey) []string {
	var conditions []string

	for _, attr := range groupBy {
		if attr.Type != v3.AttributeKeyTypeResource {
			continue
		}
		conditions = append(conditions, fmt.Sprintf("(simpleJSONHas(labels, '%s') AND labels like '%%%s%%')", attr.Key, attr.Key))
	}
	return conditions
}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Check resourceLogOperators in resource_query_builder.go for the supported set and use one of those operators
  2. Move filters needing unsupported operators to body/attribute columns where they are allowed
  3. Fix typos in the operator string (must match v3.FilterOperator constants)

Example fix

// before
item.Operator = "regex" // on a resource attribute

// after
item.Operator = v3.FilterOperatorEqual // or filter a body attribute instead
Defensive patterns

Strategy: validation

Validate before calling

const supportedResourceOps = map[v3.FilterOperator]bool{ /* mirror resourceLogOperators */ }
if !supportedResourceOps[item.Operator] {
    return fmt.Errorf("operator %s unsupported for resource keys", item.Operator)
}

Type guard

func isSupportedResourceOp(op v3.FilterOperator) bool {
    _, ok := resourceLogOperators[op]
    return ok
}

Prevention

When it happens

Trigger: Using an operator like regex, contains-with-casing variants, or any new/unmapped operator on a resource attribute key in a logs query filter.

Common situations: Custom API clients or frontend changes introduce an operator string not supported for resource keys (only body/other columns support the fuller set); typos in operator strings such as 'equal' instead of '='.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/20987ccd0b5e681a. Report an issue: GitHub.