Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions dio/lib/src/sentry_dio_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ import 'version.dart';
extension SentryDioExtension on Dio {
/// Adds support for automatic spans for http requests,
/// as well as request and response transformations.
/// This must be the last initialization step of the [Dio] setup, otherwise
/// your configuration of Dio might overwrite the Sentry configuration.
/// This must be the last initialization step of the [Dio] setup. Sentry will
/// use your configuration, so update it first, and call `addSentry()` as the
/// last step. Since Sentry does not override any user configuration, it then
/// uses whatever transformer, adapter, etc., you configured [Dio] to use.
///
/// ```dart
/// final dio = Dio();
/// dio.transformer = YourCustomTransformer();
/// dio.httpClientAdapter = YourCustomHttpClientAdapter();
/// dio.addSentry();
/// ```
///
/// You can also configure specific HTTP response codes to be considered
/// as a failed request. In the following example, the status codes 404 and 500
Expand Down
Loading