mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 06:09:00 +08:00
feat(backend): support custom events in span
This commit is contained in:
parent
938f42bd4f
commit
bdeadaeff6
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user