Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding comment regarding middleware ordering
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu Hinderyckx <[email protected]>
ocelotl and mhindery committed Apr 23, 2020
1 parent d5dd31b commit 62d2f65
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -67,6 +67,12 @@ def _instrument(self, **kwargs):
):
return

# This can not be solved, but is an inherent problem of this approach:
# the order of middleware entries matters, and here you have no control
# on that:
# https://docs.djangoproject.com/en/3.0/topics/http/middleware/#activating-middleware
# https://docs.djangoproject.com/en/3.0/ref/middleware/#middleware-ordering

settings_middleware = getattr(settings, self._middleware_setting, [])
settings_middleware.append(self._opentelemetry_middleware)

0 comments on commit 62d2f65

Please sign in to comment.