Skip to content

Distributed Tracing CPU Load Optimization #505

@iamemilio

Description

@iamemilio

Customers have been reporting 30% higher CPU when using distributed tracing. GTSE has pinpointed this issue to the when the GetMetadataFromContext() function calls CreateDistributedTracePayload(). Their profiling suggests that the problematic line is:

hdrs.Set(DistributedTraceNewRelicHeader, p.NRHTTPSafe())

https://github.com/newrelic/go-agent/blob/master/v3/newrelic/distributed_tracing.go#L139-L153

Is there a way that we can reduce the performance impact of this code? Is this impacted by the memory leak?

Metadata

Metadata

Labels

PMProject Management AttentionQuality & UXCode Quality and User Experienceefficiency

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions