Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lopes-felipe committed Jan 23, 2025
1 parent 77d1580 commit 2a40cb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/translator/zipkin/zipkinv2/to_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func zTagsToSpanLinks(tags map[string]string, dest ptrace.SpanLinkSlice) error {
if err := json.Unmarshal([]byte(jsonStr), &attrs); err != nil {
return err
}
if err := JsonMapToAttributeMap(attrs, link.Attributes()); err != nil {
if err := JSONMapToAttributeMap(attrs, link.Attributes()); err != nil {
return err
}

Expand Down Expand Up @@ -265,7 +265,7 @@ func populateSpanEvents(zspan *zipkinmodel.SpanModel, events ptrace.SpanEventSli
if err := json.Unmarshal([]byte(jsonStr), &attrs); err != nil {
return err
}
if err := JsonMapToAttributeMap(attrs, event.Attributes()); err != nil {
if err := JSONMapToAttributeMap(attrs, event.Attributes()); err != nil {
return err
}

Expand All @@ -278,7 +278,7 @@ func populateSpanEvents(zspan *zipkinmodel.SpanModel, events ptrace.SpanEventSli
return nil
}

func JsonMapToAttributeMap(attrs map[string]any, dest pcommon.Map) error {
func JSONMapToAttributeMap(attrs map[string]any, dest pcommon.Map) error {
for key, val := range attrs {
if s, ok := val.(string); ok {
dest.PutStr(key, s)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func tagsToSpanLinks(tags map[string]string, dest ptrace.SpanLinkSlice) error {

link.TraceState().FromRaw(span.Tracestate)

_ = zipkinv2.JsonMapToAttributeMap(span.Attributes, link.Attributes())
_ = zipkinv2.JSONMapToAttributeMap(span.Attributes, link.Attributes())
}

return nil
Expand Down

0 comments on commit 2a40cb0

Please sign in to comment.