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

API structured logging #3432

Closed
sarayourfriend opened this issue Dec 1, 2023 · 0 comments · Fixed by #4263
Closed

API structured logging #3432

sarayourfriend opened this issue Dec 1, 2023 · 0 comments · Fixed by #4263
Assignees
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API 🔧 tech: django Involves Django 🐍 tech: python Involves Python

Comments

@sarayourfriend
Copy link
Collaborator

Problem

See the milestone description for the rationale: https://github.com/WordPress/openverse/milestone/20

Description

Add django-structlog to the API configuration: https://github.com/jrobichaud/django-structlog. When doing this, we can also remove the request ID middleware, as it'll no longer be necessary, django-structlog has that built in.

We should keep the response headers added in #3368, even though django-structlog logs some of those, because they're still useful in Cloudflare (we can reference response headers in WAF rules, for example).

For ease of reading in local development, add a switch to default to flat line style logs when ENVIRONMENT == "local".

@sarayourfriend sarayourfriend added help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🐍 tech: python Involves Python 🔧 tech: django Involves Django 🧱 stack: api Related to the Django API labels Dec 1, 2023
@sarayourfriend sarayourfriend added this to the Structured logging milestone Dec 1, 2023
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Dec 1, 2023
@krysal krysal moved this from 📋 Backlog to 📅 To Do in Openverse Backlog Mar 25, 2024
@openverse-bot openverse-bot moved this from 📅 To Do to 🏗 In Progress in Openverse Backlog May 3, 2024
@openverse-bot openverse-bot moved this from 🏗 In Progress to ✅ Done in Openverse Backlog May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API 🔧 tech: django Involves Django 🐍 tech: python Involves Python
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants