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

Duplicate logging of requests: Gunicorn and Django #10555

Open
tony opened this issue Sep 7, 2024 · 0 comments
Open

Duplicate logging of requests: Gunicorn and Django #10555

tony opened this issue Sep 7, 2024 · 0 comments

Comments

@tony
Copy link
Contributor

tony commented Sep 7, 2024

Both Gunicorn and Django log incoming requests, which can lead to duplicate request entries.

Question

Is there a reference or best practice for configuring both the HTTP server and Python applications to avoid this?

Problem

Gunicorn doesn’t support separate service names

As of v2.11.3, Gunicorn does not allow specifying a separate custom service name for its logs (please correct me if I’ve misunderstood this). Django and GraphQL do.

Expected behavior

I believe downstream users would expect a setup like the following:

  • {service_name}-gunicorn: For HTTP server requests (handled by Gunicorn)
  • {service_name}: For the application layer (e.g., Django)

This configuration would enable tracing the flow of requests through the entire stack: HTTP Server (Gunicorn) → App (e.g., Django) → Database (e.g., Redis/Postgres) or other external services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant