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

Expose connection info in errors #337

Merged
merged 4 commits into from
Aug 22, 2021
Merged

Expose connection info in errors #337

merged 4 commits into from
Aug 22, 2021

Conversation

sagebind
Copy link
Owner

Add local_addr and remote_addr to Error which expose the local and remote network addresses of the last used connection for a request before the error occurred, if known.

Fixes #336.

@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #337 (897b25d) into master (8ba69f4) will increase coverage by 0.25%.
The diff coverage is 90.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   74.80%   75.05%   +0.25%     
==========================================
  Files          58       58              
  Lines        3131     3179      +48     
==========================================
+ Hits         2342     2386      +44     
- Misses        789      793       +4     
Impacted Files Coverage Δ
src/response.rs 60.52% <50.00%> (ø)
src/redirect.rs 70.58% <75.00%> (-0.50%) ⬇️
src/error.rs 50.85% <86.95%> (+6.12%) ⬆️
src/handler.rs 73.39% <100.00%> (+0.94%) ⬆️
tests/net.rs 92.42% <100.00%> (+1.51%) ⬆️
tests/redirects.rs 100.00% <100.00%> (ø)
src/client.rs 72.92% <0.00%> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ba69f4...897b25d. Read the comment docs.

@sagebind sagebind marked this pull request as ready for review August 22, 2021 21:35
@sagebind sagebind added the feature A new feature! label Aug 22, 2021
@sagebind sagebind merged commit 2a5c175 into master Aug 22, 2021
@sagebind sagebind deleted the error-connection-info branch August 22, 2021 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get metrics even a request fails
1 participant