You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS: Arch Linux, up to date
Python version: Python 3.12.6
SDK version: 1.27.0
API version: 1.27.0
What happened?
Following the examples in the docs, the autoinstrumentation on Django is not sufficient to cause data to be sent to STDOUT, as the docs claim would happen
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
from opentelemetry.instrumentation.django import DjangoInstrumentor # NEW
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
DjangoInstrumentor().instrument() # NEW
...
Run the site:
venv/bin/python mysite/manage.py runserver
View localhost:8000 on the browser, curl it, etc. The only thing that shows up:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
September 18, 2024 - 20:41:30
Django version 5.1.1, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[18/Sep/2024 20:41:34] "GET / HTTP/1.1" 200 12068
Not Found: /favicon.ico
[18/Sep/2024 20:41:34] "GET /favicon.ico HTTP/1.1" 404 2208
[18/Sep/2024 20:41:47] "GET /?param=hello HTTP/1.1" 200 12068
No fancy open telemetry output, as the docs claim.
Additional context
#4125 indicates that there's something possibly missing in the docs, and that the auto-instrumentor works.
While this is possible and I'll try that later this week, I was hoping to not have to modify the execution command and instead do the manage.py modification.
Happy to put some work into this, but I'd like to first confirm that I'm not doing something silly
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered:
Thanks for double checking me :D
I'm not sure whether we want to update the docs or there's a bug we want to solve. In prod I'm also running with opentelemetry-instrument - should we say that this is the only "blessed" way?
Describe your environment
OS: Arch Linux, up to date
Python version: Python 3.12.6
SDK version: 1.27.0
API version: 1.27.0
What happened?
Following the examples in the docs, the autoinstrumentation on Django is not sufficient to cause data to be sent to STDOUT, as the docs claim would happen
Steps to Reproduce
Then edited mysite to insert:
Run the site:
View
localhost:8000
on the browser, curl it, etc. The only thing that shows up:Expected Result
something like the docs say:
Actual Result
No fancy open telemetry output, as the docs claim.
Additional context
#4125 indicates that there's something possibly missing in the docs, and that the auto-instrumentor works.
While this is possible and I'll try that later this week, I was hoping to not have to modify the execution command and instead do the
manage.py
modification.Happy to put some work into this, but I'd like to first confirm that I'm not doing something silly
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: