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

Configurable Middleware Position for Django Instrumentation #2912

Merged
merged 16 commits into from
Oct 24, 2024

Conversation

saichander17
Copy link
Contributor

@saichander17 saichander17 commented Oct 17, 2024

Fixes #1781

This PR has addressed all the comments present in #2834 and #1903 so far. Raising it separately to accelerate merging of this code.

I had to not use commits 896f6f5 and ca9e744 from #2834 PR as those commits author has not signed CLA or has some CLA problem.

cc: @xrmx @lzchen

Description

Feature to add middleware at specific location. Added keyword argument middleware_position which one can set to the number of middleware they want to add before otel middleware to start instrumentation.

Fixes #1781

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e lint-instrumentation-django
  • tox -e py39-test-instrumentation-django-0
  • tox -e py39-test-instrumentation-django-1
  • tox -e py39-test-instrumentation-django-2

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

CHANGELOG.md Outdated Show resolved Hide resolved
@lzchen lzchen merged commit e49806e into open-telemetry:main Oct 24, 2024
536 checks passed
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

Successfully merging this pull request may close these issues.

DisallowedHost exception for Django instrumentation
4 participants