{"record":{"id":"9bff0420e695c51f","repo":"SigNoz/signoz","slug":"starttimemillis-is-required","errorCode":null,"errorMessage":"startTimeMillis is required","messagePattern":"startTimeMillis is required","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/query-service/model/v3/v3.go","lineNumber":328,"sourceCode":"\tAggregateOperator          AggregateOperator    `json:\"aggregateOperator\"`\n\tAggregateAttribute         string               `json:\"aggregateAttribute\"`\n\tFilterAttributeKey         string               `json:\"filterAttributeKey\"`\n\tFilterAttributeKeyDataType AttributeKeyDataType `json:\"filterAttributeKeyDataType\"`\n\tTagType                    TagType              `json:\"tagType\"`\n\tSearchText                 string               `json:\"searchText\"`\n\tLimit                      int                  `json:\"limit\"`\n\tExistingFilterItems        []FilterItem         `json:\"existingFilterItems\"`\n\tMetricNames                []string             `json:\"metricNames\"`\n\tIncludeRelated             bool                 `json:\"includeRelated\"`\n}\n\nfunc (f *FilterAttributeValueRequest) Validate() error {\n\tif f.FilterAttributeKey == \"\" {\n\t\treturn fmt.Errorf(\"filterAttributeKey is required\")\n\t}\n\n\tif f.StartTimeMillis == 0 {\n\t\treturn fmt.Errorf(\"startTimeMillis is required\")\n\t}\n\n\tif f.EndTimeMillis == 0 {\n\t\treturn fmt.Errorf(\"endTimeMillis is required\")\n\t}\n\n\tif f.Limit == 0 {\n\t\tf.Limit = 100\n\t}\n\n\tif f.Limit > 1000 {\n\t\treturn fmt.Errorf(\"limit must be less than 1000\")\n\t}\n\n\tif f.ExistingFilterItems != nil {\n\t\tfor _, value := range f.ExistingFilterItems {\n\t\t\tif value.Key.Key == \"\" {\n\t\t\t\treturn fmt.Errorf(\"existingFilterItems must contain a valid key\")","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/model/v3/v3.go#L310-L346","documentation":"FilterAttributeValueRequest.Validate() requires a non-zero StartTimeMillis. The value lookup is a time-bounded query over log/span data, so a start timestamp is mandatory.","triggerScenarios":"POSTing to the attribute_value autocomplete endpoint with startTimeMillis omitted or 0 — typically because the client only set endTimeMillis, or serialized timestamps under a wrong key name.","commonSituations":"Clients passing seconds instead of expecting milliseconds and then zero-truncating, missing time-picker state in the UI, or field-name typos (startTime vs start in older API versions).","solutions":["Set startTimeMillis to a unix-epoch millisecond value (e.g. time.Now().Add(-15*time.Minute).UnixMilli())","Double-check you're sending milliseconds, not seconds","Match the exact JSON key startTimeMillis"],"exampleFix":"// before\n{\"filterAttributeKey\":\"http.method\",\"endTimeMillis\":1700003600000}\n\n// after\n{\"filterAttributeKey\":\"http.method\",\"startTimeMillis\":1700000000000,\"endTimeMillis\":1700003600000}","handlingStrategy":"validation","validationCode":"if req.StartTimeMillis <= 0 { return errors.New(\"startTimeMillis (unix ms) is required\") }","typeGuard":"func hasStartTime(r *v3.FilterAttributeValueRequest) bool { return r != nil && r.StartTimeMillis > 0 }","tryCatchPattern":null,"preventionTips":["Always derive both bounds from a time-range picker","Use UnixMilli() in Go clients"],"tags":["go","validation","missing-field","timestamp","signoz"],"backgroundTag":"missing-required-field","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}