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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: add errorCount in top_operations API (#2636)
Vishal Sharma33ac5b79bed9
diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.goindex 197997409f..39f9c38992 100644--- a/pkg/query-service/app/clickhouseReader/reader.go+++ b/pkg/query-service/app/clickhouseReader/reader.go@@ -1854,6 +1854,7 @@ func (r *ClickHouseReader) GetTopOperations(ctx context.Context, queryParams *moquantile(0.95)(durationNano) as p95,quantile(0.99)(durationNano) as p99,COUNT(*) as numCalls,+ countIf(statusCode=2) as errorCount,nameFROM %s.%sWHERE serviceName = @serviceName AND timestamp>= @start AND timestamp<= @end`,diff --git a/pkg/query-service/model/response.go b/pkg/query-service/model/response.goindex d6a0570234..31d5a05ae6 100644--- a/pkg/query-service/model/response.go+++ b/pkg/query-service/model/response.go@@ -272,6 +272,7 @@ type TopOperationsItem struct {Percentile95 float64 `json:"p95" ch:"p95"`Percentile99 float64 `json:"p99" ch:"p99"`NumCalls uint64 `json:"numCalls" ch:"numCalls"`+ ErrorCount uint64 `json:"errorCount" ch:"errorCount"`Name string `json:"name" ch:"name"`}