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

Configure HTTP methods to capture in WSGI middleware and frameworks #3531

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Sep 12, 2024

  • Do not capture transactions for OPTIONS and HEAD HTTP methods by default.
  • Make it possible with an http_methods_to_capture config option for Django and Flask, to specify what HTTP methods to capture.

Fixes #3528

Docs PR:
getsentry/sentry-docs#11348

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.23%. Comparing base (e6ca5a2) to head (e617183).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3531   +/-   ##
=======================================
  Coverage   84.22%   84.23%           
=======================================
  Files         136      136           
  Lines       13900    13914   +14     
  Branches     2940     2943    +3     
=======================================
+ Hits        11707    11720   +13     
  Misses       1465     1465           
- Partials      728      729    +1     
Files with missing lines Coverage Δ
sentry_sdk/integrations/_wsgi_common.py 84.40% <100.00%> (+0.14%) ⬆️
sentry_sdk/integrations/django/__init__.py 84.84% <100.00%> (+0.08%) ⬆️
sentry_sdk/integrations/flask.py 87.09% <100.00%> (+0.21%) ⬆️
sentry_sdk/integrations/wsgi.py 95.45% <100.00%> (+0.33%) ⬆️

... and 2 files with indirect coverage changes

@antonpirker antonpirker marked this pull request as ready for review September 13, 2024 06:51
@antonpirker antonpirker changed the title Configure http methods to capture in wsgi middleware Configure HTTP methods to capture in WSGI middleware and framworks Sep 13, 2024
@antonpirker antonpirker changed the title Configure HTTP methods to capture in WSGI middleware and framworks Configure HTTP methods to capture in WSGI middleware and frameworks Sep 13, 2024
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.

Don't trace OPTIONS and HEAD in WSGI frameworks by default
1 participant