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.

feat: bug-fix in ClickHouseFormattedValue to allow strings

shivanshufaa6fdfcde84
diff --git a/pkg/query-service/utils/format.go b/pkg/query-service/utils/format.go
index bd7db15e6b..4de081940d 100644
--- a/pkg/query-service/utils/format.go
+++ b/pkg/query-service/utils/format.go
@@ -190,6 +190,19 @@ func ClickHouseFormattedValue(v interface{}) string {
zap.L().Error("invalid type for formatted value", zap.Any("type", reflect.TypeOf(x[0])))
return "[]"
}
+ case []string:
+ if len(x) == 0 {
+ return "[]"
+ }
+ str := "["
+ for idx, sVal := range x {
+ str += fmt.Sprintf("'%s'", QuoteEscapedString(sVal))
+ if idx != len(x)-1 {
+ str += ","
+ }
+ }
+ str += "]"
+ return str
default:
zap.L().Error("invalid type for formatted value", zap.Any("type", reflect.TypeOf(x)))
return ""