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

Support failedRequestTargets for HTTP Client errors #1285

Merged
merged 19 commits into from
Mar 6, 2023

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Feb 14, 2023

📜 Description

  • Introduce a default range for captured http status codes of 500-599, same as sentry-java
  • Add failedRequestStatusCodes & failedRequestTargets in dio FailedRequestInterceptor
  • Add failedRequestTargets in FailedRequestClient

💡 Motivation and Context

Closes #1115

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

According to documentation the path is described as:

If the path starts with 'http(s)', the baseURL will be ignored, otherwise, it will be combined and then resolved with the baseUrl.

Can someone that is familiar with dio errors point me to samples how the path looks in different scenarios? This might affect how we have to match against failedRequestTargets.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against ded1794

@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Patch coverage: 96.12% and project coverage change: +1.63 🎉

Comparison is base (c60752d) 88.73% compared to head (ded1794) 90.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##           v7.0.0    #1285      +/-   ##
==========================================
+ Coverage   88.73%   90.37%   +1.63%     
==========================================
  Files         122      167      +45     
  Lines        3818     5227    +1409     
==========================================
+ Hits         3388     4724    +1336     
- Misses        430      503      +73     
Impacted Files Coverage Δ
dart/lib/src/hub_adapter.dart 10.52% <0.00%> (ø)
dart/lib/src/protocol/contexts.dart 93.89% <ø> (-0.05%) ⬇️
dart/lib/src/protocol/max_body_size.dart 50.00% <ø> (ø)
dart/lib/src/protocol/sentry_baggage_header.dart 100.00% <ø> (ø)
dart/lib/src/protocol/sentry_response.dart 82.75% <ø> (ø)
dart/lib/src/protocol/sentry_transaction_info.dart 70.00% <ø> (ø)
dart/lib/src/sentry_baggage.dart 90.90% <ø> (ø)
dart/lib/src/sentry_span_interface.dart 100.00% <ø> (ø)
dart/lib/src/sentry_trace_context_header.dart 100.00% <ø> (ø)
dart/lib/src/version.dart 100.00% <ø> (ø)
... and 83 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@denrase denrase marked this pull request as ready for review February 20, 2023 14:13
Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denrase left a few comments but overall, well done.

@marandaneto marandaneto merged commit 1b2bf55 into v7.0.0 Mar 6, 2023
@marandaneto marandaneto deleted the feat/failed-request-targets branch March 6, 2023 14:41
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.

2 participants