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

Feat: Add support for dio #688

Merged
merged 21 commits into from
Jan 14, 2022
Merged

Feat: Add support for dio #688

merged 21 commits into from
Jan 14, 2022

Conversation

ueman
Copy link
Collaborator

@ueman ueman commented Jan 2, 2022

📜 Description

See #673
Bildschirmfoto 2022-01-11 um 20 02 56

💡 Motivation and Context

See #673

Closes #673

💚 How did you test it?

New tests & CI pipeline

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Publish to pub.dev

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2022

Codecov Report

Merging #688 (ebe0fc4) into main (cc34b50) will decrease coverage by 0.07%.
The diff coverage is 88.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
- Coverage   90.67%   90.59%   -0.08%     
==========================================
  Files          97      103       +6     
  Lines        3152     3255     +103     
==========================================
+ Hits         2858     2949      +91     
- Misses        294      306      +12     
Impacted Files Coverage Δ
dio/lib/src/breadcrumb_client_adapter.dart 80.00% <80.00%> (ø)
dio/lib/src/tracing_client_adapter.dart 80.00% <80.00%> (ø)
dio/lib/src/sentry_dio_client_adapter.dart 81.81% <81.81%> (ø)
dio/lib/src/failed_request_client_adapter.dart 91.42% <91.42%> (ø)
dio/lib/src/sentry_dio_extension.dart 100.00% <100.00%> (ø)
dio/lib/src/sentry_transformer.dart 100.00% <100.00%> (ø)

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 cc34b50...ebe0fc4. Read the comment docs.

dio/lib/sentry_dio.dart Outdated Show resolved Hide resolved
version: 6.3.0
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Copy link
Collaborator Author

@ueman ueman Jan 2, 2022

Choose a reason for hiding this comment

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

The other packages don't have the issue_tracker field, so it should probably aligned?

dio/pubspec.yaml Outdated Show resolved Hide resolved
@ueman ueman marked this pull request as ready for review January 2, 2022 17:24
import 'package:sentry/sentry.dart';
import 'package:sentry_dio/sentry_dio.dart';

Future<void> main() async {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make a pub project like https://github.com/getsentry/sentry-dart/tree/main/dart/example?
so we can compile and run easily on CI as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure. I've also included it in the Flutter example app, maybe that's already enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

mm I guess because of paths-ignore, we'd not have a failed CI when changes don't integrate well?
I still kinda prefer the pub project facility, but it's a personal opinion.

Copy link
Contributor

Choose a reason for hiding this comment

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

we can do that in a different PR, so we don't block it.

@marandaneto
Copy link
Contributor

@ueman can we possibly get rid of the ignore_for_file and friends by fixing the issues if necessary? unless there's no reason to do so

@marandaneto
Copy link
Contributor

@ueman that's awesome, thank you so much, left a few comments but I focused on structure and design only, I'll let @brustolin or @denrase with a more detailed review.
very happy about the direction of this PR, congrats.

@ueman
Copy link
Collaborator Author

ueman commented Jan 11, 2022

@ueman can we possibly get rid of the ignore_for_file and friends by fixing the issues if necessary? unless there's no reason to do so

Unfortunately dio isn't configured as strict as this package, so I've included it in each file which interacts with dios API. Being stricter than dio can lead to runtime errors. If there are any better ways to handle this, I'm happy to hear about it.

@marandaneto
Copy link
Contributor

@ueman mind attaching a screenshot of the Dio request using the sample? with the automatically created spans.

@ueman
Copy link
Collaborator Author

ueman commented Jan 11, 2022

@ueman mind attaching a screenshot of the Dio request using the sample? with the automatically created spans.

@marandaneto I'v attached it to the PR description at the top.

Copy link
Collaborator

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

I really like this solution! 🚀

@marandaneto
Copy link
Contributor

@ueman happy to merge and release after addressing #688 (comment)
thanks once more.

Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
@marandaneto
Copy link
Contributor

@ueman

warning • The include file 'package:pedantic/analysis_options.yaml' in '/home/runner/work/sentry-dart/sentry-dart/flutter/analysis_options.yaml' can't be found when analyzing '/home/runner/work/sentry-dart/sentry-dart/flutter/example' • analysis_options.yaml:1:10 • include_file_not_found
info • The import of 'package:flutter/rendering.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • example/lib/user_feedback_dialog.dart:2:8 • unnecessary_import

@marandaneto marandaneto merged commit a29401d into getsentry:main Jan 14, 2022
@ueman ueman deleted the feature/dio branch January 15, 2022 14:05
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.

Support for DIO HTTP library
5 participants