mirror of
https://github.com/getsentry/sentry-for-ai.git
synced 2026-09-14 14:28:22 +08:00
104e7644c4
* docs(flutter-sdk): add profiling, logging, metrics, session-replay references Add four reference files for the Flutter SDK skill covering features that require precise documentation of platform constraints and limitations: - profiling.md: iOS/macOS only, Alpha status, SDK ≥7.12.0. Documents the profilesSampleRate/tracesSampleRate relationship, simulator vs. real device caveats, Dart symbol upload requirements, and troubleshooting table. - logging.md: Two paths — direct Sentry.logger API (SDK ≥9.5.0) and the sentry_logging integration bridging the Dart logging package. Documents LoggingIntegration configuration params (minBreadcrumbLevel, minEventLevel, minSentryLogLevel), stack trace gotchas with Logger.root, scope-level attributes via withScope, beforeSendLog filtering, and trace correlation. - metrics.md: Open Beta, SDK ≥9.11.0 for trace-connected metrics. Honest about the missing 'set' type, 2 KB per-metric key limit, and no per-metric sampling. Covers all three supported types (counter/distribution/gauge) with unit enums, tag constraints, and practical Dart examples. - session-replay.md: iOS/Android only (not Web/macOS/Linux/Windows), SDK ≥9.0.0, ~1 fps screenshot-based capture. Documents options.replay.* and options.privacy.* APIs, SentryWidget requirement, third-party widget masking requirement, session lifecycle (30s background timeout, 60 min max), performance overhead benchmarks, and full troubleshooting table. All files follow the established React Native SDK reference format with a minimum SDK version header, TOC, real Dart/Flutter code examples, honest limitation sections, and troubleshooting tables. Co-Authored-By: Claude Sonnet 4.6 (Anthropic) * docs(flutter-sdk): add error-monitoring and tracing reference files Complete the Flutter SDK skill reference library by adding the two remaining deep-dive files referenced in the main SKILL.md but missing from the initial commit. error-monitoring.md: - Documents all auto-captured error sources (FlutterError.onError, PlatformDispatcher, Android NDK, iOS/macOS Mach exceptions) - captureException / captureMessage / captureFeedback APIs with examples - Scope management: configureScope, withScope, scope sync to native - Breadcrumb capture and filtering via beforeBreadcrumb - Event filtering with beforeSend (incl. honest note that it doesn't intercept native crashes) - Isolate error capture pattern (addSentryErrorListener) - Attachments: screenshot, view hierarchy, file upload - Android/iOS native crash options (tombstone, NDK sync, ANR, watchdog) - Release health session tracking options - Troubleshooting table tracing.md: - Setup: tracesSampleRate vs tracesSampler with sampling precedence order - Navigation: SentryNavigatorObserver for MaterialApp, GoRouter, Auto Route with honest limitations (GoRouter tabs, Auto Route nested nav) - TTID (always on) vs TTFD (opt-in) with both setup patterns - User interaction tracing: Key requirement, idle timeout, PII opt-in - HTTP tracing: SentryHttpClient and sentry_dio with distributed tracing config (tracePropagationTargets, propagateTraceparent) - App start instrumentation: iOS/Android only, add-to-app caveat, disable path - Slow/frozen frames: SentryWidgetsFlutterBinding workaround - Custom instrumentation: transactions, nested spans, span data, dynamic sampling - All four DB integrations: sqflite, Drift, Hive, Isar with setup snippets - Asset bundle instrumentation - Production config pattern with dynamic sampler - Troubleshooting table including gRPC Windows issue Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * docs(agents): add sentry-flutter-sdk to SDK skills table * fix(flutter-sdk): address review findings — API consistency and version accuracy - Fix enableLogs version: ≥9.0.0 → ≥9.5.0 in SKILL.md (matches logging.md) - Replace fabricated Sentry.startSpan() with verified Sentry.startTransaction() in logging.md and metrics.md trace correlation examples - Fix Sentry.withScope() → Sentry.configureScope() in logging.md (correct Dart API) - Add flutter-sdk keywords to build-skill-tree.sh Quick Lookup mapping - Regenerate SKILL_TREE.md with proper keywords * fix(flutter-sdk): remove fabricated cardinality claims from metrics reference The 2 KB per-metric key limit is real, but the cardinality warnings, 'silently dropped' claims, and high-cardinality troubleshooting entry were fabricated with no basis in Sentry docs or SDK source. * fix(flutter-sdk): correct enableLogs version in Quick Reference section Fix remaining ≥9.0.0 → ≥9.5.0 for enableLogs in the Quick Reference code snippet. The earlier fix only caught the Phase 3 init block.