Skip to content
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

Add Django request ID to nginx log output #2246

Closed
sarayourfriend opened this issue May 31, 2023 · 0 comments · Fixed by #3369
Closed

Add Django request ID to nginx log output #2246

sarayourfriend opened this issue May 31, 2023 · 0 comments · Fixed by #3369
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: api Related to the Django API

Comments

@sarayourfriend
Copy link
Collaborator

Problem

Django attaches a request ID header to responses (X-Request-Id) but this doesn't show up in Nginx logs. That means we don't have any way to easily tie Django events to specific Nginx requests.

Description

Add X-Request-Id to the Nginx JSON logging configuration.

Additional context

Testing this might be a pain as we don't have anything set up for running the Nginx configuration locally. The testing instructions from this PR will be a good starting point for getting it wired up. Essentially the Nginx image needs to be run manually via docker run with environment variables set such that the requests are forwarded to you local Django container.

@sarayourfriend sarayourfriend added 🟩 priority: low Low priority and doesn't need to be rushed ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: api Related to the Django API labels May 31, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog May 31, 2023
@openverse-bot openverse-bot moved this from 📋 Backlog to ✅ Done in Openverse Backlog Nov 26, 2023
@openverse-bot openverse-bot moved this from ✅ Done to 📋 Backlog in Openverse Backlog Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: api Related to the Django API
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant