Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: add legend property to Queries (#2821)

Vishal Sharmaa3c917cca0b1
diff --git a/pkg/query-service/model/v3/v3.go b/pkg/query-service/model/v3/v3.go
index 166f4c57af..d2f8f45fa5 100644
--- a/pkg/query-service/model/v3/v3.go
+++ b/pkg/query-service/model/v3/v3.go
@@ -325,6 +325,7 @@ type PromQuery struct {
Query string `json:"query"`
Stats string `json:"stats,omitempty"`
Disabled bool `json:"disabled"`
+ Legend string `json:"legend,omitempty"`
}
func (p *PromQuery) Validate() error {
@@ -342,6 +343,7 @@ func (p *PromQuery) Validate() error {
type ClickHouseQuery struct {
Query string `json:"query"`
Disabled bool `json:"disabled"`
+ Legend string `json:"legend,omitempty"`
}
func (c *ClickHouseQuery) Validate() error {
@@ -419,6 +421,7 @@ type BuilderQuery struct {
Expression string `json:"expression"`
Disabled bool `json:"disabled"`
Having []Having `json:"having,omitempty"`
+ Legend string `json:"legend,omitempty"`
Limit uint64 `json:"limit"`
Offset uint64 `json:"offset"`
PageSize uint64 `json:"pageSize"`