python3 manage.py migrate
python3 manage.py collectstatic
python3 manage.py createsuperuser
- Create a virtual environment and activate it
python3 -m venv .venv
source .venv/bin/activate
- Install requirements
pip install -r requirements.txt
- Install instrumentation packages
opentelemetry-bootstrap --action=install
- Add a file
gunicorn.config.py
as given in this repo - Specify that config file when running gunicorn as in below run command
DJANGO_SETTINGS_MODULE=mysite.settings OTEL_SERVICE_NAME=mysite HYPERDX_API_KEY=<YOUR_KEY> opentelemetry-instrument gunicorn mysite.wsgi -c gunicorn.config.py --workers 2 --threads 2
specifying DJANGO_SETTINGS_MODULE is necessary for opentelemetry instrumentation to work
- Visit
http://localhost:8000/admin
and create a question for poll - Then visit the list of polls at
http://localhost:8000/polls/
and explore the polls - The data should be visible now in HyperDX at
https://hyperdx.io/search