Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
meenal-developer committed Apr 30, 2024
1 parent a21977d commit 59a41ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/datadogreceiver/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ func toTraces(payload *pb.TracerPayload, req *http.Request) ptrace.Traces {
}
}
}

mwAPIKey := req.Header.Get("dd-api-key")
results := ptrace.NewTraces()
for service, spans := range groupByService {
rs := results.ResourceSpans().AppendEmpty()
rs.SetSchemaUrl(semconv.SchemaURL)
sharedAttributes.CopyTo(rs.Resource().Attributes())
rs.Resource().Attributes().PutStr(semconv.AttributeServiceName, service)
if mwAPIKey := req.Header.Get("dd-api-key"); mwAPIKey != "" {
if mwAPIKey != "" {
rs.Resource().Attributes().PutStr("mw.account_key", mwAPIKey)
}
rs.Resource().Attributes().PutStr("host.name", hostName)
Expand Down

0 comments on commit 59a41ab

Please sign in to comment.