mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-09-23 05:53:12 +08:00
fix: encode event string to fix parsing at frontend
This commit is contained in:
parent
bdeadaeff6
commit
3e24e371f4
@ -4,6 +4,7 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -205,8 +206,13 @@ func (item *SearchSpanReponseItem) GetValues() []interface{} {
|
|||||||
for _, item := range references {
|
for _, item := range references {
|
||||||
referencesStringArray = append(referencesStringArray, item.toString())
|
referencesStringArray = append(referencesStringArray, item.toString())
|
||||||
}
|
}
|
||||||
|
events := []string{}
|
||||||
|
// encoding event string due to bug in frontend parser
|
||||||
|
for _, e := range item.Events {
|
||||||
|
events = append(events, url.QueryEscape(e))
|
||||||
|
}
|
||||||
|
|
||||||
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}
|
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, events, item.HasError}
|
||||||
|
|
||||||
return returnArray
|
return returnArray
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user