opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

Tracer does weak->Arc upgrade twice in hot path leading to bottleneck

Open cijothomas opened this issue 1 year ago • 2 comments

Tracer holds a weakref to its TracerProvider and attempts to upgrade that to an Arc twice in the hot path - one during span start and then again during span end. This is affecting throughput due to contention.

This issue is already fixed for Logs, opening a new issue to track fixing the same for traces.

cijothomas avatar May 22 '24 06:05 cijothomas

Will take a look this week

TommyCpp avatar May 22 '24 16:05 TommyCpp

  1. Make the span processor shutdown from any reference #1836
  2. Add shutdown to sdk tracer provider #1855
  3. Remove global::shutdown_global_tracer_provider https://github.com/open-telemetry/opentelemetry-rust/pull/2369/
  4. Now tracer provider can take a TracerProviderInner Arc pointer. #1855

TommyCpp avatar May 27 '24 22:05 TommyCpp

This is done. Closing the issue.

cijothomas avatar Dec 26 '24 19:12 cijothomas