Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracing overhead and memory usage #5410

Open
kevinburke opened this issue May 23, 2024 · 1 comment
Open

Tracing overhead and memory usage #5410

kevinburke opened this issue May 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kevinburke
Copy link

kevinburke commented May 23, 2024

Description

We have a service that reads from an in memory data store and writes to Kafka. I tried adding opentelemetry tracing support to it. What we saw was that GC doubled and throughput declined by 40%. Even more concerning, this is still true if 0% of traces are sampled - even just using the NoopTracer, we see these throughput declines, it's largely coming from the overhead of allocating additional memory for the spans and attributes that are discarded. Profiling data indicated that the additional time and additional allocations were coming from creating the span objects.

I tried searching around for performance advice, and the one thing I found was "make sure you are using batching," and we are using the batch span processor.

I'm curious if anyone's had a similar experience and what you've done to reduce the overhead of adding tracing - reusing span objects or any other tricks. It might be good to have a section on performance optimizations that people could refer to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants