Search code examples
open-telemetryopen-telemetry-collectoropen-telemetry-java

Any drawbacks of creating tons of traces and spans?


What are the drawbacks - performancewise or other - of creating huge number of traces spans with loads of attributes?

It is java based opentelemetry


Solution

  • Of course there will be increased CPU/Memory consumption! There are couple of other things to consider:

    1. Too many spans make it hard to visualize/analyze a trace (using tools like Jaeger/Zipkin). Eg: Make a span out of every method/function will likely be too much, unless each of them are particularly interesting. Commonly used candidates are to create span per http call, sql call, call to queueing system, etc.
    2. If using a vendor to ship the traces to, a lot of vendors charge based on volume/count, so your observability bill will increase.