Sentry Dio 是一个 Flutter/Dart 包,将 Sentry 与 Dio HTTP 客户端集成,以实现对网络请求的性能追踪。它会自动捕获请求和响应的详细信息,包括时间、状态码和错误,为 API 性能提供深入洞察。此集成帮助开发者在多个平台上实时监控和诊断问题。该包设计用于与现有的 Dio 设置无缝配合,配置需求极少。它支持 Android、iOS、Web、macOS、Windows 和 Linux,非常适合需要强大监控功能的跨平台应用。
适合场景
监控 API 性能
跟踪 HTTP 请求错误
诊断缓慢的网络调用
与现有 Dio 实现集成
跨平台实时错误报告
主要特点
自动性能跟踪
请求/响应元数据收集
无缝集成 Dio
跨平台支持
错误和延迟跟踪
适合对象
使用 Dio 的 Flutter 应用
专注于性能监控的团队
需要实时错误洞察的开发人员
跨平台移动和网页应用
需要详细 API 可观察性的应用程序
使用建议
需要设置 Sentry SDK
可能会略微增加有效载荷大小
需要正确配置才能获得最佳效果
非 Dio HTTP 客户端不需要
依赖于 Sentry 后端的可用性
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions
Sentry SDK for Dart and Flutter
Package
CI status
Likes
Downloads
Analysis
Releases
This repo uses the following ways to release SDK updates:
Pre-release: We create pre-releases (alpha, beta, RC,…) for larger and potentially more impactful changes, such as new features or major versions.
Latest: We continuously release major/minor/hotfix versions from the main branch. These releases go through all our internal quality gates and are very safe to use and intended to be the default for most teams.
Stable: We promote releases from Latest when they have been used in the field for some time and in scale, considering time since release, adoption, and other quality and stability metrics. These releases will be indicated on the releases page (https://github.com/getsentry/sentry-dart/releases/) with the Stable suffix.
Starting with May 1st 2024, iOS apps are required to declare approved reasons to access certain APIs. This also includes third-party SDKs.
If you are using sentry-flutter, update to at least version 7.17.0 to get the updated sentry-cocoa native iOS/macOS SDK, supporting the privacy manifest.
All other used dependencies with file declarations are supported by Sentry packages.
Run flutter pub upgrade to the latest compatible versions of all the dependencies.
SDK Size Overhead
The Sentry SDKs for Dart and Flutter typically add approximately 1-1.5 MB to an app’s binary size. The exact impact may vary depending on the device architecture.