Recently support for forking web servers landed in Batch Span Processor in #2242
I tested this and it works with gunicorn but does not work with uwsgi.
Given a file called myapp.py:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World"
The following command works reports spans
opentelemetry-instrument gunicorn -b 127.0.0.1:8000 --threads 2 --workers 4 myapp:app
While as this does not
opentelemetry-instrument uwsgi --http 127.0.0.1:8000 --wsgi-file myapp.py --callable app --master --processes 2 --enable-threads
I added some debug statements to the fork hook and it seems the hook is called with gunicorn but not with uwsgi.
We should look into how uwsgi works and confirm whether the solution work with it or not.
Recently support for forking web servers landed in Batch Span Processor in #2242
I tested this and it works with gunicorn but does not work with uwsgi.
Given a file called
myapp.py:The following command works reports spans
While as this does not
I added some debug statements to the fork hook and it seems the hook is called with gunicorn but not with uwsgi.
We should look into how uwsgi works and confirm whether the solution work with it or not.