{"record":{"id":"fd1581bdaa1a8acb","repo":"SigNoz/signoz","slug":"invalid-input-fd1581","errorCode":"invalid_input","errorMessage":"PipelineOperator.ID is required","messagePattern":"PipelineOperator\\.ID is required","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/types/pipelinetypes/pipeline.go","lineNumber":271,"sourceCode":"\n\t\tif op.ID == op.Output {\n\t\t\treturn errors.NewInvalidInputf(errors.CodeInvalidInput, \"id and output cannot be same\")\n\t\t}\n\n\t\terr := isValidOperator(op)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tidUnique[op.ID] = struct{}{}\n\t\toutputUnique[op.Output] = struct{}{}\n\t}\n\treturn nil\n}\n\nfunc isValidOperator(op PipelineOperator) error {\n\tif op.ID == \"\" {\n\t\treturn errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, \"PipelineOperator.ID is required\")\n\t}\n\n\tswitch op.Type {\n\tcase \"json_parser\":\n\t\tif op.ParseFrom == \"\" && op.ParseTo == \"\" {\n\t\t\treturn errors.NewInvalidInputf(errors.CodeInvalidInput, \"parse from and parse to of %s json operator cannot be empty\", op.ID)\n\t\t}\n\n\t\tfor k := range op.Mapping {\n\t\t\tif !slices.Contains(validMappingVariableTypes, strings.ToLower(k)) {\n\t\t\t\treturn errors.NewInvalidInputf(errors.CodeInvalidInput, \"%s is not a valid mapping type in processor %s\", k, op.ID)\n\t\t\t}\n\t\t}\n\tcase \"grok_parser\":\n\t\tif op.Pattern == \"\" {\n\t\t\treturn errors.NewInvalidInputf(errors.CodeInvalidInput, \"pattern of %s grok operator cannot be empty\", op.ID)\n\t\t}\n\tcase \"regex_parser\":","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/types/pipelinetypes/pipeline.go#L253-L289","documentation":"isValidOperator (used by Pipeline.IsValid) requires every operator in a pipeline config to have a non-empty ID before its type-specific validation runs. Operator IDs identify operators in references and error messages.","triggerScenarios":"Creating/updating a logging pipeline where an operator entry in spec.pipeline operators[] has no id field or an empty string id.","commonSituations":"Pipeline YAML/JSON authored by hand omitting id; conversion from other formats (Fluent Bit) that drop operator names; UI regressions not generating unique ids.","solutions":["Add a unique non-empty id to each operator (e.g. json_parser_input)","Check the pipeline schema — id is required for all operator types","Use the SigNoz pipeline UI which auto-generates ids","Validate with IsValid client-side before submitting"],"exampleFix":"// before\n{\"type\":\"json_parser\",\"parseFrom\":\"body\"}\n// after\n{\"id\":\"parse_body\",\"type\":\"json_parser\",\"parseFrom\":\"body\"}\n","handlingStrategy":"validation","validationCode":"pipeline.operators.every(op => typeof op.id === 'string' && op.id.length > 0)","typeGuard":"function operatorsHaveIDs(ops: Array<{id?:string}>): boolean { return ops.every(o => typeof o.id === 'string' && o.id !== ''); }","tryCatchPattern":null,"preventionTips":["Auto-generate ids in pipeline builders","Run IsValid client-side before create/update"],"tags":["pipeline","operators","validation","go"],"backgroundTag":"required-field-missing","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}