SigNoz/signoz · error

operator %s not supported

Error message

operator %s not supported

What it means

Plain error from buildResourceSubQuery when translating legacy model tag filters into v3 filter items and the tag's Operator doesn't match any of the known cases (EqualTo, NotIn, In, etc.). It signals an unsupported/legacy operator string was passed in the trace search tags.

Source

Thrown at pkg/query-service/app/clickhouseReader/reader.go:367

			Key:      tag.Key,
			DataType: v3.AttributeKeyDataTypeString,
			Type:     v3.AttributeKeyTypeResource,
		}

		it := v3.FilterItem{
			Key: key,
		}

		// as of now only in and not in are supported
		switch tag.Operator {
		case model.NotInOperator:
			it.Operator = v3.FilterOperatorNotIn
			it.Value = tag.StringValues
		case model.InOperator:
			it.Operator = v3.FilterOperatorIn
			it.Value = tag.StringValues
		default:
			return "", fmt.Errorf("operator %s not supported", tag.Operator)
		}

		filterSet.Items = append(filterSet.Items, it)
	}
	filterSet.Items = append(filterSet.Items, v3.FilterItem{
		Key: v3.AttributeKey{
			Key:      "service.name",
			DataType: v3.AttributeKeyDataTypeString,
			Type:     v3.AttributeKeyTypeResource,
		},
		Operator: v3.FilterOperatorEqual,
		Value:    svc,
	})

	resourceSubQuery, err := resource.BuildResourceSubQuery(
		r.TraceDB,
		r.traceResourceTableV3,
		start.Unix()-1800,

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Map the tag operator to a supported one (equal/not-in/in and the other handled cases) before calling
  2. Upgrade the query-service so the builder supports the operator you need
  3. Validate/normalize operators on the API payload side
  4. File/track support for the missing operator in buildResourceSubQuery

Example fix

// before
tags := []model.TagQueryFilter{{Key: "http.method", Operator: "contains", StringValues: []string{"GET"}}}

// after
tags := []model.TagQueryFilter{{Key: "http.method", Operator: model.EqualOperator, StringValues: []string{"GET"}}}
Defensive patterns

Strategy: validation

Validate before calling

var supportedOps = map[string]bool{"=":true,"!=":true,"in":true,"not_in":true}
for _, t := range tags {
    if !supportedOps[t.Operator] { return fmt.Errorf("operator %s unsupported for resource filters", t.Operator) }
}

Type guard

func isSupportedTagOperator(op string) bool {
    switch op {
    case model.EqualOperator, model.InOperator, model.NotInOperator: return true
    }
    return false
}

Try / catch

// Sanitize before the call; no runtime catch needed
for i := range tags {
    if !isSupportedTagOperator(tags[i].Operator) {
        tags[i].Operator = model.EqualOperator // or reject
    }
}

Prevention

When it happens

Trigger: Calling GetTopOperations (or span-filter paths that build resource sub-queries) with a tag whose Operator is something like 'contains', 'regex', or a typo'd operator not handled in the switch — the default branch rejects it.

Common situations: Clients built against older/newer filter-operator enums, hand-crafted API payloads with arbitrary operator strings, or upstream code passing v3 operators not yet mapped in this legacy builder.

Related errors


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