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

fix: Fix info.response.body empty with normal responses #237

Merged
merged 3 commits into from
Mar 19, 2023

Conversation

trallnag
Copy link
Owner

What does this do?

Fixes problem where in instrumentation functions info.response.body is empty if response is just a response (not being streamed).

Also adds tests that check this behavior.

Linked issues

Fixes #236

@trallnag trallnag linked an issue Mar 19, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Merging #237 (3538fe4) into master (241229b) will increase coverage by 0.29%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   95.29%   95.58%   +0.29%     
==========================================
  Files           5        5              
  Lines         340      340              
==========================================
+ Hits          324      325       +1     
+ Misses         16       15       -1     
Impacted Files Coverage Δ
...rc/prometheus_fastapi_instrumentator/middleware.py 97.75% <100.00%> (+1.12%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@trallnag trallnag self-assigned this Mar 19, 2023
@trallnag trallnag merged commit b8d6ab1 into master Mar 19, 2023
@trallnag trallnag deleted the 236-response-body-empty branch March 19, 2023 16:01
trallnag added a commit that referenced this pull request Mar 19, 2023
- chore: Fix
- chore: Add tests
- chore: Update changelog
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.

Response body info.response.body is still empty
1 participant