{"record":{"id":"4f50020bb3cfb139","repo":"SigNoz/signoz","slug":"unsupported-operator-s-4f5002","errorCode":null,"errorMessage":"unsupported operator %s","messagePattern":"unsupported operator (.+?)","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/query-service/app/traces/v4/query_builder.go","lineNumber":158,"sourceCode":"\t\t\t\tcase v3.FilterOperatorExists, v3.FilterOperatorNotExists:\n\t\t\t\t\tif item.Key.IsColumn {\n\t\t\t\t\t\tsubQuery, err := existsSubQueryForFixedColumn(item.Key, item.Operator)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn \"\", err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconditions = append(conditions, subQuery)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcType := getClickHouseTracesColumnType(item.Key.Type)\n\t\t\t\t\t\tcDataType := getClickHouseTracesColumnDataType(item.Key.DataType)\n\t\t\t\t\t\tcol := fmt.Sprintf(\"%s_%s\", cType, cDataType)\n\t\t\t\t\t\tconditions = append(conditions, fmt.Sprintf(operator, col, item.Key.Key))\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tconditions = append(conditions, fmt.Sprintf(\"%s %s %s\", columnName, operator, fmtVal))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn \"\", fmt.Errorf(\"unsupported operator %s\", item.Operator)\n\t\t\t}\n\t\t}\n\t}\n\tqueryString := strings.Join(conditions, \" AND \")\n\n\treturn queryString, nil\n}\n\nfunc handleEmptyValuesInGroupBy(groupBy []v3.AttributeKey) (string, error) {\n\t// TODO(nitya): in future when we support user based mat column handle them\n\t// skipping now as we don't support creating them\n\tfilterItems := []v3.FilterItem{}\n\tif len(groupBy) != 0 {\n\t\tfor _, item := range groupBy {\n\t\t\tif !item.IsColumn {\n\t\t\t\tfilterItems = append(filterItems, v3.FilterItem{\n\t\t\t\t\tKey:      item,\n\t\t\t\t\tOperator: v3.FilterOperatorExists,","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/traces/v4/query_builder.go#L140-L176","documentation":"BuildTracesFilterQuery (v4 traces builder) received a filter operator absent from tracesOperatorMappingV3, so it cannot map the operator to ClickHouse SQL and aborts with the operator name.","triggerScenarios":"Passing an unknown/unsupported operator string (typos, empty operator, logs-only operators) in the FilterSet of any v4 traces endpoint: ValidateTraces, funnel/step analytics, slow or errored traces.","commonSituations":"Reusing filter JSON from logs queries on trace endpoints; clients built against older operator constant names.","solutions":["Use v3.FilterOperator constants present in tracesOperatorMappingV3","Normalize (trim, lowercase) operator strings before sending","Validate operators client-side against the supported list"],"exampleFix":"// before\n{\"operator\":\"contains\",\"key\":{\"key\":\"service.name\"}} // if unsupported\n\n// after\n{\"operator\":\"like\",\"key\":{\"key\":\"service.name\"}}","handlingStrategy":"validation","validationCode":"if _, ok := tracesOperatorMappingV3[item.Operator]; !ok {\n    return fmt.Errorf(\"operator %s not supported on traces\", item.Operator)\n}","typeGuard":"func isTraceOp(op v3.FilterOperator) bool {\n    _, ok := tracesOperatorMappingV3[op]\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Never share filter JSON across data sources blindly","Keep operator whitelist in the client in sync with the server"],"tags":["signoz","traces","v4","operator","validation"],"backgroundTag":"unsupported-filter-operator","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}