mirror of
https://github.com/alibaba/higress.git
synced 2026-05-21 19:27:28 +08:00
add trace_span_key & as_seperate_log_field configuration for ai-statistics (#2488)
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
func unmarshalStr(marshalledJsonStr string) string {
|
||||
func UnmarshalStr(marshalledJsonStr string) string {
|
||||
// e.g. "{\"field1\":\"value1\",\"field2\":\"value2\"}"
|
||||
var jsonStr string
|
||||
err := json.Unmarshal([]byte(marshalledJsonStr), &jsonStr)
|
||||
@@ -19,7 +19,7 @@ func unmarshalStr(marshalledJsonStr string) string {
|
||||
return jsonStr
|
||||
}
|
||||
|
||||
func marshalStr(raw string) string {
|
||||
func MarshalStr(raw string) string {
|
||||
// e.g. {"field1":"value1","field2":"value2"}
|
||||
helper := map[string]string{
|
||||
"placeholder": raw,
|
||||
|
||||
Reference in New Issue
Block a user