feat(docs): add Sentry SDK for error tracking, replay, and metrics#122
Merged
Conversation
Integrates @sentry/astro with: - Error tracking and session replay - Performance tracing (100% sample rate) - Custom metrics for hero section interactions: - hero_command_copied (when users copy install commands) - hero_install_method_selected (when users change dropdown) Closes #117 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 1756 uncovered lines. Files with missing lines (24)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 66.66% 66.66% —%
==========================================
Files 45 45 —
Lines 5267 5267 —
Branches 0 0 —
==========================================
+ Hits 3511 3511 —
- Misses 1756 1756 —
- Partials 0 0 —Generated by Codecov Action |
Contributor
|
The inline scripts in InstallSelector.astro need access to Sentry.metrics but @sentry/astro imports Sentry as an ES module without exposing it on window. This adds the global exposure so custom metrics work. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds @sentry/astro to the docs website for monitoring errors, user sessions, and performance. Also tracks custom metrics when users interact with the hero install command section.
Changes
@sentry/astrowith client and server configshero_command_copied- tracks when users copy an install commandhero_install_method_selected- tracks when users switch between curl/npx/npm/pnpm/bunTest Plan
cd docs && bun run devdebug: truein client config if needed)Notes
SENTRY_AUTH_TOKENenv var needed for source maps upload in productionCloses #117