-
Notifications
You must be signed in to change notification settings - Fork 476
Add WSGI middleware #1808
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
Add WSGI middleware #1808
Conversation
3158e77 to
b617b54
Compare
Codecov Report
@@ Coverage Diff @@
## master #1808 +/- ##
==========================================
+ Coverage 90.90% 90.94% +0.04%
==========================================
Files 555 559 +4
Lines 38819 39063 +244
==========================================
+ Hits 35287 35527 +240
- Misses 3532 3536 +4
Continue to review full report at Codecov.
|
…t/response header tracing. Handled builtins.GeneratorExit errors with streaming requests.
…hot test for chunked response.
Kyle-Verhoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Integration
This PR adds a WSGI middleware to be used to trace any WSGI Python web application.
Note: in cases of interrupted streaming requests, which can lead to broken pipe connections and therefore
GeneratorExitexceptions in the response spans, the decision was made to prevent theGeneratorExitexceptions from being propagated to the top-level request spans. These exceptions will still be present in thewsgi.responsespans.Links
Checklist
__init__.py.DD_SERVICE(if applicable).ddtrace.config.Pin overriding..circleci/config.yml).builtins.GeneratorExiterrors with streaming requests (expected behaviour?) probably have to use span ignored exceptions.