Configure a max number spans in RunningSpanStoreImpl #1813
Comments
Unfortunately for now we don't have an API for configuring the buffer size of in-process running spans. In the implementation running span store is an unbounded list: Line 36 in f0e78ba
We could add an API in /cc @bogdandrutu WDYT? |
Couple of things we should do to help here:
These things may imply a bit of refactoring of the code, we should start talking about this. I think the first item should be easier to fix. |
@dmichel1 can you please tell me if you enable z-pages https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/zpages or if you use the RunningSpanStore for other reasons? I was thinking to make that disabled by default and if enabled then will keep a reference to all the Spans. |
@bogdandrutu we don't have zpages enabled. Some services might pull in the I'm also not aware of any |
This is correct. After #1875 is released, no running spans will be stored in process if no zPages are explicitly enabled. |
@songy23 for the moment we enable the RunningSpan at the static initialization of the handlers. Probably we need to change that: We probably need to automatically enable if: If users wants to use the handlers manually via getTracezZPageHandler we can have a enable or just enable when someone calls getTracezZPageHandler()? |
Hi,
I recently was involved with an incident where a service was not properly closely a span when an error was raised. This caused the JVM to go OOM after a few hours.
Do you have any thoughts or suggestions on how to prevent something similar from happening again? Some configurable limit of how many spans can be stored in the RunningSpanStoreImpl?
The text was updated successfully, but these errors were encountered: