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

logging: RequestMiddleware not compatible with Django 2 #5024

Closed
tcroiset opened this issue Mar 13, 2018 · 2 comments
Closed

logging: RequestMiddleware not compatible with Django 2 #5024

tcroiset opened this issue Mar 13, 2018 · 2 comments
Assignees
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tcroiset
Copy link

tcroiset commented Mar 13, 2018

@liyanhui1228 we really appreciated the trace context feature to group logs by request.
Unfortunately, it looks broken with Django 2.

Django 1.10 introduced a new middleware style ( https://docs.djangoproject.com/en/1.10/releases/1.10/#new-style-middleware )

The old style, used by google.cloud.logging.handlers.middleware.request.RequestMiddleware, support was removed with Django 2.

@theacodes theacodes added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 13, 2018
@theacodes
Copy link
Contributor

@liyanhui1228 Can you take this on?

@chemelnucfin chemelnucfin added this to To Do in Feature Requests Mar 24, 2018
enriquejosepadilla pushed a commit to enriquejosepadilla/google-cloud-python that referenced this issue Jun 15, 2018
This commit allows the Django Request Middleware to be compatible with
all versions of Django.

This references the official upgrade Docs @
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
enriquejosepadilla pushed a commit to enriquejosepadilla/google-cloud-python that referenced this issue Jun 18, 2018
This commit allows the Django Request Middleware to be compatible with
all versions of Django.

This references the official upgrade Docs @
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
tseaver pushed a commit that referenced this issue Jun 20, 2018
Makes 'logging/handlers/middleware/request.RequestMiddleware'  compatible with all versions of Django.

See the official upgrade Docs:
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware

Closes #5504.
@tseaver
Copy link
Contributor

tseaver commented Jun 20, 2018

Via #5504.

@tseaver tseaver closed this as completed Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
No open projects
Development

No branches or pull requests

4 participants