Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

No cap on number of active scopes or spans #125

Open
isaaczinda opened this issue Aug 29, 2019 · 0 comments
Open

No cap on number of active scopes or spans #125

isaaczinda opened this issue Aug 29, 2019 · 0 comments

Comments

@isaaczinda
Copy link
Contributor

The following code, which could have easily been written by mistake, creates an arbitrary number of spans which are never ended and take up enormous amount of memory. Python OpenTracing should have limit the number of open scopes / spans a user can have to prevent a small mistake from becoming an enormous memory leak.

from opentracing.mocktracer import MockTracer

tracer = MockTracer()

while True:
    with tracer.start_span(operation_name='make_some_request') as client_span:
        tracer.scope_manager.activate(client_span, True)
        pass
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant