getsentry/sentry-javascript
Official Sentry SDKs for JavaScript
Healthy across the board
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit today
- ✓16 active contributors
- ✓Distributed ownership (top contributor 27% of recent commits)
- ✓MIT licensed
- ✓CI configured
- ✓Tests present
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests + OpenSSF Scorecard
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/getsentry/sentry-javascript)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card
This card auto-renders when someone shares https://repopilot.app/r/getsentry/sentry-javascript on X, Slack, or LinkedIn.
Ask AI about getsentry/sentry-javascript
Grounded in the actual source code. Pick a starter question or write your own.
Onboarding doc
Onboarding: getsentry/sentry-javascript
Generated by RepoPilot · 2026-06-09 · Source
🎯Verdict
GO — Healthy across the board
- Last commit today
- 16 active contributors
- Distributed ownership (top contributor 27% of recent commits)
- MIT licensed
- CI configured
- Tests present
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests + OpenSSF Scorecard</sub>
⚡TL;DR
Official Sentry SDKs for JavaScript—a monorepo providing error tracking, performance monitoring, and session replay for browser, Node.js, and framework-specific JavaScript environments. It captures exceptions, transactions, and user sessions in real-time and sends them to Sentry's backend for aggregation and alerting. Monorepo structure: platform-specific SDKs live in packages/ (browser, node, angular, astro, react, vue, svelte, etc.), all building on a shared @sentry/core foundation. Integration tests in packages/integration-tests with browser-based suites and loader-suites. Automation skills in .agents/skills/ for release, issue triage, and CDN bundle management. The skill-creator framework allows AI-assisted agent creation for SDK maintenance tasks.
👥Who it's for
JavaScript developers building web applications (React, Vue, Angular, Svelte, Astro) and Node.js backends who need production error monitoring, performance tracing, and user session replay without building custom instrumentation. Also for Sentry's own SDK maintenance and extension teams.
🌱Maturity & risk
Highly mature and production-ready. The codebase shows 16.9M lines of TypeScript, multiple CI workflows (Build & Test badges active), published npm packages under the @sentry namespace, and active development indicated by the monorepo structure with multiple platform-specific packages. This is Sentry's official offering, actively maintained and widely deployed.
Low risk for core functionality—it's widely used in production with strong CI/test infrastructure visible. However, the monorepo complexity with many interdependent packages (@sentry/browser, @sentry/node, @sentry/core, etc.) creates integration risk; breaking changes in core can cascade. The file structure hints at experimental AI-driven automation (.agents/skills/) which is not yet production-critical but adds maintenance surface area.
Active areas of work
Active development across multiple domains: integrations with AI/LLM platforms (.agents/skills/add-ai-integration/), CDN bundle management improvements, size-limit enforcement, automated issue triage and security vulnerability fixes. The e2e test infrastructure and skill-creator framework suggest investment in automation and test coverage expansion.
🚀Get running
git clone https://github.com/getsentry/sentry-javascript.git && cd sentry-javascript && yarn install && yarn clean && yarn test
Daily commands: yarn test (runs Playwright tests in chromium); yarn test:all (all browsers); yarn test:bundle (specific bundle variant); yarn lint (oxlint type-aware checks); yarn type-check (tsc). Dev server setup depends on the specific package (see individual package READMEs under packages/).
🗺️Map of the codebase
.github/workflows/build.yml— Primary CI/CD pipeline that tests, builds, and publishes SDKs; essential for understanding the release and validation process.craft.yml— Craft configuration for release automation and versioning; critical for understanding how versions and releases are managed.github/CODEOWNERS— Defines code ownership and review responsibilities; every contributor must understand who reviews which areas.claude/settings.json— Claude/AI configuration for the repo; documents automated development guidelines and standards.editorconfig— Editor configuration enforcing consistent code style across all contributors and tooling.github/dependabot.yml— Automated dependency update configuration; critical for understanding security and maintenance workflows.cursor/BUGBOT.md— Cursor AI integration guidelines for bug fixing; establishes patterns for automated and assisted development
🛠️How to make changes
Add a New Integration or Feature
- Create a feature request issue using the standard template to gather requirements (
.github/ISSUE_TEMPLATE/feature.yml) - Check CODEOWNERS to identify relevant maintainers for the feature area (
.github/CODEOWNERS) - If using Cursor IDE, reference BUGBOT automation guidelines for code generation patterns (
.cursor/BUGBOT.md) - Submit PR following the template and ensure it passes build and lint workflows (
.github/PULL_REQUEST_TEMPLATE.md)
Set Up Development Environment
- Install Node.js >=18 as specified in the package.json engines requirement (
package.json) - Apply editor configuration for consistent code style (
.editorconfig) - Review code ownership and related contribution patterns (
.github/CODEOWNERS) - Configure Cursor IDE if using AI-assisted development (
.cursor/BUGBOT.md)
Create an Agent Skill for Automation
- Study existing skill patterns in the skills directory (
.agents/skills/skill-creator/SKILL.md) - Use the skill-creator tool to generate the SKILL.md manifest and script templates (
.agents/skills/skill-creator/scripts/package_skill.py) - Validate the skill using the skill-scanner for security and quality (
.agents/skills/skill-scanner/SKILL.md) - Test the skill using the evaluation framework (
.agents/skills/skill-creator/scripts/run_eval.py)
Report a Bug or Security Issue
- Use the bug report template with clear reproduction steps (
.github/ISSUE_TEMPLATE/bug.yml) - For security vulnerabilities, follow responsible disclosure in the flaky/internal issue templates (
.github/ISSUE_TEMPLATE/internal.yml) - Optionally trigger the auto-fix-issue workflow to attempt automated remediation (
.github/workflows/auto-fix-issue.yml) - Monitor triage-issue agent for automated analysis and suggested fixes (
.agents/skills/triage-issue/SKILL.md)
🔧Why these technologies
- Monorepo (Nx inferred from file structure) — Multiple Sentry SDK packages (@sentry/core, @sentry/browser, etc.) require unified build, test, and versioning across packages
- GitHub Actions Workflows — Native CI/CD integration for automated testing, linting, security scanning (CodeQL), and release management
- Craft Release Tool (.craft.yml) — Centralized, version-controlled configuration for consistent release automation, changelog generation, and NPM publishing
- Development Agents & Skills (.agents directory) — Enable AI-assisted automation for bug fixes, test generation, issue triage, and release orchestration without manual intervention
- Playwright for E2E Testing — Cross-browser JavaScript SDK testing required; Playwright provides reliable automation for browser-based integration tests
- CodeQL Security Scanning — Proactive detection of security vulnerabilities critical for a widely-used security SDK distributed to millions of developers
⚖️Trade-offs already made
-
Automated AI agents for bug fixing and issue triage
- Why: Reduces review latency and automates repetitive tasks (triage, PR analysis, code generation)
- Consequence: Requires careful skill validation and human oversight; potential for false positives or invalid suggestions if agents are misconfigured
-
Monorepo with unified versioning
- Why: Simplifies cross-package dependency management and ensures SDKs stay in sync
- Consequence: Single version bump affects all packages; requires careful coordination for package-specific releases
-
Craft for release automation
- Why: Eliminates manual changelog/tagging/publishing steps and ensures consistent process across releases
- Consequence: Requires strict adherence to commit message conventions and workflow discipline; failures in craft automation can block releases
-
Browser integration tests over unit tests alone
- Why: JavaScript SDKs must work in real browsers with actual DOM, network, and event APIs
- Consequence: Tests are slower and more flaky than unit tests; Playwright browser installation adds CI overhead
🚫Non-goals (don't propose these)
- Does not handle user authentication or identity management
- Does not provide a backend server or persistence layer; SDKs are client-only libraries
- Does not manage deployment infrastructure or hosting (SDKs are distributed via NPM)
- Does not provide a UI/dashboard (Sentry.io handles dashboarding; SDKs only capture and send events)
🪤Traps & gotchas
- Browser integration tests require Playwright to be installed (postinstall hook runs 'playwright install --with-deps'—can be skipped with SKIP_PLAYWRIGHT_BROWSER_INSTALL env var). 2) oxlint type-aware linting requires the full TypeScript project to be type-checked first; environment variable OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true suppresses strict TS checks for linting. 3) Bundle variants (test:bundle, test:bundle:replay, etc.) use PW_BUNDLE env var to select compiled output—missing bundles will cause test failures. 4) monorepo uses yarn workspaces; npm will not work correctly. 5) Node engine requirement is >=18; older Node versions will fail silently.
🏗️Architecture
💡Concepts to learn
- Event Envelope Protocol — Core transport format used by all Sentry SDKs to batch events, attachments, and metadata for efficient transmission to Sentry backend—understanding this is essential for any SDK modification
- Integration System (Plugin Architecture) — SDKs use a pluggable integration system to hook into runtime events (errors, transactions, replays)—critical for adding new data sources or custom instrumentation
- Distributed Tracing & Span Context — Performance monitoring in Sentry relies on W3C Trace Context propagation across requests and services—essential for understanding cross-service tracing features
- Session Replay Recording — Sentry captures DOM mutations and event streams to reproduce user sessions—replay-core package uses efficient incremental snapshots to minimize bandwidth
- Monorepo Workspace Dependencies — Multiple interdependent packages (@sentry/core is used by all others) require careful version management and testing—yarn workspaces orchestrates this
- Dynamic Feature Detection & Polyfilling — Browser SDK must work across old/new browsers with varying APIs—requires feature detection and graceful degradation strategies
- Browserlist & Build Targets — SDKs produce multiple bundle variants (.bundle, .bundle_min, .bundle_replay) targeting different feature sets and platforms—understanding build targets prevents shipping incompatible code
🔗Related repos
getsentry/sentry— Backend/API server that receives and processes events sent by this SDK—essential for understanding the event envelope protocol and data flowgetsentry/sentry-cli— Command-line companion tool used with Sentry SDKs for source map uploads, releases, and project managementgetsentry/develop— Sentry's documentation and development environment repo—contains contributor guides and architecture docs for the Sentry ecosystemrollup/rollup— Module bundler used by Sentry JavaScript SDKs to produce optimized bundles for browsers and Node.js targetsmicrosoft/TypeScript— Primary language for this codebase; understanding TS compilation and type system is essential for contributing
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add comprehensive test coverage for .agents/skills integration framework
The .agents/skills directory contains multiple AI agent skills (add-ai-integration, fix-issue, triage-issue, etc.) but there are no visible test files in the file structure. These skills are critical for automating development tasks and lack validation tests. Adding a test suite would ensure skills execute correctly, handle edge cases, and maintain compatibility as the codebase evolves.
- [ ] Create .agents/skills/tests directory with Jest/Vitest configuration
- [ ] Add unit tests for .agents/skills/fix-issue/SKILL.md workflow validation
- [ ] Add integration tests for .agents/skills/triage-issue scripts (parse_gh_issues.py, detect_prompt_injection.py)
- [ ] Add tests for .agents/skills/skill-creator evaluation pipeline (run_eval.py, aggregate_benchmark.py)
- [ ] Add tests validating SKILL.md schema compliance for all skills using .agents/skills/skill-creator/references/schemas.md
- [ ] Integrate skill tests into CI pipeline via GitHub Actions
Document and test AI agent skill security scanner validation rules
The .agents/skills/skill-scanner contains security patterns (dangerous-code-patterns.md, prompt-injection-patterns.md, permission-analysis.md) but there are no visible test cases validating that the scanner correctly identifies these patterns. This is critical for preventing malicious or unsafe skills from being deployed.
- [ ] Review .agents/skills/skill-scanner/references/ pattern definitions and document each pattern type
- [ ] Create .agents/skills/skill-scanner/tests/ directory
- [ ] Add test fixtures in tests/fixtures/ with dangerous-code examples that should be flagged
- [ ] Add test cases validating dangerous-code-patterns.md detection (e.g., file system access, eval usage)
- [ ] Add test cases validating prompt-injection-patterns.md detection (e.g., SQL injection, command injection patterns)
- [ ] Add test cases for permission-analysis.md validation (e.g., required API permissions)
- [ ] Document expected behavior for scan_skill.py with examples
Add E2E test coverage for browser integration bundle variants
The package.json shows 15+ different bundle test commands (test:bundle, test:bundle:replay, test:bundle:tracing, etc.) but these appear to be manually triggered. The .agents/skills/e2e/SKILL.md hints at E2E automation. Creating structured tests with clear pass/fail criteria would ensure all bundle variants (standard, replay, tracing, logs_metrics, and their minified versions) are regression-tested automatically.
- [ ] Review .agents/skills/e2e/SKILL.md to understand existing E2E patterns
- [ ] Create suites/tests/bundle-variants.test.ts documenting expected behavior for each bundle type
- [ ] Add parameterized Playwright tests in playwright.browser.config.ts for each PW_BUNDLE variant
- [ ] Add validation tests for bundle size compliance (leverage .agents/skills/bump-size-limit/SKILL.md)
- [ ] Document which bundle variants are required for different integration scenarios
- [ ] Add GitHub Action workflow to run E2E tests on all bundle variants on PR/push (reference .agents/skills/release/SKILL.md for release patterns)
🌿Good first issues
- Add TypeScript type definitions and JSDoc comments for @sentry/core event envelope protocol (packages/core/src/envelope.ts and related)—currently lacks comprehensive inline documentation that would help new contributors understand the event shape. 2) Expand browser integration test coverage for replay—the test:bundle:replay and related variants exist but SKILL.md in .agents/skills/e2e/ suggests ongoing work to systematize test suites; write a new Playwright test in packages/integration-tests/suites/ for replay under specific network conditions. 3) Create a 'getting-started-local-dev' guide in CONTRIBUTING.md—the repo has complex monorepo setup with .agents/skills automation but no concrete walkthrough of how to modify and test a single package locally.
⭐Top contributors
Click to expand
Top contributors
- @nicohrubec — 27 commits
- @mydea — 22 commits
- @chargome — 9 commits
- @andreiborza — 8 commits
- @dependabot[bot] — 7 commits
📝Recent commits
Click to expand
Recent commits
d75440c— ref(node): Vendor@opentelemetry/sql-common(#21140) (nicohrubec)ba8dd0c— test(node-core): Fix flaky cron instrumentation test (#21092) (github-actions[bot])170161b— ref(node): Vendor@fastify/otel(#21099) (nicohrubec)683bee2— ref(node): Remove unused@opentelemetry/instrumentation-httpdependency (#21113) (nicohrubec)2516805— ref(node): Vendor@opentelemetry/instrumentation-pg(#21102) (nicohrubec)a6947bf— chore: Add external contributor to CHANGELOG.md (#21121) (javascript-sdk-gitflow[bot])a1cca64— fix(node): Preserve CallbackManager handlers in LangChain instrumentation (#20849) (mdnanocom)88f871c— ci: Verify yarn.lock stability via git diff (#21115) (mydea)7aef0f7— feat(deps): Bump @tootallnate/once from 1.1.2 to 2.0.1 (#21108) (dependabot[bot])f93b288— chore(deps-dev): Bump @sveltejs/kit from 2.52.2 to 2.60.1 in /dev-packages/e2e-tests/test-applications/sveltekit-2 (#211 (dependabot[bot])
🔒Security observations
The codebase shows moderate security posture. Key concerns include suppression of TypeScript diagnostics in the linting pipeline (which could mask type-safety issues), reliance on shell conditionals for build logic (potential injection vector), and environment variable-driven test configurations. No hardcoded secrets, exposed credentials, or critical misconfigurations were detected in the provided file structure and package.json. The project follows standard npm practices with private packages and appropriate engine requirements. Recommendation: Enforce stricter lint diagnostics, migrate shell logic to Node.js, and validate all environment-driven configurations.
- Medium · Suppression of TypeScript Diagnostics in Linting —
package.json - lint and lint:fix scripts. The linting script sets 'OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true' which bypasses important TypeScript diagnostics during static analysis. This could allow type-related security issues to slip through quality gates. Fix: Remove the environment variable suppression or only use it for specific files that require exceptions. Ensure all TypeScript diagnostics are properly evaluated. - Medium · Conditional Browser Installation with Bash Logic —
package.json - install-browsers and postinstall scripts. The postinstall script uses shell globbing and conditional logic ('install-browsers' script with '[[ -z ... ]]') which could be vulnerable to shell injection if environment variables are user-controlled. The script relies on SKIP_PLAYWRIGHT_BROWSER_INSTALL variable. Fix: Use a dedicated Node.js script instead of shell conditionals. Validate and sanitize any environment variables used in build processes. - Low · Multiple Test Variants with Environment Variables —
package.json - test:bundle* scripts. Multiple test scripts use PW_BUNDLE environment variable to control which bundle is tested. While this provides flexibility, it could be prone to misconfiguration if not properly validated in the test runner. Fix: Implement validation in the test configuration file (playwright.browser.config.ts) to whitelist acceptable PW_BUNDLE values and reject invalid inputs.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Read in the suggested order before editing unfamiliar code. The reading-order list is computed from the actual import graph, not LLM guesses; reading bottom-up materially reduces wrong-edit risk.
- Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific
path/to/file.ext:Lstart-Lendyou're reasoning about, the same way RepoPilot's own RAG cites code in https://repopilot.app/r/getsentry/sentry-javascript.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live getsentry/sentry-javascript
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/getsentry/sentry-javascript.
What it runs against: a local clone of getsentry/sentry-javascript — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in getsentry/sentry-javascript | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch develop exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 30 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of getsentry/sentry-javascript. If you don't
# have one yet, run these first:
#
# git clone https://github.com/getsentry/sentry-javascript.git
# cd sentry-javascript
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of getsentry/sentry-javascript and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "getsentry/sentry-javascript(\\.git)?\\b" \\
&& ok "origin remote is getsentry/sentry-javascript" \\
|| miss "origin remote is not getsentry/sentry-javascript (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify develop >/dev/null 2>&1 \\
&& ok "default branch develop exists" \\
|| miss "default branch develop no longer exists"
# 4. Critical files exist
test -f ".github/workflows/build.yml" \\
&& ok ".github/workflows/build.yml" \\
|| miss "missing critical file: .github/workflows/build.yml"
test -f ".craft.yml" \\
&& ok ".craft.yml" \\
|| miss "missing critical file: .craft.yml"
test -f ".github/CODEOWNERS" \\
&& ok ".github/CODEOWNERS" \\
|| miss "missing critical file: .github/CODEOWNERS"
test -f ".claude/settings.json" \\
&& ok ".claude/settings.json" \\
|| miss "missing critical file: .claude/settings.json"
test -f ".editorconfig" \\
&& ok ".editorconfig" \\
|| miss "missing critical file: .editorconfig"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 30 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~0d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/getsentry/sentry-javascript"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
📚Suggested reading order
Computed from the actual import graph (no LLM). Read in this order to learn the codebase from the foundation up — each step builds on the previous ones.
dev-packages/browser-integration-tests/playwright.config.ts— Foundation: doesn't import anything internally and is imported by 2 other files. Read first to learn the vocabulary.dev-packages/browser-integration-tests/playwright.browser.config.ts— Built on the foundation; imported by 0 downstream files.dev-packages/browser-integration-tests/playwright.loader.config.ts— Built on the foundation; imported by 0 downstream files.
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.
Embed this chat in your README →
Drop this iframe anywhere — the widget runs against the same live analysis cache as the main app.
<iframe src="https://repopilot.app/embed/getsentry/sentry-javascript" width="100%" height="500" style="border:1px solid #d0d7de; border-radius:8px;" allow="microphone" loading="lazy" ></iframe>