- Django 1.8.14
- uWSGI 2.0.14
- ddtrace 0.3.15
if you run the app with uwsgi process forking and use the tracer before the fork, we'll leak traces.
to repro here's a small flask app:
# use tracing right away
from ddtrace import tracer
# start a dummy trace here to ensure we start tracing
# before we fork.
with tracer.trace("aaaa"): pass
app = Flask(__name__)
traced_app = TraceMiddleware(app, tracer, service="foo")
@app.route('/')
def foo():
return 'hello'
and run with:
uwsgi -p 4 --http :9090 --manage-script-name --mount /=path:app --enable-threads
or
git clone https://github.com/DataDog/trace-examples
cd python/flask
rake uwsgi
workaround: run with --lazy-apps
if you run the app with uwsgi process forking and use the tracer before the fork, we'll leak traces.
to repro here's a small flask app:
and run with:
uwsgi -p 4 --http :9090 --manage-script-name --mount /=path:app --enable-threadsor
workaround: run with
--lazy-apps