jaegertracing / jaeger-client-cpp

🛑 This library is DEPRECATED!
https://jaegertracing.io/
Apache License 2.0
138 stars 126 forks source link

`RemoteReporter::report()` is blocked #279

Closed zhangnaifan closed 2 years ago

zhangnaifan commented 3 years ago

Requirement - what kind of business use case are you trying to solve?

Hi Jaeger developers! I'm trying to issue a performance problem.

Problem - what in Jaeger blocks you from solving the requirement?

The relevent code lies here: https://github.com/jaegertracing/jaeger-client-cpp/blob/master/src/jaegertracing/reporters/RemoteReporter.cpp#L85

The problem is that RemoteReporter::report() is blocked when RemoteReporter::sweepQueue() is flushing spans to local agents/http endpoints because the two functions share the same _mutex. In production environment, we usually wish tracing reports act as fast as possible and UDP/HTTP network transports are too heavy.

Proposal - what do you suggest to solve the problem or improve the existing situation?

Unlock _mutex before flushing spans. See PR.