Skip to content

Commit

Permalink
chore: signozlogspipelineprocessor: use jsoniter for parsing body JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-k-singh committed Oct 10, 2024
1 parent 0aeed7a commit e3feb55
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"

jsoniter "github.com/json-iterator/go"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry"
)

Expand Down Expand Up @@ -83,7 +84,7 @@ func parseBodyJson(entry *entry.Entry) map[string]any {

if hasBytes {
var parsedBody map[string]any
err := json.Unmarshal(bodyBytes, &parsedBody)
err := jsoniter.ConfigFastest.Unmarshal(bodyBytes, &parsedBody)
if err == nil {
// Attributes keys starting with InternalTempAttributePrefix
// get ignored when entries are converted back to plog.Logs
Expand Down

0 comments on commit e3feb55

Please sign in to comment.