{"id":19546303,"url":"https://github.com/hyperdxio/sample-django","last_synced_at":"2026-06-11T04:31:12.273Z","repository":{"id":245493225,"uuid":"818414037","full_name":"hyperdxio/sample-django","owner":"hyperdxio","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-27T07:50:41.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-08T19:41:51.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperdxio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-21T19:58:51.000Z","updated_at":"2024-06-27T07:50:45.000Z","dependencies_parsed_at":"2024-06-27T08:56:45.587Z","dependency_job_id":null,"html_url":"https://github.com/hyperdxio/sample-django","commit_stats":null,"previous_names":["hyperdxio/sample-django"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdxio%2Fsample-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdxio%2Fsample-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdxio%2Fsample-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdxio%2Fsample-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperdxio","download_url":"https://codeload.github.com/hyperdxio/sample-django/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240801040,"owners_count":19859727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:44:16.271Z","updated_at":"2026-06-11T04:31:12.212Z","avatar_url":"https://github.com/hyperdxio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Preparing Django app\n\n1. `python3 manage.py migrate`\n2. `python3 manage.py collectstatic`\n3. `python3 manage.py createsuperuser`\n\n# Running with HyperDX\n\n- Create a virtual environment and activate it\n\n```\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\n- Install requirements\n\n```\npip install -r requirements.txt\n```\n\n- Install instrumentation packages\n\n```\nopentelemetry-bootstrap --action=install\n```\n\n## To run with gunicorn you need to add post_fork hook\n\n1. Add a file `gunicorn.config.py` as given in this repo\n2. Specify that config file when running gunicorn as in below run command\n\n```\nDJANGO_SETTINGS_MODULE=mysite.settings OTEL_SERVICE_NAME=mysite HYPERDX_API_KEY=\u003cYOUR_KEY\u003e opentelemetry-instrument gunicorn mysite.wsgi -c gunicorn.config.py --workers 2 --threads 2\n```\n*specifying **DJANGO_SETTINGS_MODULE** is necessary for opentelemetry instrumentation to work*\n\n# Browsing the app and checking at HyperDX\n\n1. Visit `http://localhost:8000/admin` and create a question for poll\n2. Then visit the list of polls at `http://localhost:8000/polls/` and explore the polls\n3. The data should be visible now in HyperDX at `https://hyperdx.io/search`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperdxio%2Fsample-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperdxio%2Fsample-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperdxio%2Fsample-django/lists"}