Skip to content

Django middleware filtering settings #1444

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

lrafeei
Copy link
Contributor

@lrafeei lrafeei commented Aug 9, 2025

This PR adds three settings related to Django middleware instrumentation:

instrumentation.django_middleware.enabled
instrumentation.django_middleware.exclude
instrumentation.django_middleware.include

Where the exclude/include settings follow similar rules to attribute exclude/include: https://docs.newrelic.com/docs/apm/agents/python-agent/attributes/enabling-disabling-attributes-python/#rule-specific-wins

Copy link

github-actions bot commented Aug 9, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.74s
✅ MARKDOWN markdownlint 7 0 0 0 1.21s
✅ MARKDOWN markdown-link-check 7 0 0 18.88s
✅ PYTHON ruff 924 7 0 0 0.88s
✅ PYTHON ruff-format 924 9 0 0 0.32s
✅ YAML prettier 13 0 0 0 1.27s
✅ YAML v8r 13 0 0 6.38s
✅ YAML yamllint 13 0 0 0.64s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 9, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.80%. Comparing base (2c80b9f) to head (830fdae).

Files with missing lines Patch % Lines
newrelic/hooks/framework_django.py 80.00% 5 Missing and 5 partials ⚠️
newrelic/core/config.py 53.84% 6 Missing ⚠️
newrelic/config.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1444      +/-   ##
==========================================
- Coverage   81.33%   80.80%   -0.54%     
==========================================
  Files         208      208              
  Lines       23563    23625      +62     
  Branches     3716     3734      +18     
==========================================
- Hits        19164    19089      -75     
- Misses       3139     3313     +174     
+ Partials     1260     1223      -37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 13, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-failing Tests failing in CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants