opencensus-python icon indicating copy to clipboard operation
opencensus-python copied to clipboard

opencensus-ext-django: upgrade pre-Django 1.10-style middleware

Open JeremyVriens opened this issue 2 years ago • 1 comments

Background Currently the opencensus-ext-django package has a version pin on django>=1.11, but it still uses the pre-Django 1.10-style middleware. Since the current base class of the middleware is deprecated (assuming by the fact that it's loaded from the django.utils.deprecation package), the deprecated class can be removed at any point in time in the future.

Proposed solution The middleware class should be refactored to the "new way of writing middlewares" as described in the Django documentation.

Acceptance criteria No breaking changes. The refactor should be fully backwards compatible with the current middleware class.

JeremyVriens avatar Aug 26 '22 07:08 JeremyVriens

I created this feature request/issue based on the findings after fixing https://github.com/census-instrumentation/opencensus-python/issues/1154 and I will pick this one up myself as well.

JeremyVriens avatar Aug 26 '22 07:08 JeremyVriens