-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django instrumentation silently doesn't work for ASGI requests #472
Comments
We can also just add |
The first step here is to document this. |
The idea is that the user has to be aware of the distinction and make an explicit choice. If they don't check docs carefully they may easily think that |
The easiest here is to add |
In the meantime, while we don't solve this... I've added a note to the docs: #630 |
A user couldn't get the Django instrumentation working (https://pydanticlogfire.slack.com/archives/C06EDRBSAH3/p1722460460137619?thread_ts=1722440635.372479&cid=C06EDRBSAH3). With difficulty we realised that it was because they were using ASGI. In
opentelemetry/instrumentation/django/middleware/otel_middleware.py
you can see that ASGI requests are silently ignored whenopentelemetry-instrumentation-asgi
isn't installed.Firstly, we should document this loudly.
Then for people who miss this point, we should either:
is_asgi
parameter toinstrument_django
to force the user to tell us the situation, then raise an error if needed.opentelemetry-instrumentation-asgi
with thedjango
extra.django
extra and replace it withdjango-wsgi
anddjango-asgi
.@samuelcolvin what do you think?
The text was updated successfully, but these errors were encountered: