SigNoz/signoz · error

invalid panel type: %s

Error message

invalid panel type: %s

What it means

PanelType.Validate() rejects a panel type outside the supported set: "value" (PanelTypeValue), "graph" (PanelTypeGraph), "table" (PanelTypeTable), "list" (PanelTypeList), "trace" (PanelTypeTrace). Panel type shapes how builder queries are validated and rendered.

Source

Thrown at pkg/query-service/model/v3/v3.go:218

	}
}

type PanelType string

const (
	PanelTypeValue PanelType = "value"
	PanelTypeGraph PanelType = "graph"
	PanelTypeTable PanelType = "table"
	PanelTypeList  PanelType = "list"
	PanelTypeTrace PanelType = "trace"
)

func (p PanelType) Validate() error {
	switch p {
	case PanelTypeValue, PanelTypeGraph, PanelTypeTable, PanelTypeList, PanelTypeTrace:
		return nil
	default:
		return fmt.Errorf("invalid panel type: %s", p)
	}
}

// AggregateAttributeRequest is a request to fetch possible attribute keys
// for a selected aggregate operator and search text.
// The context of the selected aggregate operator is used as the
// type of the attribute key is different for different aggregate operators.
// For example, for the aggregate operator "avg" the attribute value type must be
// a number
type AggregateAttributeRequest struct {
	DataSource DataSource        `json:"dataSource"`
	Operator   AggregateOperator `json:"aggregateOperator"`
	SearchText string            `json:"searchText"`
	Limit      int               `json:"limit"`
}

type TagType string

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Use one of the exact strings: "value", "graph", "table", "list", "trace"
  2. Map Grafana-style names: timeseries→graph, stat→value, table stays table, traces→trace
  3. Set panelType on every composite query request; do not rely on defaults

Example fix

// before
cq.PanelType = v3.PanelType("timeseries")

// after
cq.PanelType = v3.PanelTypeGraph
Defensive patterns

Strategy: validation

Validate before calling

switch cq.PanelType { case v3.PanelTypeValue, v3.PanelTypeGraph, v3.PanelTypeTable, v3.PanelTypeList, v3.PanelTypeTrace: default: return fmt.Errorf("bad panelType %q", cq.PanelType) }

Type guard

func isValidPanelType(p v3.PanelType) bool { switch p { case v3.PanelTypeValue, v3.PanelTypeGraph, v3.PanelTypeTable, v3.PanelTypeList, v3.PanelTypeTrace: return true }; return false }

Prevention

When it happens

Trigger: Sending a v3 query request with compositeQuery.panelType set to "timeseries", "scatter", "traces", "" etc. PanelType flows into BuilderQuery.Validate(panelType), so an invalid value fails request validation.

Common situations: Frontends built against a different dashboarding vocabulary (Grafana panel names), missing panelType field in scripted API calls, version skew after panel types were added or renamed.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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