Skip to content

Batch Span Processor does not work with uwsgi #2266

Description

@owais

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions