SigNoz/signoz · error
startTimeMillis is required
Error message
startTimeMillis is required
What it means
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.
Source
Thrown at pkg/query-service/model/v3/v3.go:328
AggregateOperator AggregateOperator `json:"aggregateOperator"`
AggregateAttribute string `json:"aggregateAttribute"`
FilterAttributeKey string `json:"filterAttributeKey"`
FilterAttributeKeyDataType AttributeKeyDataType `json:"filterAttributeKeyDataType"`
TagType TagType `json:"tagType"`
SearchText string `json:"searchText"`
Limit int `json:"limit"`
ExistingFilterItems []FilterItem `json:"existingFilterItems"`
MetricNames []string `json:"metricNames"`
IncludeRelated bool `json:"includeRelated"`
}
func (f *FilterAttributeValueRequest) Validate() error {
if f.FilterAttributeKey == "" {
return fmt.Errorf("filterAttributeKey is required")
}
if f.StartTimeMillis == 0 {
return fmt.Errorf("startTimeMillis is required")
}
if f.EndTimeMillis == 0 {
return fmt.Errorf("endTimeMillis is required")
}
if f.Limit == 0 {
f.Limit = 100
}
if f.Limit > 1000 {
return fmt.Errorf("limit must be less than 1000")
}
if f.ExistingFilterItems != nil {
for _, value := range f.ExistingFilterItems {
if value.Key.Key == "" {
return fmt.Errorf("existingFilterItems must contain a valid key")View on GitHub (pinned to 5069bf80b0)
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
Example fix
// before
{"filterAttributeKey":"http.method","endTimeMillis":1700003600000}
// after
{"filterAttributeKey":"http.method","startTimeMillis":1700000000000,"endTimeMillis":1700003600000} Defensive patterns
Strategy: validation
Validate before calling
if req.StartTimeMillis <= 0 { return errors.New("startTimeMillis (unix ms) is required") } Type guard
func hasStartTime(r *v3.FilterAttributeValueRequest) bool { return r != nil && r.StartTimeMillis > 0 } Prevention
- Always derive both bounds from a time-range picker
- Use UnixMilli() in Go clients
When it happens
Trigger: 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.
Common situations: 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).
Understand the failure class
Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.
Related errors
- endTimeMillis is required
- filterAttributeKey is required
- query is empty
- composite query is required
- composite query must contain at least one query type
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/9bff0420e695c51f.
Report an issue: GitHub.