@danieljvdm/dev-kit 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
- package/skill-sources.jsonc +2 -33
- package/skill-sources.lock.json +15 -117
- package/skills/animate/LICENSE +21 -0
- package/skills/animate/NOTICE +10 -0
- package/skills/animate/SKILL.md +34 -0
- package/skills/animate/references/gestures.md +27 -0
- package/skills/animate/references/glossary.md +136 -0
- package/skills/animate/references/implementation.md +22 -0
- package/skills/animate/references/opportunities.md +18 -0
- package/skills/animate/references/principles.md +48 -0
- package/skills/animate/references/review.md +19 -0
- package/skills/cloudflare-workers/LICENSE +202 -0
- package/skills/cloudflare-workers/NOTICE +9 -0
- package/skills/cloudflare-workers/SKILL.md +26 -0
- package/skills/cloudflare-workers/references/durable-objects.md +68 -0
- package/skills/cloudflare-workers/references/sandbox.md +48 -0
- package/skills/cloudflare-workers/references/workers.md +63 -0
- package/skills/cloudflare-workers/references/wrangler.md +56 -0
- package/skills/design-ui/LICENSE +21 -0
- package/skills/design-ui/NOTICE +8 -0
- package/skills/design-ui/SKILL.md +29 -0
- package/skills/design-ui/references/appearance.md +22 -0
- package/skills/design-ui/references/components.md +33 -0
- package/skills/design-ui/references/exploration.md +50 -0
- package/skills/design-ui/references/libraries.md +39 -0
- package/skills/design-ui/references/themes.md +23 -0
- package/skills/dev-kit/SKILL.md +19 -38
- package/skills/dev-kit/references/cloudflare-worker-api.md +1 -1
- package/skills/dev-kit/references/skills.md +2 -2
- package/skills/effect-development/SKILL.md +27 -0
- package/skills/effect-development/agents/openai.yaml +4 -0
- package/skills/effect-development/references/api/index.md +32 -0
- package/skills/effect-development/references/api/schema-codecs.md +15 -0
- package/skills/{build-effect-apis/references → effect-development/references/api}/verification.md +10 -5
- package/skills/{effect-architecture-audit/SKILL.md → effect-development/references/architecture/index.md} +1 -6
- package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-client.md +8 -6
- package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-testing.md +7 -2
- package/skills/effect-development/references/atom/index.md +40 -0
- package/skills/{build-effect-clis/references → effect-development/references/cli}/entrypoints-and-testing.md +6 -2
- package/skills/effect-development/references/cli/index.md +39 -0
- package/skills/effect-development/references/setup.md +15 -0
- package/skills/open-pull-request/SKILL.md +10 -70
- package/skills/open-pull-request/references/evidence.md +22 -0
- package/skills/open-pull-request/references/explanation.md +21 -0
- package/skills/open-pull-request/references/publication.md +21 -0
- package/skills/sentry/LICENSE +202 -0
- package/skills/sentry/LICENSE-UPSTREAM +21 -0
- package/skills/sentry/NOTICE +14 -0
- package/skills/sentry/SKILL.md +33 -0
- package/skills/sentry/references/alert-payloads.md +105 -0
- package/skills/sentry/references/alerts.md +17 -0
- package/skills/sentry/references/artifacts.md +25 -0
- package/skills/sentry/references/auth-token.md +65 -0
- package/skills/sentry/references/concepts/ai-monitoring.md +131 -0
- package/skills/sentry/references/concepts/choosing-a-signal.md +78 -0
- package/skills/sentry/references/concepts/crons.md +50 -0
- package/skills/sentry/references/concepts/data-scrubbing.md +43 -0
- package/skills/sentry/references/concepts/errors.md +40 -0
- package/skills/sentry/references/concepts/logging.md +85 -0
- package/skills/sentry/references/concepts/metrics.md +49 -0
- package/skills/sentry/references/concepts/monitors.md +78 -0
- package/skills/sentry/references/concepts/profiling.md +38 -0
- package/skills/sentry/references/concepts/reduce-volume.md +49 -0
- package/skills/sentry/references/concepts/releases.md +43 -0
- package/skills/sentry/references/concepts/session-replay.md +35 -0
- package/skills/sentry/references/concepts/tracing.md +54 -0
- package/skills/sentry/references/concepts/user-feedback.md +36 -0
- package/skills/sentry/references/debug-artifacts/android.md +68 -0
- package/skills/sentry/references/debug-artifacts/apple.md +96 -0
- package/skills/sentry/references/debug-artifacts/dotnet.md +70 -0
- package/skills/sentry/references/debug-artifacts/flutter.md +65 -0
- package/skills/sentry/references/debug-artifacts/index.md +75 -0
- package/skills/sentry/references/debug-artifacts/javascript.md +94 -0
- package/skills/sentry/references/debug-artifacts/matching.md +73 -0
- package/skills/sentry/references/debug-artifacts/react-native.md +75 -0
- package/skills/sentry/references/first-error-setup.md +25 -0
- package/skills/sentry/references/instrumentation.md +30 -0
- package/skills/sentry/references/issues.md +32 -0
- package/skills/sentry/references/new-project.md +17 -0
- package/skills/sentry/references/otel-exporter.md +30 -0
- package/skills/sentry/references/release-workflow.md +31 -0
- package/skills/sentry/references/releases/ci-pipeline.md +214 -0
- package/skills/sentry/references/releases/index.md +93 -0
- package/skills/sentry/references/releases/suspect-commits.md +155 -0
- package/skills/sentry/references/releases/tagging.md +131 -0
- package/skills/sentry/references/releases/troubleshooting.md +67 -0
- package/skills/sentry/references/sdks/android/crons.md +305 -0
- package/skills/sentry/references/sdks/android/error-monitoring.md +800 -0
- package/skills/sentry/references/sdks/android/index.md +748 -0
- package/skills/sentry/references/sdks/android/integrations.md +48 -0
- package/skills/sentry/references/sdks/android/logging.md +374 -0
- package/skills/sentry/references/sdks/android/metrics.md +288 -0
- package/skills/sentry/references/sdks/android/profiling.md +397 -0
- package/skills/sentry/references/sdks/android/session-replay.md +406 -0
- package/skills/sentry/references/sdks/android/tracing.md +861 -0
- package/skills/sentry/references/sdks/browser/error-monitoring.md +861 -0
- package/skills/sentry/references/sdks/browser/index.md +714 -0
- package/skills/sentry/references/sdks/browser/logging.md +315 -0
- package/skills/sentry/references/sdks/browser/profiling.md +236 -0
- package/skills/sentry/references/sdks/browser/session-replay.md +586 -0
- package/skills/sentry/references/sdks/browser/tracing.md +561 -0
- package/skills/sentry/references/sdks/browser/user-feedback.md +354 -0
- package/skills/sentry/references/sdks/cloudflare/ai-monitoring.md +661 -0
- package/skills/sentry/references/sdks/cloudflare/crons.md +231 -0
- package/skills/sentry/references/sdks/cloudflare/durable-objects.md +381 -0
- package/skills/sentry/references/sdks/cloudflare/error-monitoring.md +329 -0
- package/skills/sentry/references/sdks/cloudflare/index.md +698 -0
- package/skills/sentry/references/sdks/cloudflare/logging.md +169 -0
- package/skills/sentry/references/sdks/cloudflare/nodejs-compat.md +134 -0
- package/skills/sentry/references/sdks/cloudflare/tracing.md +475 -0
- package/skills/sentry/references/sdks/cocoa/error-monitoring.md +394 -0
- package/skills/sentry/references/sdks/cocoa/index.md +497 -0
- package/skills/sentry/references/sdks/cocoa/logging.md +209 -0
- package/skills/sentry/references/sdks/cocoa/metrics.md +136 -0
- package/skills/sentry/references/sdks/cocoa/profiling.md +223 -0
- package/skills/sentry/references/sdks/cocoa/session-replay.md +257 -0
- package/skills/sentry/references/sdks/cocoa/tracing.md +524 -0
- package/skills/sentry/references/sdks/cocoa/user-feedback.md +310 -0
- package/skills/sentry/references/sdks/dotnet/crons.md +465 -0
- package/skills/sentry/references/sdks/dotnet/error-monitoring.md +1100 -0
- package/skills/sentry/references/sdks/dotnet/index.md +614 -0
- package/skills/sentry/references/sdks/dotnet/logging.md +556 -0
- package/skills/sentry/references/sdks/dotnet/metrics.md +229 -0
- package/skills/sentry/references/sdks/dotnet/profiling.md +296 -0
- package/skills/sentry/references/sdks/dotnet/tracing.md +897 -0
- package/skills/sentry/references/sdks/elixir/crons.md +371 -0
- package/skills/sentry/references/sdks/elixir/error-monitoring.md +335 -0
- package/skills/sentry/references/sdks/elixir/index.md +383 -0
- package/skills/sentry/references/sdks/elixir/logging.md +239 -0
- package/skills/sentry/references/sdks/elixir/tracing.md +233 -0
- package/skills/sentry/references/sdks/flutter/ecosystem-integrations.md +70 -0
- package/skills/sentry/references/sdks/flutter/error-monitoring.md +312 -0
- package/skills/sentry/references/sdks/flutter/index.md +728 -0
- package/skills/sentry/references/sdks/flutter/logging.md +387 -0
- package/skills/sentry/references/sdks/flutter/metrics.md +310 -0
- package/skills/sentry/references/sdks/flutter/profiling.md +214 -0
- package/skills/sentry/references/sdks/flutter/session-replay.md +308 -0
- package/skills/sentry/references/sdks/flutter/tracing.md +502 -0
- package/skills/sentry/references/sdks/go/crons.md +270 -0
- package/skills/sentry/references/sdks/go/error-monitoring.md +361 -0
- package/skills/sentry/references/sdks/go/index.md +324 -0
- package/skills/sentry/references/sdks/go/logging.md +354 -0
- package/skills/sentry/references/sdks/go/metrics.md +273 -0
- package/skills/sentry/references/sdks/go/profiling.md +46 -0
- package/skills/sentry/references/sdks/go/tracing.md +366 -0
- package/skills/sentry/references/sdks/index.md +41 -0
- package/skills/sentry/references/sdks/nestjs/ai-monitoring.md +410 -0
- package/skills/sentry/references/sdks/nestjs/crons.md +268 -0
- package/skills/sentry/references/sdks/nestjs/error-monitoring.md +729 -0
- package/skills/sentry/references/sdks/nestjs/index.md +699 -0
- package/skills/sentry/references/sdks/nestjs/logging.md +174 -0
- package/skills/sentry/references/sdks/nestjs/metrics.md +243 -0
- package/skills/sentry/references/sdks/nestjs/profiling.md +127 -0
- package/skills/sentry/references/sdks/nestjs/tracing.md +762 -0
- package/skills/sentry/references/sdks/nextjs/ai-monitoring.md +494 -0
- package/skills/sentry/references/sdks/nextjs/crons.md +383 -0
- package/skills/sentry/references/sdks/nextjs/error-monitoring.md +974 -0
- package/skills/sentry/references/sdks/nextjs/index.md +491 -0
- package/skills/sentry/references/sdks/nextjs/logging.md +381 -0
- package/skills/sentry/references/sdks/nextjs/metrics.md +411 -0
- package/skills/sentry/references/sdks/nextjs/profiling.md +403 -0
- package/skills/sentry/references/sdks/nextjs/session-replay.md +462 -0
- package/skills/sentry/references/sdks/nextjs/tracing.md +628 -0
- package/skills/sentry/references/sdks/node/ai-monitoring.md +303 -0
- package/skills/sentry/references/sdks/node/crons.md +432 -0
- package/skills/sentry/references/sdks/node/error-monitoring.md +1125 -0
- package/skills/sentry/references/sdks/node/index.md +942 -0
- package/skills/sentry/references/sdks/node/logging.md +380 -0
- package/skills/sentry/references/sdks/node/metrics.md +278 -0
- package/skills/sentry/references/sdks/node/profiling.md +373 -0
- package/skills/sentry/references/sdks/node/tracing.md +878 -0
- package/skills/sentry/references/sdks/php/ai-monitoring.md +310 -0
- package/skills/sentry/references/sdks/php/crons.md +265 -0
- package/skills/sentry/references/sdks/php/error-monitoring.md +626 -0
- package/skills/sentry/references/sdks/php/index.md +362 -0
- package/skills/sentry/references/sdks/php/laravel.md +542 -0
- package/skills/sentry/references/sdks/php/logging.md +242 -0
- package/skills/sentry/references/sdks/php/metrics.md +193 -0
- package/skills/sentry/references/sdks/php/profiling.md +115 -0
- package/skills/sentry/references/sdks/php/symfony.md +552 -0
- package/skills/sentry/references/sdks/php/tracing.md +516 -0
- package/skills/sentry/references/sdks/python/ai-monitoring.md +351 -0
- package/skills/sentry/references/sdks/python/crons.md +218 -0
- package/skills/sentry/references/sdks/python/error-monitoring.md +292 -0
- package/skills/sentry/references/sdks/python/index.md +361 -0
- package/skills/sentry/references/sdks/python/logging.md +234 -0
- package/skills/sentry/references/sdks/python/metrics.md +154 -0
- package/skills/sentry/references/sdks/python/profiling.md +120 -0
- package/skills/sentry/references/sdks/python/tracing.md +364 -0
- package/skills/sentry/references/sdks/react/error-monitoring.md +1607 -0
- package/skills/sentry/references/sdks/react/index.md +492 -0
- package/skills/sentry/references/sdks/react/logging.md +364 -0
- package/skills/sentry/references/sdks/react/profiling.md +322 -0
- package/skills/sentry/references/sdks/react/react-features.md +1272 -0
- package/skills/sentry/references/sdks/react/session-replay.md +1193 -0
- package/skills/sentry/references/sdks/react/tracing.md +1415 -0
- package/skills/sentry/references/sdks/react-native/error-monitoring.md +1481 -0
- package/skills/sentry/references/sdks/react-native/expo-config-plugin.md +45 -0
- package/skills/sentry/references/sdks/react-native/index.md +1030 -0
- package/skills/sentry/references/sdks/react-native/logging.md +444 -0
- package/skills/sentry/references/sdks/react-native/profiling.md +386 -0
- package/skills/sentry/references/sdks/react-native/session-replay.md +704 -0
- package/skills/sentry/references/sdks/react-native/tracing.md +1086 -0
- package/skills/sentry/references/sdks/react-native/user-feedback.md +815 -0
- package/skills/sentry/references/sdks/react-router-framework/error-monitoring.md +127 -0
- package/skills/sentry/references/sdks/react-router-framework/index.md +411 -0
- package/skills/sentry/references/sdks/react-router-framework/logging.md +66 -0
- package/skills/sentry/references/sdks/react-router-framework/profiling.md +57 -0
- package/skills/sentry/references/sdks/react-router-framework/react-router-framework-features.md +110 -0
- package/skills/sentry/references/sdks/react-router-framework/session-replay.md +67 -0
- package/skills/sentry/references/sdks/react-router-framework/tracing.md +96 -0
- package/skills/sentry/references/sdks/react-router-framework/user-feedback.md +71 -0
- package/skills/sentry/references/sdks/ruby/crons.md +184 -0
- package/skills/sentry/references/sdks/ruby/error-monitoring.md +248 -0
- package/skills/sentry/references/sdks/ruby/index.md +297 -0
- package/skills/sentry/references/sdks/ruby/logging.md +168 -0
- package/skills/sentry/references/sdks/ruby/metrics.md +196 -0
- package/skills/sentry/references/sdks/ruby/migration.md +321 -0
- package/skills/sentry/references/sdks/ruby/profiling.md +107 -0
- package/skills/sentry/references/sdks/ruby/tracing.md +388 -0
- package/skills/sentry/references/sdks/svelte/error-monitoring.md +456 -0
- package/skills/sentry/references/sdks/svelte/index.md +467 -0
- package/skills/sentry/references/sdks/svelte/logging.md +344 -0
- package/skills/sentry/references/sdks/svelte/session-replay.md +369 -0
- package/skills/sentry/references/sdks/svelte/tracing.md +406 -0
- package/skills/sentry/references/sdks/tanstack-start/error-monitoring.md +149 -0
- package/skills/sentry/references/sdks/tanstack-start/index.md +381 -0
- package/skills/sentry/references/sdks/tanstack-start/logging.md +74 -0
- package/skills/sentry/references/sdks/tanstack-start/session-replay.md +76 -0
- package/skills/sentry/references/sdks/tanstack-start/tanstackstart-features.md +128 -0
- package/skills/sentry/references/sdks/tanstack-start/tracing.md +123 -0
- package/skills/sentry/references/sdks/tanstack-start/user-feedback.md +81 -0
- package/skills/sentry/references/search-query-language.md +226 -0
- package/skills/sentry/references/semantics/angular.md +7 -0
- package/skills/sentry/references/semantics/app.md +28 -0
- package/skills/sentry/references/semantics/art.md +17 -0
- package/skills/sentry/references/semantics/aws.md +43 -0
- package/skills/sentry/references/semantics/browser.md +34 -0
- package/skills/sentry/references/semantics/cache.md +12 -0
- package/skills/sentry/references/semantics/client.md +8 -0
- package/skills/sentry/references/semantics/cloud.md +12 -0
- package/skills/sentry/references/semantics/cloudflare.md +23 -0
- package/skills/sentry/references/semantics/code.md +11 -0
- package/skills/sentry/references/semantics/culture.md +11 -0
- package/skills/sentry/references/semantics/db.md +21 -0
- package/skills/sentry/references/semantics/device.md +43 -0
- package/skills/sentry/references/semantics/error.md +7 -0
- package/skills/sentry/references/semantics/event.md +8 -0
- package/skills/sentry/references/semantics/exception.md +10 -0
- package/skills/sentry/references/semantics/faas.md +19 -0
- package/skills/sentry/references/semantics/file.md +8 -0
- package/skills/sentry/references/semantics/flag.md +7 -0
- package/skills/sentry/references/semantics/gcp.md +16 -0
- package/skills/sentry/references/semantics/gen_ai.md +53 -0
- package/skills/sentry/references/semantics/general.md +11 -0
- package/skills/sentry/references/semantics/graphql.md +9 -0
- package/skills/sentry/references/semantics/grpc.md +19 -0
- package/skills/sentry/references/semantics/http.md +34 -0
- package/skills/sentry/references/semantics/index.md +63 -0
- package/skills/sentry/references/semantics/jsonrpc.md +8 -0
- package/skills/sentry/references/semantics/jvm.md +12 -0
- package/skills/sentry/references/semantics/koa.md +7 -0
- package/skills/sentry/references/semantics/logger.md +7 -0
- package/skills/sentry/references/semantics/mcp.md +37 -0
- package/skills/sentry/references/semantics/mdc.md +7 -0
- package/skills/sentry/references/semantics/messaging.md +23 -0
- package/skills/sentry/references/semantics/middleware.md +7 -0
- package/skills/sentry/references/semantics/navigation.md +9 -0
- package/skills/sentry/references/semantics/nel.md +11 -0
- package/skills/sentry/references/semantics/network.md +17 -0
- package/skills/sentry/references/semantics/os.md +15 -0
- package/skills/sentry/references/semantics/otel.md +10 -0
- package/skills/sentry/references/semantics/params.md +7 -0
- package/skills/sentry/references/semantics/process.md +14 -0
- package/skills/sentry/references/semantics/react.md +7 -0
- package/skills/sentry/references/semantics/remix.md +7 -0
- package/skills/sentry/references/semantics/resource.md +7 -0
- package/skills/sentry/references/semantics/rpc.md +10 -0
- package/skills/sentry/references/semantics/score.md +10 -0
- package/skills/sentry/references/semantics/sentry.md +69 -0
- package/skills/sentry/references/semantics/server.md +8 -0
- package/skills/sentry/references/semantics/service.md +8 -0
- package/skills/sentry/references/semantics/session.md +7 -0
- package/skills/sentry/references/semantics/state.md +7 -0
- package/skills/sentry/references/semantics/thread.md +8 -0
- package/skills/sentry/references/semantics/timber.md +7 -0
- package/skills/sentry/references/semantics/trpc.md +8 -0
- package/skills/sentry/references/semantics/ui.md +18 -0
- package/skills/sentry/references/semantics/url.md +15 -0
- package/skills/sentry/references/semantics/user.md +17 -0
- package/skills/sentry/references/semantics/user_agent.md +7 -0
- package/skills/sentry/references/semantics/vercel.md +42 -0
- package/skills/sentry/references/setup-verification.md +39 -0
- package/skills/sentry/references/snapshots/github-actions-fanout.md +206 -0
- package/skills/sentry/references/snapshots/github-actions-simple.md +102 -0
- package/skills/sentry/references/snapshots/github-actions-swift-snapshot-testing.md +118 -0
- package/skills/sentry/references/snapshots/index.md +19 -0
- package/skills/sentry/references/snapshots/snapshot-previews.md +100 -0
- package/skills/sentry/references/snapshots/snapshots.md +123 -0
- package/skills/sentry/references/snapshots/wizard-setup.md +134 -0
- package/skills/testing/LICENSE +21 -0
- package/skills/testing/NOTICE +7 -0
- package/skills/testing/SKILL.md +13 -19
- package/skills/testing/agents/openai.yaml +1 -2
- package/skills/testing/references/selection.md +23 -0
- package/skills/testing/references/tdd.md +19 -0
- package/skills/testing/references/test-design.md +17 -0
- package/src/catalog.ts +1 -7
- package/skills/build-effect-apis/SKILL.md +0 -81
- package/skills/build-effect-apis/agents/openai.yaml +0 -4
- package/skills/build-effect-clis/SKILL.md +0 -92
- package/skills/build-effect-clis/agents/openai.yaml +0 -4
- package/skills/effect-architecture-audit/agents/openai.yaml +0 -4
- package/skills/effect-atom-state/SKILL.md +0 -97
- package/skills/effect-atom-state/agents/openai.yaml +0 -4
- package/skills/effect-ts/SKILL.md +0 -35
- package/skills/effect-ts/agents/openai.yaml +0 -4
- /package/skills/{build-effect-apis/references → effect-development/references/api}/cloudflare-workers.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/runtime-assembly.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/server-and-middleware.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/shared-contracts.md +0 -0
- /package/skills/{effect-architecture-audit/references → effect-development/references/architecture}/service-and-boundary-audit.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-lifecycle.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-workflows.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/tanstack-start.md +0 -0
- /package/skills/{build-effect-clis/references → effect-development/references/cli}/command-design.md +0 -0
- /package/skills/{build-effect-clis/references → effect-development/references/cli}/processes-and-platform.md +0 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
# Sentry Android SDK
|
|
2
|
+
|
|
3
|
+
Opinionated wizard that scans your Android project and guides you through complete
|
|
4
|
+
Sentry setup — error monitoring, tracing, profiling, session replay, logging, and more.
|
|
5
|
+
|
|
6
|
+
> **Note:** SDK versions and APIs below reflect current Sentry docs at time of writing
|
|
7
|
+
> (`io.sentry:sentry-android:8.33.0`, Gradle plugin `6.1.0`). Always verify against
|
|
8
|
+
> [docs.sentry.io/platforms/android/](https://docs.sentry.io/platforms/android/) before
|
|
9
|
+
> implementing.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Phase 1: Detect
|
|
14
|
+
|
|
15
|
+
Run these commands to understand the project before making any recommendations:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Detect project structure and build system
|
|
19
|
+
ls build.gradle build.gradle.kts settings.gradle settings.gradle.kts 2>/dev/null
|
|
20
|
+
|
|
21
|
+
# Check AGP version and existing Sentry
|
|
22
|
+
grep -r '"com.android.application"' build.gradle* app/build.gradle* 2>/dev/null | head -3
|
|
23
|
+
grep -ri sentry build.gradle* app/build.gradle* 2>/dev/null | head -10
|
|
24
|
+
|
|
25
|
+
# Check app-level build file (Groovy vs KTS)
|
|
26
|
+
ls app/build.gradle app/build.gradle.kts 2>/dev/null
|
|
27
|
+
|
|
28
|
+
# Detect Gradle version catalog (libs.versions.toml) — modern AGP projects
|
|
29
|
+
ls gradle/libs.versions.toml 2>/dev/null
|
|
30
|
+
|
|
31
|
+
# Check for existing Sentry entries in the version catalog
|
|
32
|
+
grep -iE 'sentry|io\.sentry' gradle/libs.versions.toml 2>/dev/null | head -10
|
|
33
|
+
|
|
34
|
+
# Check if build files reference the catalog (alias/libs.* usage)
|
|
35
|
+
grep -E 'alias\(libs\.|libs\.[a-zA-Z]' build.gradle build.gradle.kts app/build.gradle app/build.gradle.kts 2>/dev/null | head -5
|
|
36
|
+
|
|
37
|
+
# Detect Kotlin vs Java
|
|
38
|
+
find app/src/main -name "*.kt" 2>/dev/null | head -3
|
|
39
|
+
find app/src/main -name "*.java" 2>/dev/null | head -3
|
|
40
|
+
|
|
41
|
+
# Check minSdk, targetSdk
|
|
42
|
+
grep -E 'minSdk|targetSdk|compileSdk|minSdkVersion|targetSdkVersion' app/build.gradle app/build.gradle.kts 2>/dev/null | head -6
|
|
43
|
+
|
|
44
|
+
# Detect Jetpack Compose
|
|
45
|
+
grep -E 'compose|androidx.compose' app/build.gradle app/build.gradle.kts 2>/dev/null | head -5
|
|
46
|
+
|
|
47
|
+
# Detect OkHttp (popular HTTP client — has dedicated integration)
|
|
48
|
+
grep -E 'okhttp|retrofit' app/build.gradle app/build.gradle.kts 2>/dev/null | head -3
|
|
49
|
+
|
|
50
|
+
# Detect Room or SQLite
|
|
51
|
+
grep -E 'androidx.room|androidx.sqlite' app/build.gradle app/build.gradle.kts 2>/dev/null | head -3
|
|
52
|
+
|
|
53
|
+
# Detect Timber (logging library)
|
|
54
|
+
grep -E 'timber' app/build.gradle app/build.gradle.kts 2>/dev/null | head -3
|
|
55
|
+
|
|
56
|
+
# Detect Jetpack Navigation
|
|
57
|
+
grep -E 'androidx.navigation' app/build.gradle app/build.gradle.kts 2>/dev/null | head -3
|
|
58
|
+
|
|
59
|
+
# Detect Apollo (GraphQL)
|
|
60
|
+
grep -E 'apollo' app/build.gradle app/build.gradle.kts 2>/dev/null | head -3
|
|
61
|
+
|
|
62
|
+
# Check existing Sentry initialization
|
|
63
|
+
grep -r "SentryAndroid.init\|io.sentry.Sentry" app/src/ 2>/dev/null | head -5
|
|
64
|
+
|
|
65
|
+
# Check Application class
|
|
66
|
+
find app/src/main -name "*.kt" -o -name "*.java" 2>/dev/null | xargs grep -l "Application()" 2>/dev/null | head -3
|
|
67
|
+
|
|
68
|
+
# Adjacent backend (for cross-linking)
|
|
69
|
+
ls ../backend ../server ../api 2>/dev/null
|
|
70
|
+
find .. -maxdepth 2 \( -name "go.mod" -o -name "requirements.txt" -o -name "Gemfile" \) 2>/dev/null | grep -v node_modules | head -5
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**What to determine:**
|
|
74
|
+
|
|
75
|
+
| Question | Impact |
|
|
76
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
77
|
+
| `build.gradle.kts` present? | Use Kotlin DSL syntax in all examples |
|
|
78
|
+
| `gradle/libs.versions.toml` present? | Add Sentry to the version catalog; reference via `libs.*` in build files |
|
|
79
|
+
| Catalog already has `sentry` entries? | Reuse the existing version ref; don’t duplicate or hardcode versions |
|
|
80
|
+
| `minSdk < 26`? | Note Session Replay requires API 26+ — silent no-op below that |
|
|
81
|
+
| Compose detected? | Recommend `sentry-compose-android` and Compose-specific masking |
|
|
82
|
+
| OkHttp present? | Recommend `sentry-okhttp` interceptor or Gradle plugin bytecode auto-instrumentation |
|
|
83
|
+
| Room/SQLite present? | Recommend `sentry-android-sqlite` or plugin bytecode instrumentation |
|
|
84
|
+
| Timber present? | Recommend `sentry-android-timber` integration |
|
|
85
|
+
| Jetpack Navigation? | Recommend `sentry-android-navigation` for screen tracking |
|
|
86
|
+
| Already has `SentryAndroid.init()`? | Skip install, jump to feature config |
|
|
87
|
+
| Application subclass exists? | That’s where `SentryAndroid.init()` goes |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Phase 2: Recommend
|
|
92
|
+
|
|
93
|
+
Present a concrete recommendation based on what you found.
|
|
94
|
+
Don’t ask open-ended questions — lead with a proposal:
|
|
95
|
+
|
|
96
|
+
**Recommended (core coverage — always set up these):**
|
|
97
|
+
|
|
98
|
+
- ✅ **Error Monitoring** — captures uncaught exceptions, ANRs, and native NDK crashes
|
|
99
|
+
automatically
|
|
100
|
+
- ✅ **Tracing** — auto-instruments Activity lifecycle, app start, HTTP requests, and
|
|
101
|
+
database queries
|
|
102
|
+
- ✅ **Session Replay** — records screen captures and user interactions for debugging
|
|
103
|
+
(API 26+)
|
|
104
|
+
|
|
105
|
+
**Optional (enhanced observability):**
|
|
106
|
+
|
|
107
|
+
- ⚡ **Profiling** — continuous UI profiling (recommended) or transaction-based sampling
|
|
108
|
+
- ⚡ **Logging** — structured logs via `Sentry.logger()`, with optional Timber bridge
|
|
109
|
+
- ⚡ **User Feedback** — collect user-submitted bug reports from inside the app
|
|
110
|
+
|
|
111
|
+
**Recommendation logic:**
|
|
112
|
+
|
|
113
|
+
| Feature | Recommend when … |
|
|
114
|
+
| ---------------- | ----------------------------------------------------------------------------------- |
|
|
115
|
+
| Error Monitoring | **Always** — non-negotiable baseline for any Android app |
|
|
116
|
+
| Tracing | **Always for Android** — app start time, Activity lifecycle, network latency matter |
|
|
117
|
+
| Session Replay | User-facing production app on API 26+; visual debugging of user issues |
|
|
118
|
+
| Profiling | Performance-sensitive apps, startup time investigations, production perf analysis |
|
|
119
|
+
| Logging | App uses structured logging or you want log-to-trace correlation in Sentry |
|
|
120
|
+
| User Feedback | Beta or customer-facing app where you want user-submitted bug reports |
|
|
121
|
+
|
|
122
|
+
Propose: _“For your [Kotlin / Java] Android app (minSdk X), I recommend setting up Error
|
|
123
|
+
Monitoring + Tracing + Session Replay.
|
|
124
|
+
Want me to also add Profiling and Logging?”_
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Phase 3: Guide
|
|
129
|
+
|
|
130
|
+
### Determine Your Setup Path
|
|
131
|
+
|
|
132
|
+
| Project type | Recommended setup | Complexity |
|
|
133
|
+
| ------------------------------- | ------------------------------------- | ------------------------------------------- |
|
|
134
|
+
| New project, no existing Sentry | Gradle plugin (recommended) | Low — plugin handles most config |
|
|
135
|
+
| Existing project, no Sentry | Gradle plugin or manual init | Medium — add dependency + Application class |
|
|
136
|
+
| Manual full control | `SentryAndroid.init()` in Application | Medium — explicit config, most flexible |
|
|
137
|
+
|
|
138
|
+
### Option 1: Wizard (Recommended)
|
|
139
|
+
|
|
140
|
+
> **You need to run this yourself** — the wizard opens a browser for login and requires
|
|
141
|
+
> interactive input that the agent can’t handle.
|
|
142
|
+
> Copy-paste into your terminal:
|
|
143
|
+
>
|
|
144
|
+
> ```
|
|
145
|
+
> npx @sentry/wizard@latest -i android
|
|
146
|
+
> ```
|
|
147
|
+
>
|
|
148
|
+
> It handles login, org/project selection, Gradle plugin setup, dependency installation,
|
|
149
|
+
> DSN configuration, and ProGuard/R8 mapping upload.
|
|
150
|
+
>
|
|
151
|
+
> **Once it finishes, come back and skip to [Verification](#verification).**
|
|
152
|
+
|
|
153
|
+
If the user skips the wizard, proceed with Option 2 (Manual Setup) below.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### Option 2: Manual Setup
|
|
158
|
+
|
|
159
|
+
#### Using a Gradle Version Catalog (`gradle/libs.versions.toml`)
|
|
160
|
+
|
|
161
|
+
If Phase 1 detected `gradle/libs.versions.toml`, add Sentry to the catalog **first**,
|
|
162
|
+
then reference it from your build files.
|
|
163
|
+
This keeps versions centralized and matches modern AGP project conventions.
|
|
164
|
+
|
|
165
|
+
**Step 1 — Add entries to `gradle/libs.versions.toml`**
|
|
166
|
+
|
|
167
|
+
```toml
|
|
168
|
+
[versions]
|
|
169
|
+
sentry = "8.33.0"
|
|
170
|
+
sentryGradlePlugin = "6.1.0"
|
|
171
|
+
|
|
172
|
+
[libraries]
|
|
173
|
+
sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentry" }
|
|
174
|
+
sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry" }
|
|
175
|
+
# Optional integrations — add only the ones your project uses:
|
|
176
|
+
sentry-android-timber = { module = "io.sentry:sentry-android-timber" }
|
|
177
|
+
sentry-android-fragment = { module = "io.sentry:sentry-android-fragment" }
|
|
178
|
+
sentry-compose-android = { module = "io.sentry:sentry-compose-android" }
|
|
179
|
+
sentry-android-navigation = { module = "io.sentry:sentry-android-navigation" }
|
|
180
|
+
sentry-okhttp = { module = "io.sentry:sentry-okhttp" }
|
|
181
|
+
sentry-android-sqlite = { module = "io.sentry:sentry-android-sqlite" }
|
|
182
|
+
sentry-kotlin-extensions = { module = "io.sentry:sentry-kotlin-extensions" }
|
|
183
|
+
|
|
184
|
+
[plugins]
|
|
185
|
+
sentry-android-gradle = { id = "io.sentry.android.gradle", version.ref = "sentryGradlePlugin" }
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
> **Note:** Optional integration entries omit `version.ref` — their versions come from
|
|
189
|
+
> the BOM at resolution time.
|
|
190
|
+
> Only `sentry-bom` needs the version ref.
|
|
191
|
+
> If the catalog already defines a `sentry` version, reuse it instead of adding a
|
|
192
|
+
> duplicate entry.
|
|
193
|
+
|
|
194
|
+
**Step 2 — Reference the catalog from `build.gradle[.kts]`**
|
|
195
|
+
|
|
196
|
+
Project-level `build.gradle.kts`:
|
|
197
|
+
|
|
198
|
+
```kotlin
|
|
199
|
+
plugins {
|
|
200
|
+
alias(libs.plugins.sentry.android.gradle) apply false
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
App-level `app/build.gradle.kts`:
|
|
205
|
+
|
|
206
|
+
```kotlin
|
|
207
|
+
plugins {
|
|
208
|
+
id("com.android.application")
|
|
209
|
+
alias(libs.plugins.sentry.android.gradle)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
dependencies {
|
|
213
|
+
implementation(platform(libs.sentry.bom))
|
|
214
|
+
implementation(libs.sentry.android)
|
|
215
|
+
// implementation(libs.sentry.okhttp)
|
|
216
|
+
// implementation(libs.sentry.compose.android)
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Groovy DSL (`app/build.gradle`) equivalent:
|
|
221
|
+
|
|
222
|
+
```groovy
|
|
223
|
+
plugins {
|
|
224
|
+
id "com.android.application"
|
|
225
|
+
alias libs.plugins.sentry.android.gradle
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
dependencies {
|
|
229
|
+
implementation platform(libs.sentry.bom)
|
|
230
|
+
implementation libs.sentry.android
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Then continue with the `sentry {}` configuration block from Path A, Step 2 below.
|
|
235
|
+
The rest of the setup (Application class init, manifest registration, verification) is
|
|
236
|
+
identical.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
#### Path A: Gradle Plugin (Recommended)
|
|
241
|
+
|
|
242
|
+
The Sentry Gradle plugin is the easiest setup path.
|
|
243
|
+
It:
|
|
244
|
+
|
|
245
|
+
- Uploads ProGuard/R8 mapping files automatically on release builds
|
|
246
|
+
- Injects source context into stack frames
|
|
247
|
+
- Optionally instruments OkHttp, Room/SQLite, File I/O, Compose navigation, and
|
|
248
|
+
`android.util.Log` via bytecode transforms (zero source changes)
|
|
249
|
+
|
|
250
|
+
**Step 1 — Add the plugin to `build.gradle[.kts]` (project-level)**
|
|
251
|
+
|
|
252
|
+
Groovy DSL (`build.gradle`):
|
|
253
|
+
|
|
254
|
+
```groovy
|
|
255
|
+
plugins {
|
|
256
|
+
id "io.sentry.android.gradle" version "6.1.0" apply false
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Kotlin DSL (`build.gradle.kts`):
|
|
261
|
+
|
|
262
|
+
```kotlin
|
|
263
|
+
plugins {
|
|
264
|
+
id("io.sentry.android.gradle") version "6.1.0" apply false
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Step 2 — Apply plugin + add dependencies in `app/build.gradle[.kts]`**
|
|
269
|
+
|
|
270
|
+
Groovy DSL:
|
|
271
|
+
|
|
272
|
+
```groovy
|
|
273
|
+
plugins {
|
|
274
|
+
id "com.android.application"
|
|
275
|
+
id "io.sentry.android.gradle"
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
android {
|
|
279
|
+
// ...
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
dependencies {
|
|
283
|
+
// Use BOM for consistent versions across sentry modules
|
|
284
|
+
implementation platform("io.sentry:sentry-bom:8.33.0")
|
|
285
|
+
implementation "io.sentry:sentry-android"
|
|
286
|
+
|
|
287
|
+
// Optional integrations (add what's relevant):
|
|
288
|
+
// implementation "io.sentry:sentry-android-timber" // Timber bridge
|
|
289
|
+
// implementation "io.sentry:sentry-android-fragment" // Fragment lifecycle tracing
|
|
290
|
+
// implementation "io.sentry:sentry-compose-android" // Jetpack Compose support
|
|
291
|
+
// implementation "io.sentry:sentry-android-navigation" // Jetpack Navigation
|
|
292
|
+
// implementation "io.sentry:sentry-okhttp" // OkHttp interceptor
|
|
293
|
+
// implementation "io.sentry:sentry-android-sqlite" // Room/SQLite tracing
|
|
294
|
+
// implementation "io.sentry:sentry-kotlin-extensions" // Coroutine context propagation
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
sentry {
|
|
298
|
+
org = "YOUR_ORG_SLUG"
|
|
299
|
+
projectName = "YOUR_PROJECT_SLUG"
|
|
300
|
+
authToken = System.getenv("SENTRY_AUTH_TOKEN")
|
|
301
|
+
|
|
302
|
+
// Enable auto-instrumentation via bytecode transforms (no source changes needed)
|
|
303
|
+
tracingInstrumentation {
|
|
304
|
+
enabled = true
|
|
305
|
+
features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO,
|
|
306
|
+
InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE]
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Upload ProGuard mapping and source context on release
|
|
310
|
+
autoUploadProguardMapping = true
|
|
311
|
+
includeSourceContext = true
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Kotlin DSL (`app/build.gradle.kts`):
|
|
316
|
+
|
|
317
|
+
```kotlin
|
|
318
|
+
plugins {
|
|
319
|
+
id("com.android.application")
|
|
320
|
+
id("io.sentry.android.gradle")
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
dependencies {
|
|
324
|
+
implementation(platform("io.sentry:sentry-bom:8.33.0"))
|
|
325
|
+
implementation("io.sentry:sentry-android")
|
|
326
|
+
|
|
327
|
+
// Optional integrations:
|
|
328
|
+
// implementation("io.sentry:sentry-android-timber")
|
|
329
|
+
// implementation("io.sentry:sentry-android-fragment")
|
|
330
|
+
// implementation("io.sentry:sentry-compose-android")
|
|
331
|
+
// implementation("io.sentry:sentry-android-navigation")
|
|
332
|
+
// implementation("io.sentry:sentry-okhttp")
|
|
333
|
+
// implementation("io.sentry:sentry-android-sqlite")
|
|
334
|
+
// implementation("io.sentry:sentry-kotlin-extensions")
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
sentry {
|
|
338
|
+
org = "YOUR_ORG_SLUG"
|
|
339
|
+
projectName = "YOUR_PROJECT_SLUG"
|
|
340
|
+
authToken = System.getenv("SENTRY_AUTH_TOKEN")
|
|
341
|
+
|
|
342
|
+
tracingInstrumentation {
|
|
343
|
+
enabled = true
|
|
344
|
+
features = setOf(
|
|
345
|
+
InstrumentationFeature.DATABASE,
|
|
346
|
+
InstrumentationFeature.FILE_IO,
|
|
347
|
+
InstrumentationFeature.OKHTTP,
|
|
348
|
+
InstrumentationFeature.COMPOSE,
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
autoUploadProguardMapping = true
|
|
353
|
+
includeSourceContext = true
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Step 3 — Initialize Sentry in your Application class**
|
|
358
|
+
|
|
359
|
+
If you don’t have an Application subclass, create one:
|
|
360
|
+
|
|
361
|
+
```kotlin
|
|
362
|
+
// MyApplication.kt
|
|
363
|
+
import android.app.Application
|
|
364
|
+
import io.sentry.SentryLevel
|
|
365
|
+
import io.sentry.android.core.SentryAndroid
|
|
366
|
+
import io.sentry.android.replay.SentryReplayOptions
|
|
367
|
+
|
|
368
|
+
class MyApplication : Application() {
|
|
369
|
+
override fun onCreate() {
|
|
370
|
+
super.onCreate()
|
|
371
|
+
|
|
372
|
+
SentryAndroid.init(this) { options ->
|
|
373
|
+
options.dsn = "YOUR_SENTRY_DSN"
|
|
374
|
+
|
|
375
|
+
// Tracing — lower to 0.1–0.2 in high-traffic production
|
|
376
|
+
options.tracesSampleRate = 1.0
|
|
377
|
+
|
|
378
|
+
// Profiling — use continuous UI profiling (recommended, SDK ≥ 8.7.0)
|
|
379
|
+
options.profileSessionSampleRate = 1.0
|
|
380
|
+
|
|
381
|
+
// Session Replay (API 26+ only; silent no-op below API 26)
|
|
382
|
+
options.sessionReplay.sessionSampleRate = 0.1 // 10% of all sessions
|
|
383
|
+
options.sessionReplay.onErrorSampleRate = 1.0 // 100% on error
|
|
384
|
+
|
|
385
|
+
// Structured logging
|
|
386
|
+
options.logs.isEnabled = true
|
|
387
|
+
|
|
388
|
+
// Environment
|
|
389
|
+
options.environment = BuildConfig.BUILD_TYPE
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Java equivalent:
|
|
396
|
+
|
|
397
|
+
```java
|
|
398
|
+
// MyApplication.java
|
|
399
|
+
import android.app.Application;
|
|
400
|
+
import io.sentry.android.core.SentryAndroid;
|
|
401
|
+
|
|
402
|
+
public class MyApplication extends Application {
|
|
403
|
+
@Override
|
|
404
|
+
public void onCreate() {
|
|
405
|
+
super.onCreate();
|
|
406
|
+
|
|
407
|
+
SentryAndroid.init(this, options -> {
|
|
408
|
+
options.setDsn("YOUR_SENTRY_DSN");
|
|
409
|
+
options.setTracesSampleRate(1.0);
|
|
410
|
+
options.setProfileSessionSampleRate(1.0);
|
|
411
|
+
options.getSessionReplay().setSessionSampleRate(0.1);
|
|
412
|
+
options.getSessionReplay().setOnErrorSampleRate(1.0);
|
|
413
|
+
options.getLogs().setEnabled(true);
|
|
414
|
+
options.setEnvironment(BuildConfig.BUILD_TYPE);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Step 4 — Register Application in `AndroidManifest.xml`**
|
|
421
|
+
|
|
422
|
+
```xml
|
|
423
|
+
<application
|
|
424
|
+
android:name=".MyApplication"
|
|
425
|
+
... >
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
#### Path B: Manual Setup (No Gradle Plugin)
|
|
431
|
+
|
|
432
|
+
Use this if you can’t use the Gradle plugin (e.g., non-standard build setups).
|
|
433
|
+
|
|
434
|
+
**Step 1 — Add dependency in `app/build.gradle[.kts]`**
|
|
435
|
+
|
|
436
|
+
```kotlin
|
|
437
|
+
dependencies {
|
|
438
|
+
implementation(platform("io.sentry:sentry-bom:8.33.0"))
|
|
439
|
+
implementation("io.sentry:sentry-android")
|
|
440
|
+
}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
**Step 2 — Initialize in Application class** (same as Path A, Step 3)
|
|
444
|
+
|
|
445
|
+
**Step 3 — Configure ProGuard/R8 manually**
|
|
446
|
+
|
|
447
|
+
The Sentry SDK ships a ProGuard rules file automatically.
|
|
448
|
+
For manual mapping upload, install `sentry-cli` and add to your CI:
|
|
449
|
+
|
|
450
|
+
```bash
|
|
451
|
+
sentry-cli releases files "my-app@1.0.0+42" upload-proguard \
|
|
452
|
+
--org YOUR_ORG --project YOUR_PROJECT \
|
|
453
|
+
app/build/outputs/mapping/release/mapping.txt
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
### Quick Reference: Full-Featured `SentryAndroid.init()`
|
|
459
|
+
|
|
460
|
+
```kotlin
|
|
461
|
+
SentryAndroid.init(this) { options ->
|
|
462
|
+
options.dsn = "YOUR_SENTRY_DSN"
|
|
463
|
+
|
|
464
|
+
// Environment and release
|
|
465
|
+
options.environment = BuildConfig.BUILD_TYPE // "debug", "release", etc.
|
|
466
|
+
options.release = "${BuildConfig.APPLICATION_ID}@${BuildConfig.VERSION_NAME}+${BuildConfig.VERSION_CODE}"
|
|
467
|
+
|
|
468
|
+
// Tracing — sample 100% in dev, lower to 10–20% in production
|
|
469
|
+
options.tracesSampleRate = 1.0
|
|
470
|
+
|
|
471
|
+
// Continuous UI profiling (recommended over transaction-based)
|
|
472
|
+
options.profileSessionSampleRate = 1.0
|
|
473
|
+
|
|
474
|
+
// Session Replay (API 26+; silent no-op on API 21–25)
|
|
475
|
+
options.sessionReplay.sessionSampleRate = 0.1
|
|
476
|
+
options.sessionReplay.onErrorSampleRate = 1.0
|
|
477
|
+
options.sessionReplay.maskAllText = true // mask text for privacy
|
|
478
|
+
options.sessionReplay.maskAllImages = true // mask images for privacy
|
|
479
|
+
|
|
480
|
+
// Structured logging
|
|
481
|
+
options.logs.isEnabled = true
|
|
482
|
+
|
|
483
|
+
// Error enrichment
|
|
484
|
+
options.isAttachScreenshot = true // capture screenshot on error
|
|
485
|
+
options.isAttachViewHierarchy = true // attach view hierarchy JSON
|
|
486
|
+
|
|
487
|
+
// ANR detection (5s default; watchdog + ApplicationExitInfo API 30+)
|
|
488
|
+
options.isAnrEnabled = true
|
|
489
|
+
|
|
490
|
+
// NDK native crash handling (enabled by default)
|
|
491
|
+
options.isEnableNdk = true
|
|
492
|
+
|
|
493
|
+
// Send PII: IP address, user data
|
|
494
|
+
options.sendDefaultPii = true
|
|
495
|
+
|
|
496
|
+
// Trace propagation (backend distributed tracing)
|
|
497
|
+
options.tracePropagationTargets = listOf("api.yourapp.com", ".*\\.yourapp\\.com")
|
|
498
|
+
|
|
499
|
+
// Verbose logging — disable in production
|
|
500
|
+
options.isDebug = BuildConfig.DEBUG
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### For Each Agreed Feature
|
|
507
|
+
|
|
508
|
+
Walk through features one at a time.
|
|
509
|
+
Load the reference file for each, follow its steps, then verify before moving on:
|
|
510
|
+
|
|
511
|
+
| Feature | Reference | Load when … |
|
|
512
|
+
| --------------------- | ----------------------- | ---------------------------------------------------- |
|
|
513
|
+
| Error Monitoring | `./error-monitoring.md` | Always (baseline) |
|
|
514
|
+
| Tracing & Performance | `./tracing.md` | Always for Android (Activity lifecycle, network) |
|
|
515
|
+
| Profiling | `./profiling.md` | Performance-sensitive production apps |
|
|
516
|
+
| Session Replay | `./session-replay.md` | User-facing apps (API 26+) |
|
|
517
|
+
| Logging | `./logging.md` | Structured logging / log-to-trace correlation |
|
|
518
|
+
| Metrics | `./metrics.md` | Custom metric tracking (SDK ≥ 8.30.0) |
|
|
519
|
+
| Crons | `./crons.md` | Scheduled jobs, WorkManager check-ins |
|
|
520
|
+
| Integration Reference | `./integrations.md` | Built-in, optional, and Gradle bytecode integrations |
|
|
521
|
+
|
|
522
|
+
For each feature: `Read ./<feature>.md`, follow steps exactly, verify it works.
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Configuration Reference
|
|
527
|
+
|
|
528
|
+
### Core `SentryOptions` (via `SentryAndroid.init`)
|
|
529
|
+
|
|
530
|
+
| Option | Type | Default | Purpose |
|
|
531
|
+
| ----------------------- | ---------------------------------------- | ------- | ------------------------------------------------------------- |
|
|
532
|
+
| `dsn` | `String` | — | **Required.** Project DSN; SDK silently disabled if empty |
|
|
533
|
+
| `environment` | `String` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` |
|
|
534
|
+
| `release` | `String` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` |
|
|
535
|
+
| `dist` | `String` | — | Build variant / distribution identifier |
|
|
536
|
+
| `sendDefaultPii` | `Boolean` | `false` | Include PII: IP address, user data |
|
|
537
|
+
| `sampleRate` | `Double` | `1.0` | Error event sampling (0.0–1.0) |
|
|
538
|
+
| `maxBreadcrumbs` | `Int` | `100` | Max breadcrumbs per event |
|
|
539
|
+
| `isAttachStacktrace` | `Boolean` | `true` | Auto-attach stack traces to message events |
|
|
540
|
+
| `isAttachScreenshot` | `Boolean` | `false` | Capture screenshot on error |
|
|
541
|
+
| `isAttachViewHierarchy` | `Boolean` | `false` | Attach JSON view hierarchy as attachment |
|
|
542
|
+
| `isDebug` | `Boolean` | `false` | Verbose SDK output. **Never use in production** |
|
|
543
|
+
| `isEnabled` | `Boolean` | `true` | Disable SDK entirely (e.g., for testing) |
|
|
544
|
+
| `beforeSend` | `SentryOptions.BeforeSendCallback` | — | Modify or drop error events before sending |
|
|
545
|
+
| `beforeBreadcrumb` | `SentryOptions.BeforeBreadcrumbCallback` | — | Filter breadcrumbs before storage |
|
|
546
|
+
|
|
547
|
+
### Tracing Options
|
|
548
|
+
|
|
549
|
+
| Option | Type | Default | Purpose |
|
|
550
|
+
| -------------------------------------- | ----------------------- | -------- | ---------------------------------------------------------- |
|
|
551
|
+
| `tracesSampleRate` | `Double` | `0.0` | Transaction sample rate (0–1). Use `1.0` in dev |
|
|
552
|
+
| `tracesSampler` | `TracesSamplerCallback` | — | Per-transaction sampling; overrides `tracesSampleRate` |
|
|
553
|
+
| `tracePropagationTargets` | `List<String>` | `[".*"]` | Hosts/URLs to receive `sentry-trace` and `baggage` headers |
|
|
554
|
+
| `isEnableAutoActivityLifecycleTracing` | `Boolean` | `true` | Auto-instrument Activity lifecycle |
|
|
555
|
+
| `isEnableTimeToFullDisplayTracing` | `Boolean` | `false` | TTFD spans (requires `Sentry.reportFullyDisplayed()`) |
|
|
556
|
+
| `isEnableUserInteractionTracing` | `Boolean` | `false` | Auto-instrument user gestures as transactions |
|
|
557
|
+
|
|
558
|
+
### Profiling Options
|
|
559
|
+
|
|
560
|
+
| Option | Type | Default | Purpose |
|
|
561
|
+
| ---------------------------- | --------- | ------- | ---------------------------------------------------------------------- |
|
|
562
|
+
| `profileSessionSampleRate` | `Double` | `0.0` | Continuous profiling sample rate (SDK ≥ 8.7.0, API 22+) |
|
|
563
|
+
| `profilesSampleRate` | `Double` | `0.0` | Legacy transaction profiling rate (mutually exclusive with continuous) |
|
|
564
|
+
| `isProfilingStartOnAppStart` | `Boolean` | `false` | Auto-start profiling session on app launch |
|
|
565
|
+
|
|
566
|
+
### ANR Options
|
|
567
|
+
|
|
568
|
+
| Option | Type | Default | Purpose |
|
|
569
|
+
| -------------------------- | --------- | ------- | ----------------------------------------------- |
|
|
570
|
+
| `isAnrEnabled` | `Boolean` | `true` | Enable ANR watchdog thread |
|
|
571
|
+
| `anrTimeoutIntervalMillis` | `Long` | `5000` | Milliseconds before reporting ANR |
|
|
572
|
+
| `isAnrReportInDebug` | `Boolean` | `false` | Report ANRs in debug builds (noisy in debugger) |
|
|
573
|
+
|
|
574
|
+
### NDK Options
|
|
575
|
+
|
|
576
|
+
| Option | Type | Default | Purpose |
|
|
577
|
+
| --------------------------- | --------- | ------- | --------------------------------------------- |
|
|
578
|
+
| `isEnableNdk` | `Boolean` | `true` | Enable native crash capture via sentry-native |
|
|
579
|
+
| `isEnableScopeSync` | `Boolean` | `true` | Sync Java scope (user, tags) to NDK layer |
|
|
580
|
+
| `isEnableTombstoneFetchJob` | `Boolean` | `true` | Fetch NDK tombstone files for enrichment |
|
|
581
|
+
|
|
582
|
+
### Session Replay Options (`options.sessionReplay`)
|
|
583
|
+
|
|
584
|
+
| Option | Type | Default | Purpose |
|
|
585
|
+
| ------------------- | --------------------- | -------- | -------------------------------------- |
|
|
586
|
+
| `sessionSampleRate` | `Double` | `0.0` | Fraction of all sessions to record |
|
|
587
|
+
| `onErrorSampleRate` | `Double` | `0.0` | Fraction of error sessions to record |
|
|
588
|
+
| `maskAllText` | `Boolean` | `true` | Mask all text in replays |
|
|
589
|
+
| `maskAllImages` | `Boolean` | `true` | Mask all images in replays |
|
|
590
|
+
| `quality` | `SentryReplayQuality` | `MEDIUM` | Video quality: `LOW`, `MEDIUM`, `HIGH` |
|
|
591
|
+
|
|
592
|
+
### Logging Options (`options.logs`)
|
|
593
|
+
|
|
594
|
+
| Option | Type | Default | Purpose |
|
|
595
|
+
| --------------- | ----------------------- | ------- | ------------------------------------------- |
|
|
596
|
+
| `isEnabled` | `Boolean` | `false` | Enable `Sentry.logger()` API (SDK ≥ 8.12.0) |
|
|
597
|
+
| `setBeforeSend` | `BeforeSendLogCallback` | — | Filter/modify log entries before sending |
|
|
598
|
+
|
|
599
|
+
### Environment Variables
|
|
600
|
+
|
|
601
|
+
| Variable | Purpose | Notes |
|
|
602
|
+
| -------------------- | ------------------------------------------- | --------------------------------------------- |
|
|
603
|
+
| `SENTRY_DSN` | Data Source Name | Set in CI; SDK reads from environment at init |
|
|
604
|
+
| `SENTRY_AUTH_TOKEN` | Upload ProGuard mappings and source context | **Never commit — use CI/CD secrets** |
|
|
605
|
+
| `SENTRY_ORG` | Organization slug | Used by Gradle plugin `sentry.org` |
|
|
606
|
+
| `SENTRY_PROJECT` | Project slug | Used by Gradle plugin `sentry.projectName` |
|
|
607
|
+
| `SENTRY_RELEASE` | Release identifier | Falls back from `options.release` |
|
|
608
|
+
| `SENTRY_ENVIRONMENT` | Environment name | Falls back from `options.environment` |
|
|
609
|
+
|
|
610
|
+
You can also configure DSN and many options via `AndroidManifest.xml` meta-data:
|
|
611
|
+
|
|
612
|
+
```xml
|
|
613
|
+
<application>
|
|
614
|
+
<meta-data android:name="io.sentry.dsn" android:value="YOUR_DSN" />
|
|
615
|
+
<meta-data android:name="io.sentry.traces-sample-rate" android:value="1.0" />
|
|
616
|
+
<meta-data android:name="io.sentry.environment" android:value="production" />
|
|
617
|
+
<meta-data android:name="io.sentry.anr.enable" android:value="true" />
|
|
618
|
+
<meta-data android:name="io.sentry.attach-screenshot" android:value="true" />
|
|
619
|
+
<meta-data android:name="io.sentry.attach-view-hierarchy" android:value="true" />
|
|
620
|
+
</application>
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
> ⚠️ Manifest meta-data is a convenient alternative but does **not** support the full
|
|
624
|
+
> option set. For complex configuration (session replay, profiling, hooks), use
|
|
625
|
+
> `SentryAndroid.init()`.
|
|
626
|
+
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
## Verification
|
|
630
|
+
|
|
631
|
+
After setup, verify Sentry is receiving events:
|
|
632
|
+
|
|
633
|
+
**Test error capture:**
|
|
634
|
+
|
|
635
|
+
```kotlin
|
|
636
|
+
// In an Activity or Fragment
|
|
637
|
+
try {
|
|
638
|
+
throw RuntimeException("Sentry Android SDK test")
|
|
639
|
+
} catch (e: Exception) {
|
|
640
|
+
Sentry.captureException(e)
|
|
641
|
+
}
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
**Test tracing:**
|
|
645
|
+
|
|
646
|
+
```kotlin
|
|
647
|
+
val transaction = Sentry.startTransaction("test-task", "task")
|
|
648
|
+
val span = transaction.startChild("test-span", "description")
|
|
649
|
+
span.finish()
|
|
650
|
+
transaction.finish()
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
**Test structured logging (SDK ≥ 8.12.0):**
|
|
654
|
+
|
|
655
|
+
```kotlin
|
|
656
|
+
Sentry.logger().info("Sentry logging test")
|
|
657
|
+
Sentry.logger().error("Error log test", Exception("test error"))
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
**Check the Sentry dashboard:**
|
|
661
|
+
|
|
662
|
+
- **Issues** → your test exception should appear within seconds
|
|
663
|
+
- **Traces** → look for `test-task` transaction with child span
|
|
664
|
+
- **Replays** → session recording visible after app interaction (requires API 26+)
|
|
665
|
+
- **Logs** → structured log entries visible under Logs tab
|
|
666
|
+
|
|
667
|
+
If nothing appears:
|
|
668
|
+
|
|
669
|
+
1. Set `options.isDebug = true` — SDK logs to Logcat
|
|
670
|
+
2. Verify DSN is correct and matches your Sentry project
|
|
671
|
+
3. Check that your `Application` class is registered in `AndroidManifest.xml` as
|
|
672
|
+
`android:name`
|
|
673
|
+
4. Confirm the device/emulator has internet connectivity
|
|
674
|
+
5. For NDK crashes, ensure `isEnableNdk = true` (default) and build with NDK support
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
## Phase 4: Cross-Link
|
|
679
|
+
|
|
680
|
+
After completing Android setup, check for a backend or web frontend missing Sentry
|
|
681
|
+
coverage:
|
|
682
|
+
|
|
683
|
+
```bash
|
|
684
|
+
# Adjacent backend directories
|
|
685
|
+
ls ../backend ../server ../api 2>/dev/null
|
|
686
|
+
cat ../go.mod 2>/dev/null | head -3
|
|
687
|
+
cat ../requirements.txt ../pyproject.toml 2>/dev/null | head -5
|
|
688
|
+
cat ../Gemfile 2>/dev/null | head -3
|
|
689
|
+
ls ../backend/package.json ../server/package.json 2>/dev/null
|
|
690
|
+
|
|
691
|
+
# iOS counterpart app
|
|
692
|
+
ls ../ios ../YourApp-iOS 2>/dev/null
|
|
693
|
+
find .. -maxdepth 3 -name "*.xcodeproj" 2>/dev/null | head -3
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
If a backend or related platform exists without Sentry, suggest the matching skill:
|
|
697
|
+
|
|
698
|
+
| Detected | Suggest skill |
|
|
699
|
+
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
700
|
+
| Go backend (`go.mod`) | [`go`](../go/index.md) |
|
|
701
|
+
| Python backend (`requirements.txt`, `pyproject.toml`) | [`python`](../python/index.md) |
|
|
702
|
+
| Ruby backend (`Gemfile`) | [`ruby`](../ruby/index.md) |
|
|
703
|
+
| Node.js backend | `@sentry/node` — see [docs.sentry.io/platforms/javascript/guides/express/](https://docs.sentry.io/platforms/javascript/guides/express/) |
|
|
704
|
+
| iOS app (`.xcodeproj`) | [`cocoa`](../cocoa/index.md) |
|
|
705
|
+
| React Native (`package.json` with `react-native`) | [`react-native`](../react-native/index.md) |
|
|
706
|
+
| React / Next.js web | [`react`](../react/index.md) or [`nextjs`](../nextjs/index.md) |
|
|
707
|
+
|
|
708
|
+
**Distributed tracing setup** — if the backend skill is added, configure
|
|
709
|
+
`tracePropagationTargets` in Android to propagate trace context to your API:
|
|
710
|
+
|
|
711
|
+
```kotlin
|
|
712
|
+
options.tracePropagationTargets = listOf(
|
|
713
|
+
"api.yourapp.com",
|
|
714
|
+
".*\\.yourapp\\.com"
|
|
715
|
+
)
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
This links mobile transactions to backend traces in the Sentry waterfall view.
|
|
719
|
+
|
|
720
|
+
---
|
|
721
|
+
|
|
722
|
+
## Troubleshooting
|
|
723
|
+
|
|
724
|
+
| Issue | Solution |
|
|
725
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
726
|
+
| Events not appearing in Sentry | Set `isDebug = true`, check Logcat for SDK errors; verify DSN is correct and matches your project |
|
|
727
|
+
| `SentryAndroid.init()` not called | Confirm `android:name=".MyApplication"` is set in `AndroidManifest.xml`; Application class not abstract |
|
|
728
|
+
| Gradle plugin not found | Add the plugin to project-level `build.gradle.kts` first, then `apply false`; verify version `6.1.0` |
|
|
729
|
+
| ProGuard mapping not uploading | Set `SENTRY_AUTH_TOKEN` env var; ensure `autoUploadProguardMapping = true` in `sentry {}` block |
|
|
730
|
+
| NDK crashes not captured | Verify `isEnableNdk = true` (default); ensure project has NDK configured in `android.ndkVersion` |
|
|
731
|
+
| ANR reported in debugger | Set `isAnrReportInDebug = false` (default); ANR watchdog fires when debugger pauses threads |
|
|
732
|
+
| Session replay not recording | Requires API 26+; verify `sessionSampleRate > 0` or `onErrorSampleRate > 0`; check Logcat for replay errors |
|
|
733
|
+
| Session replay shows blank screen | PixelCopy (default) requires hardware acceleration; try `SentryReplayOptions.screenshotQuality = CANVAS` |
|
|
734
|
+
| Replay masking misaligned | Views with `translationX/Y` or `clipToPadding=false` can offset masks; report to [github.com/getsentry/sentry-java](https://github.com/getsentry/sentry-java) |
|
|
735
|
+
| `beforeSend` not firing | `beforeSend` only intercepts managed (Java/Kotlin) events; NDK native crashes bypass it |
|
|
736
|
+
| OkHttp spans not appearing | Add `SentryOkHttpInterceptor` to your `OkHttpClient`, or use Gradle plugin `OKHTTP` bytecode instrumentation |
|
|
737
|
+
| Spans not attached to transaction | Ensure `TransactionOptions().setBindToScope(true)` when starting transaction; child spans look for scope root |
|
|
738
|
+
| Tracing not recording | Verify `tracesSampleRate > 0`; Activity instrumentation requires `isEnableAutoActivityLifecycleTracing = true` (default) |
|
|
739
|
+
| Continuous profiling not working | SDK ≥ 8.7.0 required; API 22+ required; set `profileSessionSampleRate > 0`; don’t also set `profilesSampleRate` |
|
|
740
|
+
| Both profiling modes set | `profilesSampleRate` and `profileSessionSampleRate` are mutually exclusive — use only one |
|
|
741
|
+
| TTFD spans missing | Set `isEnableTimeToFullDisplayTracing = true` and call `Sentry.reportFullyDisplayed()` when screen is ready |
|
|
742
|
+
| Kotlin coroutine scope lost | Add `sentry-kotlin-extensions` dependency; use `Sentry.cloneMainContext()` to propagate trace context |
|
|
743
|
+
| Release build stack traces unreadable | ProGuard mapping not uploaded; confirm Gradle plugin `autoUploadProguardMapping = true` and auth token set |
|
|
744
|
+
| Source context not showing in Sentry | Enable `includeSourceContext = true` in `sentry {}` block (Gradle plugin required) |
|
|
745
|
+
| BOM version conflict | Use `implementation(platform("io.sentry:sentry-bom:8.33.0"))` and omit versions from all other `io.sentry:*` entries |
|
|
746
|
+
| Version catalog alias unresolved | After editing `gradle/libs.versions.toml`, sync Gradle; alias names use `-` in TOML and `.` in build files (e.g., `sentry-android` → `libs.sentry.android`) |
|
|
747
|
+
| Duplicate Sentry version in catalog | Reuse the existing `[versions] sentry = "..."` entry; don’t add a second key, and don’t hardcode the version in `build.gradle` when the catalog is in use |
|
|
748
|
+
| `SENTRY_AUTH_TOKEN` exposed | Auth token is build-time only — never pass it to `SentryAndroid.init()` or embed in the APK |
|