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(backend): support custom events in span

makeavishbdeadaeff607
diff --git a/pkg/query-service/model/response.go b/pkg/query-service/model/response.go
index fb5c460747..7526505d33 100644
--- a/pkg/query-service/model/response.go
+++ b/pkg/query-service/model/response.go
@@ -205,17 +205,8 @@ func (item *SearchSpanReponseItem) GetValues() []interface{} {
for _, item := range references {
referencesStringArray = append(referencesStringArray, item.toString())
}
- var errorEvent map[string]interface{}
- for _, e := range item.Events {
- json.Unmarshal([]byte(e), &errorEvent)
- if errorEvent["name"] == "exception" {
- break
- } else {
- errorEvent = nil
- }
- }
- returnArray := []interface{}{int64(timeObj.UnixNano() / 1000000), item.SpanID, item.TraceID, item.ServiceName, item.Name, strconv.Itoa(int(item.Kind)), strconv.FormatInt(item.DurationNano, 10), item.TagsKeys, item.TagsValues, referencesStringArray, errorEvent, item.HasError}
+ returnArray := []interface{}{int64(timeObj.UnixNano() / 1000000), item.SpanID, item.TraceID, item.ServiceName, item.Name, strconv.Itoa(int(item.Kind)), strconv.FormatInt(item.DurationNano, 10), item.TagsKeys, item.TagsValues, referencesStringArray, item.Events, item.HasError}
return returnArray
}