mirror of
https://github.com/getsentry/sentry-for-ai.git
synced 2026-09-14 14:28:22 +08:00
docs/telemetry
25 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d65bd23b67 |
feat(dist): build and publish per-agent plugin distributions (#158)
This repository is the single source of truth for skills and routing metadata, but it is not itself an installable plugin, and each assistant (Claude Code, Cursor, Codex, Grok) expects the plugin in a different on-disk shape. No plugin ecosystem can consume a zip or release asset; all install from a git ref. So a GitHub Actions workflow builds each agent's distribution from this repository and deploys it to a dedicated repository whose root is exactly that agent's plugin, which a marketplace points at as getsentry/plugin-<agent>. Each agent has a `plugin-src/<agent>/` dir with its manifests, README, and a `build.sh` that assembles the dist tree from shared repo content. Claude, Cursor, and Grok consume the plugin at the repo root; Codex requires it under `plugins/sentry/` and rejects the `disable-model-invocation` field the skill tree relies on, so its build strips that field and emits a per-skill `agents/openai.yaml` (see `hide-skills.py`). MCP config is built from the repo's `mcp.json` source of truth: inline in Claude's manifest, and a file for the others. Cross-repo writes use a short-lived token from a dedicated GitHub App scoped to contents:write on the plugin repos; the default GITHUB_TOKEN cannot push to other repositories. The root `.claude-plugin/`, `.cursor-plugin/`, and `.mcp.json` are retained so existing installs that consumed the plugin from this repo's root keep working; their READMEs announce removal on or after 2026-07-11. |
||
|
|
9780bfc111 |
feat: Add Python span streaming migration skill (#156)
--------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
030b01fb76 |
feat(skills): Add span streaming migration skill for JavaScript (#130)
* add span streaming migration skill * platform agnostic * fix: Use RegExp instead of glob pattern in ignoreSpans example String matching in ignoreSpans uses substring includes, not glob patterns. The `*` was treated as a literal character. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feedback * Update skills/sentry-span-streaming/SKILL.md Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io> |
||
|
|
dcfc2650fa |
feat(skills): add sentry-instrumentation-guide (#157)
* feat(instrumentation-guide): add sentry-instrumentation-guide skill A decision-framework skill that helps an agent (or developer) choose which Sentry signal to reach for when instrumenting code — error, span, span attribute, log, or metric — and why the choice decides what's debuggable later. Distilled from the "Errors, Traces, Logs, Metrics: When to Reach for What" post. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(instrumentation-guide): add reference deep-dives choosing-signals.md: per-signal detail, the four overlap tiebreakers, the sampling-vs-filtering rationale, and the "wide events" argument. instrumentation-examples.md: one handler instrumented end to end in Python and JS/TS, showing span attribute vs log vs metric on the same decision. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(skills): register sentry-instrumentation-guide Add to the sentry-feature-setup router (decision bullet + table row), the AGENTS.md and README feature tables, and regenerate SKILL_TREE.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(instrumentation-guide): defer signatures to sibling SDK skills This skill decides WHAT signal to emit; the sentry-*-sdk skills own HOW (setup, API signatures, enabling flags, min versions) in their references/{tracing,logging,metrics}.md. Stop hardcoding docs.sentry.io deep links and a Node-specific link in the language-neutral examples/ sampling sections — point at the matching SDK skill by name instead, so there's one maintained source of truth and nothing to go stale. Kept: top-level product-area links (one per signal) for orientation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * instrumentation-guide: align signal naming with the blog post - Four-signals table and deep dive lead with Traces (spans named as the unit) - Gut-check "reach for" column shows Traces / Spans - Metrics question -> "How's this trending over time?" Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
6bc9ab38b5 |
feat(sdk-setup): add TanStack Start and React Router framework skills (#103)
* feat(sdk-setup): add TanStack Start and React Router Framework skills Add dedicated SDK setup bundles for TanStack Start React and React Router Framework mode so agents can apply package-correct integrations for each framework path. Update router discovery, indexes, and drift/reviewer mappings while clarifying that React Router v5/v6/v7 non-framework guidance remains in the React SDK skill. Made-with: Cursor * fix(skill-mappings): cover tanstack drift ownership and framework import path Add TanStack Start SDK entries to drift/reviewer mappings so automation continues to route changes to the JS SDK team. Align React Router framework fallback docs to import instrument.server.mjs explicitly, matching the configured instrumentation filename. Co-Authored-By: Codex 5.3 <codex@openai.com> Made-with: Cursor --------- Co-authored-by: Codex 5.3 <codex@openai.com> |
||
|
|
0939d09985 |
feat: add sentry-cloudflare-sdk skill bundle (#61)
* Initial plan * feat(cloudflare-sdk): add sentry-cloudflare-sdk main SKILL.md wizard and reference files Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Co-authored-by: HazAT <363802+HazAT@users.noreply.github.com> * feat(cloudflare-sdk): register in skill tree, update router and AGENTS.md Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Co-authored-by: HazAT <363802+HazAT@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HazAT <363802+HazAT@users.noreply.github.com> |
||
|
|
cf04823373 |
feat(elixir-sdk): add sentry-elixir-sdk skill bundle (#50)
* Initial plan * feat(elixir-sdk): add sentry-elixir-sdk skill bundle Add complete Sentry SDK skill for Elixir (sentry v12.0.2) covering: - Main SKILL.md wizard with 4-phase flow (detect, recommend, guide, cross-link) - Igniter installer as recommended Option 1 (interactive, like wizard pattern) - Manual setup with Phoenix/Plug/LiveView integration details - references/error-monitoring.md — capture_exception, Context API, before_send, filters - references/tracing.md — OpenTelemetry setup (SpanProcessor, Sampler, Propagator) - references/logging.md — LoggerHandler, LoggerBackend, Sentry Logs Protocol - references/crons.md — manual check-ins, Oban integration, Quantum integration - Register in sentry-sdk-setup router, AGENTS.md, build-skill-tree.sh keywords - Regenerate SKILL_TREE.md Co-Authored-By: Claude Sonnet 4.5 (Anthropic) Co-authored-by: HazAT <363802+HazAT@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HazAT <363802+HazAT@users.noreply.github.com> |
||
|
|
418d59de83 |
Revert "Add Cursor Cloud specific instructions to AGENTS.md (#35)" (#36)
This reverts commit
|
||
|
|
b34373d86f |
Add Cursor Cloud specific instructions to AGENTS.md (#35)
Co-Authored-By: Claude (claude-4.6-opus-high-thinking) Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
104e7644c4 |
feat(flutter-sdk): add sentry-flutter-sdk skill bundle (#33)
* 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. |
||
|
|
de3c63882b |
feat(browser-sdk): add sentry-browser-sdk skill for vanilla JS, Loader Script, and CDN (#25)
* feat(browser-sdk): add sentry-browser-sdk skill — vanilla JS, Loader Script, CDN
Adds the sentry-browser-sdk skill, a complete Sentry setup wizard for
browser JavaScript projects that don't use a framework-specific SDK.
## What's included
**SKILL.md (654 lines):**
- Phase 1: Framework detection FIRST — actively redirects React → sentry-react-sdk,
Next.js → sentry-nextjs-sdk, Vue/Angular/Svelte/Remix/Nuxt/Astro → their docs.
Only proceeds with @sentry/browser when no framework is detected.
- Three installation paths:
- Path A (npm): full setup with Sentry.init(), source maps via all four build
plugins (Vite, webpack, Rollup, esbuild) plus sentry-cli fallback
- Path B (Loader Script): for WordPress, Shopify, Squarespace, static HTML —
zero build tooling, lazy/eager modes, sentryOnLoad config, limitations
- Path C (CDN bundles): 7 named bundle variants with SRI integrity hashes for
manual script tag installs
- Phase 2: Feature recommendation matrix (Error Monitoring, Tracing, Replay,
User Feedback, Logging, Profiling) with npm-only callouts for Logging
- Phase 3: Reference dispatch table pointing to references/ subdirectory
- Configuration reference table (all Sentry.init() options)
- Verification section for all three paths
- Phase 4: Backend cross-link detection (Go, Python, Ruby, PHP, .NET, Node.js)
- Troubleshooting table (20+ issues with solutions)
**Router updates:**
- sentry-sdk-setup/SKILL.md: adds sentry-browser-sdk row and routing rule #9
(vanilla JS, jQuery, WordPress, static HTML → sentry-browser-sdk)
- AGENTS.md: adds sentry-browser-sdk to the SDK Skills table
- SKILL_TREE.md: regenerated via scripts/build-skill-tree.sh (0 errors)
Co-Authored-By: Claude Sonnet 4.6 (Anthropic)
* docs(sentry-browser-sdk): add error-monitoring, tracing, and session-replay reference files
Add three deep-dive reference documents to skills/sentry-browser-sdk/references/
covering the core feature pillars of the @sentry/browser SDK.
error-monitoring.md:
- Core capture APIs: captureException, captureMessage, captureEvent with full
parameter tables and real-world examples
- Three scope types (global / isolation / current) with usage guidance and
priority order
- Event enrichment: tags, context, user, extra, initialScope
- Breadcrumbs: automatic sources table, manual addBreadcrumb, beforeBreadcrumb
filtering with hint access
- Hooks: beforeSend, beforeSendTransaction with PII scrubbing and fingerprint
override examples
- Event processors vs. beforeSend comparison table
- Fingerprinting: extending vs. overriding default grouping, inline via
captureContext, fingerprint variable table
- Pattern-based filtering: ignoreErrors, allowUrls/denyUrls, sampleRate
- All 9 default integrations with config options
- Transport: offline IndexedDB queue, tunneling, custom transport
- 11-row troubleshooting table
tracing.md:
- Full browserTracingIntegration() options across five categories (page load,
HTTP, interaction, timeouts, propagation), each as a table
- Automatic instrumentation: pageloads, navigations, fetch/XHR, web vitals
(LCP, CLS, TTFB, INP), long tasks
- Custom span APIs: startSpan (auto-ending), startSpanManual, startInactiveSpan
with use-case guidance
- Span options table; operation types table; attribute and status APIs
- Distributed tracing: sentry-trace/baggage header propagation,
tracePropagationTargets rules, SSR meta tag continuation, non-HTTP channels
- Sampling: tracesSampleRate, tracesSampler with SamplingContext table,
precedence order, INP-specific sampling
- Custom router integration pattern using startBrowserTracingPageLoadSpan
- 10-row troubleshooting table
session-replay.md:
- replaysSessionSampleRate vs. replaysOnErrorSampleRate with sampling
workflow, data-sent matrix, and recommended rates by traffic volume
- Full replayIntegration() options across three sections (general, privacy,
network) with complete tables
- Privacy masking: three methods (mask/block/ignore), HTML attribute usage,
configuration examples, custom maskFn, beforeAddRecordingEvent filtering
- Network capture: opt-in body/header capture, truncation limit, deny/allow
URL rules
- Canvas recording: replayCanvasIntegration, manual snapshot mode for
WebGL/WebGPU, PII warning
- Lazy loading patterns for both npm (dynamic import) and CDN (lazyLoadIntegration)
- Session modes: session vs. buffer mode details, manual control API
(start/startBuffering/flush/stop/getReplayId)
- Deferred initialization, employee-only and URL-specific recording patterns
- Performance impact: mutation limits, self-hosted compression worker, CSP
requirements, bundler optimization
- 11-row troubleshooting table
All files use vanilla JS examples (no React, no JSX), include minimum SDK
version headers, and follow the same section structure and table formatting
used in skills/sentry-react-sdk/references/.
Co-Authored-By: Claude claude-sonnet-4-5 <noreply@anthropic.com>
* docs(browser-sdk): add profiling, logging, and user-feedback reference guides
Add three deep-dive reference files to skills/sentry-browser-sdk/references/:
**profiling.md**
- Prominently marks Beta status and Chromium-only limitation (Chrome/Edge;
Firefox and Safari are unsupported)
- Documents the mandatory Document-Policy: js-profiling header with
platform-specific examples for Vercel, Netlify, Express, and Nginx
- Covers profileSessionSampleRate (current, ≥10.27.0) vs the deprecated
profilesSampleRate, with a comparison table
- Explains manual vs trace profileLifecycle modes with code examples
- Production sampling strategy section and known limitations table
- 7-row troubleshooting table
**logging.md**
- Prominently marks npm-only limitation — NOT available via Loader Script or CDN
- Covers the full Sentry.logger.* API (trace/debug/info/warn/error/fatal)
with six-level table and attribute type constraints
- Documents logger.fmt parameterized template literals with attribute extraction
details and tagged-template gotcha warning
- consoleLoggingIntegration (≥10.13.0) for automatic console.* capture
- beforeSendLog filter hook with log object shape reference
- Scope-based automatic attributes (≥10.32.0) at global/isolation/current scopes
- Auto-generated attributes table including replay_id and trace linking
- Log-to-trace correlation example showing span ↔ log navigation in the UI
- When-to-use-each-API decision table and log level production guidance
- 10-row troubleshooting table
**user-feedback.md**
- Covers all three collection approaches: feedbackIntegration() widget,
captureFeedback() programmatic API, and showReportDialog() crash modal
- Full feedbackIntegration() option tables across appearance, form fields,
positioning, and behaviour categories
- Manual widget control (autoInject: false) with custom button example
- captureFeedback() with tags, attachments, and associatedEventId linking
- showReportDialog() with server-side event ID injection pattern for 500 pages
- Screenshot capture notes (≥8.0.0) and attachment quota callout
- Session Replay integration for replay-linked feedback (30-second buffer)
- Best practices covering proactive vs reactive collection
- 9-row troubleshooting table
Co-Authored-By: claude-sonnet-4-5 (Anthropic)
* fix(browser-sdk): correct Vue redirect and logging availability claims
Address review findings:
- P0: Fix copy-paste error in framework redirect table where Vue
incorrectly pointed to sentry-python-sdk instead of @sentry/vue.
Also remove duplicate nuxt entry from the vue row (nuxt already
has its own standalone row).
- P1: Reconcile logging availability — CDN bundles with .logs. in
their name (e.g. bundle.logs.metrics.min.js) DO support
Sentry.logger.*, so the blanket 'npm only' claim was inaccurate.
Updated to 'npm or CDN logs bundle; not Loader Script' across
SKILL.md and references/logging.md.
Co-Authored-By: Claude Sonnet 4 (Anthropic)
---------
Co-authored-by: Claude claude-sonnet-4-5 <noreply@anthropic.com>
|
||
|
|
a76958d8cd |
feat: add sentry-php-sdk skill (PHP, Laravel, Symfony) (#22)
* feat(php-sdk): add sentry-php-sdk main SKILL.md wizard Add the primary wizard skill for PHP SDK setup covering plain PHP, Laravel, and Symfony in a single skill following the one-skill-per-language pattern used by Python, Ruby, and .NET skills. The wizard follows the standard 4-phase structure: - Phase 1 (Detect): composer.json inspection, filesystem markers (artisan / bin/console), framework and queue detection - Phase 2 (Recommend): concrete proposal matrix for Error Monitoring, Tracing, Profiling, Logging, Metrics, and Crons - Phase 3 (Guide): framework-branched installation and initialization — plain PHP uses \Sentry\init(), Laravel uses artisan sentry:publish + Integration::handles(), Symfony uses YAML bundle config - Phase 4 (Cross-Link): detects companion frontend (React, Svelte, Vue) and suggests the matching frontend SDK skill Key design decisions: - No wizard CLI (php/laravel/symfony not supported by @sentry/wizard) - Laravel artisan sentry:publish --dsn= documented as the closest equivalent - Profiling clearly marked as requiring the excimer PECL extension (Linux/macOS only) - Metrics marked as beta using the TraceMetrics API - Framework-specific deep dives deferred to references/laravel.md and references/symfony.md Creates the references/ directory (populated in subsequent commits). Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * feat(php-sdk): add profiling, logging, metrics, and crons reference files Add four reference files to skills/sentry-php-sdk/references/ covering the full set of PHP SDK observability features: - profiling.md: Excimer extension prerequisites, version requirements per framework (PHP ≥3.15, Laravel ≥3.3, Symfony ≥4.7), profiles_sample_rate semantics (relative to traces_sample_rate), FastCGI latency mitigation, and Relay proxy setup - logging.md: Structured Sentry Logs feature (enable_logs: true), direct logger API (\Sentry\logger()), Monolog bridge, Laravel sentry_logs channel setup via .env and config/logging.php, Symfony LogsHandler + monolog.yaml wiring, before_send_log filtering (closure for PHP/Laravel, service ID for Symfony), auto-added attributes table, flush semantics per runtime context - metrics.md: TraceMetrics API (count/distribution/gauge), deprecation notice for old \Sentry\metrics() API, unit enum reference, ring buffer flush behavior (cap 1000), before_send_metric filtering, auto-added attributes, Symfony YAML configuration - crons.md: withMonitor() wrapper, manual captureCheckIn() pattern, heartbeat pattern, programmatic MonitorConfig upsert (crontab + interval schedules), Laravel sentryMonitor() macro with full parameter reference, Symfony direct SDK usage (no framework-specific integration), CheckInStatus/MonitorSchedule references, rate limits (6/min per monitor-environment), alerts setup All files follow the structure established by the sentry-python-sdk references. Co-Authored-By: Claude Sonnet 4.6 (Anthropic) * feat(php-sdk): add Laravel and Symfony framework reference deep-dives Adds two comprehensive framework-specific reference files for the sentry-php-sdk skill: - references/laravel.md (~496 lines): Full deep dive covering installation (Laravel 11+ vs 10 exception handler patterns), all config/sentry.php options including breadcrumb and tracing sub-arrays with ENV variable names, auto-instrumented operations table (11+ operations), filesystem disk opt-in instrumentation, auto-registered middleware, both log channel drivers (sentry vs sentry_logs), full queue distributed tracing with payload keys, sentryMonitor() macro with all parameters, Artisan commands, closures-and-config-cache gotcha with static callable workaround, Lumen support, Laravel Octane scope isolation warning, and Pennant feature flags integration. - references/symfony.md (~531 lines): Full deep dive covering Flex auto-registration vs manual bundle setup, complete sentry.yaml schema with all top-level/options/messenger/tracing sub-nodes, Symfony-specific defaults (kernel.environment, PrettyVersions release, in_app_exclude auto-includes), bundle-level options table, DIC callable pattern with full service factory example (critical Symfony gotcha — YAML can't hold closures), auto-instrumented operations table (Doctrine DBAL, Twig, Cache, HTTP Client), structured logs via LogsHandler Monolog service, traditional Monolog handler with buffer support, Messenger integration (error-capture only, no tracing spans), cron monitoring using base PHP SDK functions, console command tracing config, all auto-registered event listeners, and automatic distributed tracing header handling. These are loaded conditionally by the main SKILL.md when Laravel or Symfony is detected in the project's composer.json. Co-Authored-By: Claude claude.ai/code * docs(sentry-php-sdk): add error monitoring and tracing reference files Add two comprehensive reference documents for the PHP SDK skill: - references/error-monitoring.md — covers all capture APIs (captureException, captureMessage, captureEvent, captureLastError), Hub/Scope management (configureScope, withScope, withContext, push/pop), context enrichment (tags, UserDataBag, Breadcrumb TYPE_* and LEVEL_* constants, setContext), before_send and before_breadcrumb hooks with exact callback signatures, EventHint and ExceptionMechanism for handled/unhandled distinction, exception chaining, fingerprinting via Scope and before_send, and framework-specific integration notes for plain PHP, Laravel, and Symfony. Includes a 5-row troubleshooting table. - references/tracing.md — covers traces_sample_rate / traces_sampler config (including Symfony service-factory pattern for closures), the full custom span API (TransactionContext, SpanContext, startChild, Sentry\trace() helper, safe manual pattern), auto-instrumentation matrix for Laravel (15+ operations) and Symfony (12+ operations), distributed tracing with sentry-trace + baggage headers (Guzzle middleware, continueTrace(), queue worker pattern), HTML meta tag injection for frontend/backend stitching, profiling with Excimer extension, a span ops cheat-sheet table, and an 8-row troubleshooting table. Both files mirror the structure of the sentry-python-sdk reference files (config table → code examples → best practices / framework notes → troubleshooting). Co-Authored-By: claude-sonnet-4-5 <claude-sonnet-4-5@anthropic.com> * docs(php-sdk): register sentry-php-sdk in router, skill tree, and README Add sentry-php-sdk to all skill registry locations: - sentry-sdk-setup/SKILL.md: add PHP row to routing table and detection instruction for composer.json with laravel/framework or symfony/framework-bundle - SKILL_TREE.md: regenerated via build-skill-tree.sh with PHP entry - AGENTS.md: add sentry-php-sdk to SDK Skills table - README.md: add PHP (Laravel, Symfony) to SDK skills listing - Remove stale .gitkeep from references/ (replaced by actual reference files) Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * fix(php-sdk): address review findings — remove fabricated APIs, fix routing Three P1 bugs and five P2 issues resolved: P1 — Router step numbering: The PHP detection rule was numbered 6 but appeared before the fallback step 5, creating sequence 1,2,3,4,6,5. Corrected to 1,2,3,4,5,6 so LLMs process rules in the right priority order. P1 — Fabricated \Sentry\withContext() API: This function does not exist in sentry-php 4.x. Removed from the scope API table, code example, plain PHP notes, and Octane troubleshooting row. Replaced with the correct pushScope()/popScope() pattern throughout error-monitoring.md. P1 — continueTrace() return value discarded: The 'Extracting incoming trace context' example called continueTrace() without capturing its TransactionContext return value, then created a fresh context — meaning the transaction would never be linked to the upstream trace. Fixed to assign the return value and use it directly, matching the correct pattern already shown in the queue consumer example. P2 — error_types default inconsistent: error-monitoring.md said E_ALL; SKILL.md and the SDK research both say null/error_reporting(). Updated the reference to error_reporting() for consistency with the SDK source. P2 — Phantom 'never' value for max_request_body_size: Removed the undocumented 'never' option. Valid values are none/small/medium/always. P2 — Package name sentry/sentry-php vs sentry/sentry: All reference file headers used sentry/sentry-php (the GitHub repo name) instead of sentry/sentry (the Packagist package). Fixed across crons.md, error-monitoring.md, logging.md, metrics.md, profiling.md, and tracing.md. P2 — Tracing header mixed profiling version noise: Simplified the tracing.md header to just SDK minimums; profiling version details already live in profiling.md where they belong. Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * chore: remove review artifacts from tracked files --------- Co-authored-by: claude-sonnet-4-5 <claude-sonnet-4-5@anthropic.com> |
||
|
|
6c0592762d |
feat(node-sdk): add sentry-node-sdk skill for Node.js, Bun, and Deno (#24)
* feat(node-sdk): add sentry-node-sdk main SKILL.md wizard Introduces the sentry-node-sdk skill covering all three JS server-side runtimes in a single unified wizard: Node.js, Bun, and Deno. Key design decisions: - One skill for all three runtimes — Bun is a thin wrapper over @sentry/node (shares 99% of the API), and Deno shares the same core Sentry primitives, so a unified skill with runtime-specific sections is cleaner than three separate skills. - Node.js wizard path: 'npx @sentry/wizard@latest -i node' is offered as the recommended first option; manual setup covers CJS (require + first line) and ESM (--import ./instrument.mjs flag, Node 18.19.0+ required). - Bun: 'bun --preload ./instrument.ts' pattern; profiling explicitly marked as unsupported (native addon incompatible). - Deno: npm: specifier only (deno.land/x/sentry is deprecated); Deno 2.0+ required; --allow-net permissions documented; denoCronIntegration noted. - All six framework error handlers documented (Express, Fastify, Koa, Hapi, Connect, NestJS) with placement rules and async flag for Hapi. - Feature support matrix per runtime so agents don't suggest profiling on Bun/Deno. - Four-phase structure (Detect → Recommend → Guide → Cross-Link) consistent with every other SDK skill in the bundle. Also: - Registers sentry-node-sdk in the sentry-sdk-setup router table - Updates routing instructions (Next.js preference over node-sdk) - Regenerates SKILL_TREE.md via build-skill-tree.sh (0 errors) Co-Authored-By: Claude Sonnet 4.5 (Anthropic AI assistant) * feat(node-sdk): add error monitoring reference for sentry-node-sdk Adds a comprehensive ~1200-line error monitoring reference covering: - Instrument-first rule with CJS and ESM startup patterns - Auto-captured vs manual errors — the 'swallowed catch' gotcha - Framework error handler placement rules (critical: differs per framework) - Express: setupExpressErrorHandler AFTER routes - Fastify: setupFastifyErrorHandler BEFORE routes - Koa: setupKoaErrorHandler as FIRST middleware - Hapi: await setupHapiErrorHandler (async — must await!) - Connect: setupConnectErrorHandler BEFORE routes - NestJS: SentryGlobalFilter + SentryModule.forRoot() - Full captureException/captureMessage API with TypeScript signatures - Scope management (v8+ Hub removal): global, isolation, current scopes - withScope vs withIsolationScope — when to use each - Context enrichment: setTag, setContext, setUser, setExtra, addBreadcrumb - beforeSend, beforeBreadcrumb, ignoreErrors filtering - Fingerprinting: per-capture, withScope, beforeSend global rules - Event processors vs beforeSend (unlimited vs one-only) - requestDataIntegration PII opt-in (body/cookies/IP) - Error chains via linkedErrorsIntegration (Error.cause) - Lifecycle: flush/close before shutdown (critical for serverless) - Bun runtime: --preload pattern, profiling incompatibility - Deno runtime: npm: specifier, Deno 2+ requirements - Quick reference card Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * feat(node-sdk): add tracing reference for sentry-node-sdk Adds a comprehensive 816-line tracing reference covering: - OTel-native architecture in v8+: SentrySpanProcessor, SentryPropagator, SentrySampler, SentryContextManager and how they compose - Full auto-instrumentation table (28+ packages) across HTTP, databases (pg, mysql2, mongodb, redis, prisma, sequelize, typeorm, knex), message queues (kafkajs, amqplib, pubsub, SNS/SQS, bull, bullmq), GraphQL, and AI/LLM libraries (OpenAI, Anthropic, LangChain, Vercel AI, Google GenAI) - Custom span APIs: startSpan (auto-end), startSpanManual (manual end), startInactiveSpan (not active), withActiveSpan (temporarily activate) with real-world usage examples including middleware and parallel ops - Sampling: tracesSampleRate, tracesSampler with SamplingContext shape, inheritOrSampleWith() (v9+), and precedence rules - Distributed tracing: sentry-trace/baggage headers, tracePropagationTargets, continueTrace(), manual propagation over Kafka/AMQP/WebSocket - Advanced APIs: startNewTrace(), suppressTracing(), forceTransaction, onlyIfParent, ignoreSpans, beforeSendSpan, getActiveSpan, getRootSpan - Framework auto-instrumentation patterns for Express, Fastify, Koa, Hapi, and NestJS (with @SentryTraced decorator) - Runtime differences table: Node.js (full), Bun (via Node, no profiling), Deno (limited auto-instrumentation, manual HTTP wrapping required) - Troubleshooting table for 12 common issues Co-Authored-By: Claude claude.ai/code * docs(sentry-node-sdk): add profiling.md reference Add comprehensive profiling reference for the sentry-node-sdk skill covering the @sentry/profiling-node native addon and all its configuration options. Key points documented: - Node.js only: native C++ addon via V8 CpuProfiler; Bun and Deno are explicitly NOT supported (clearly called out at top and in platform table) - Installation with strict version-matching requirement - Trace mode (auto-attach to spans) vs manual mode (startProfiler/stopProfiler) - Continuous profiling for long-running processes and batch jobs - V2 chunk-based architecture: 60-second upload windows, no 30s cap - profileSessionSampleRate semantics (once per process startup, not per request) - Supported platforms table: macOS/Linux/Windows, x64/ARM64, Node 18-24 - Environment variables: SENTRY_PROFILER_BINARY_PATH, SENTRY_PROFILER_LOGGING_MODE - Production recommendations with performance impact notes - Alpine/Docker setup (musl libc variant, rebuild steps) - 10-entry troubleshooting table covering all common failure modes Follows the pattern established by skills/sentry-nextjs-sdk/references/profiling.md but scoped to Node.js only (no browser profiling section). Co-Authored-By: claude-sonnet-4-5 (Anthropic) * docs(sentry-node-sdk): add logging, metrics, and crons reference files Three new reference files for the sentry-node-sdk skill: - logging.md: Covers the GA Sentry.logger.* API (v9.41.0+), the fmt tagged template literal for parameterized messages, scope-based attributes (v10.32.0+), consoleLoggingIntegration, createConsolaReporter, the beforeSendLog hook, manual Winston/Pino bridge patterns (no official transports), trace linking, buffer flushing, and a troubleshooting table. - metrics.md: Covers the Open Beta Sentry.metrics.* API (v10.25.0+) with the three methods count/gauge/distribution (no increment or set in v10), unit strings, attribute cardinality guidance, scope-based attributes (v10.33.0+), beforeSendMetric hook, and flush semantics. - crons.md: Covers the GA crons API (v7.51.1+) including captureCheckIn, withMonitor, heartbeat vs start/finish patterns, MonitorConfig upsert, crontab and interval schedule types, official instrumentNodeCron / instrumentCron / instrumentNodeSchedule helpers, manual patterns for Agenda and BullMQ, serverless flush requirement, and rate limit details. Co-Authored-By: Claude Sonnet 4.5 (Anthropic) * docs: register sentry-node-sdk in AGENTS.md and README.md Add sentry-node-sdk to the SDK Skills table in both AGENTS.md and README.md. The skill was already registered in sentry-sdk-setup router and SKILL_TREE.md from prior work; this completes the documentation surface. Co-Authored-By: Claude Sonnet 4.6 (Anthropic) * fix(node-sdk): address review findings — handler placement, NestJS imports, troubleshooting P0: Fix Fastify error handler placement in SKILL.md (BEFORE routes, not after) P0: Fix Connect error handler placement in SKILL.md (BEFORE routes, not after) P1: Remove erroneous await on setupFastifyErrorHandler in tracing.md P1: Fix SentryGlobalFilter import path to @sentry/nestjs/setup in SKILL.md P1: Add missing Troubleshooting section to error-monitoring.md (11 entries) P2: Add Deno denoCronIntegration section to crons.md reference Co-Authored-By: Claude Sonnet 4 (Anthropic) * refactor(node-sdk): defer NestJS/Next.js to their dedicated skills Replace inline NestJS setup code in SKILL.md, error-monitoring.md, and tracing.md with cross-references to sentry-nestjs-sdk. NestJS uses a separate package (@sentry/nestjs) with NestJS-native decorators, filters, and GraphQL support — the dedicated skill covers it better. Update the SDK router to: - Add NestJS routing priority (rule 3: prefer sentry-nestjs-sdk) - Remove NestJS from sentry-node-sdk framework list - Clarify sentry-node-sdk is the fallback for generic Node/Bun/Deno Update Phase 4 cross-link table to prominently surface both sentry-nestjs-sdk and sentry-nextjs-sdk as preferred alternatives when those frameworks are detected. Co-Authored-By: Claude Sonnet 4 (Anthropic) * chore: remove review files Remove .pi/review.md and review.md that were accidentally included in the PR. |
||
|
|
153af59551 |
feat(android-sdk): register sentry-android-sdk in router, README, and AGENTS.md
Add sentry-android-sdk to all discovery surfaces so the new skill is reachable through every entry point: - skills/sentry-sdk-setup/SKILL.md: add Android row to the routing table (alphabetically between the implicit position before Cocoa) and a dedicated routing instruction — 'If Android (build.gradle with android plugin) is detected, use sentry-android-sdk' - README.md: add sentry-android-sdk to the SDK Setup Wizards table - AGENTS.md: add sentry-android-sdk to the SDK Skills table - SKILL_TREE.md: regenerated via scripts/build-skill-tree.sh — 20 skills scanned, 3 routers, 0 errors Co-Authored-By: Claude claude.ai/code |
||
|
|
a0087d0f80 |
docs(nestjs-sdk): register sentry-nestjs-sdk in README and AGENTS.md
Add the new NestJS SDK skill to both documentation files so it's discoverable alongside the existing SDK skills. Listed alphabetically between Go and Next.js with its key framework support noted: Express, Fastify, GraphQL, Microservices, and WebSocket. Co-Authored-By: Claude Sonnet 4 (Anthropic) |
||
|
|
15730bbd39 |
feat(skills): add sentry-sdk-upgrade skill for major version migrations (#20)
Add a new workflow skill that guides users through upgrading the Sentry JavaScript SDK across major versions (v7→v8, v8→v9, v9→v10). Uses a 4-phase wizard flow (Detect → Recommend → Guide → Cross-Link) with version-specific reference files distilled from official migration docs. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
a68d57cfa6 |
fix(scripts): harden build-skill-tree.sh for bash 3.2 on macOS
Use ${ARRAY[@]+"${ARRAY[@]}"} pattern for all array expansions that
could be empty (category arrays, errors array, function parameters).
Bash 3.2 with set -u treats "${EMPTY[@]}" as an unbound variable error,
while bash 4+ handles it gracefully. The +"..." syntax expands to nothing
when the array is unset/empty, avoiding the crash.
Also fix AGENTS.md claiming CI only runs on skills/** changes — the
validate-skill-tree job runs on all PRs (it's fast enough not to need
path filtering).
|
||
|
|
34c46870e2 |
docs(agents): add skill tree navigation governance section
Documents the router pattern that keeps agent startup metadata lean (~300 tokens vs ~1,600+ as the skill library grows). Covers: - How the three router skills (sentry-sdk-setup, sentry-workflow, sentry-feature-setup) gate access to hidden child skills via disable-model-invocation - Category taxonomy with responsible routers - Step-by-step checklist for adding a new skill (frontmatter fields, breadcrumb, router table update, build script) - Guidance on splitting categories once they exceed ~10 skills - Reference to scripts/build-skill-tree.sh for local validation and its --check flag used in CI This gives contributors (human and AI) a single authoritative source for skill tree conventions without needing to reverse-engineer the frontmatter or ask questions. Co-Authored-By: Claude Sonnet 4.6 (Anthropic) |
||
|
|
1eb0b63777 |
docs: update AGENTS.md, README, and add skill list script
Update documentation to reflect the full skill catalog ported from sentry-agent-skills. Skills are now organized into four categories: - SDK bundles (9): full platform setup wizards with reference docs - Setup skills (2): AI monitoring, OTel exporter - Workflow skills (4): code review, PR review, fix issues, create alerts - Authoring skills (1): SDK skill creator Also adds scripts/generate-skill-list.sh from sentry-agent-skills for generating skill lists from SKILL.md frontmatter. Co-Authored-By: Claude (Anthropic) |
||
|
|
71f0a99246 |
ref: Unify Claude Code and Cursor plugins into single repo (#10)
Merges `sentry-for-claude` and `sentry-for-cursor` into a single repo that serves both platforms. Both repos contained the same Sentry plugin (MCP server, skills, commands) packaged for different platforms — maintaining two repos meant duplicating every change. Skills and commands now live at the repo root where both Claude Code and Cursor auto-discover them. Each platform gets its own metadata directory (`.claude-plugin/`, `.cursor-plugin/`) with separate `plugin.json` and `marketplace.json` files — no symlinks between platform-specific configs. MCP configs are also separate files (`.mcp.json` for Claude Code, `mcp.json` for Cursor) since the platforms use different file conventions. `.agents/` is preserved as symlinks to `commands/` and `skills/` for backwards compatibility. Plugin manifests validated against the official schemas from [cursor/plugins](https://github.com/cursor/plugins/tree/main/schemas) and [anthropics/claude-code](https://github.com/anthropics/claude-code). After merge, rename repo from `sentry-for-claude` to `sentry-for-ai` and archive `sentry-for-cursor` with a redirect notice. --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
17d0614c55 |
Remove /getIssues command and issue-summarizer subagent
These capabilities are being rebuilt as part of the getsentry/sentry-mcp server. Also removes the now-redundant MCP-SETUP.md since MCP is auto-configured via .mcp.json and plugin.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
d307a565d3 |
Revert "Remove MCP-SETUP.md and AGENTS.md"
This reverts commit
|
||
|
|
b499cbaf9e | Remove MCP-SETUP.md and AGENTS.md | ||
|
|
f4a4c107bd |
Add iOS/Swift setup skill from sentry-agent-skills
Add sentry-ios-swift-setup skill for configuring Sentry in iOS/Swift apps including error monitoring, tracing, session replay, logging, and profiling. Update README and AGENTS.md with complete skills listing. Co-Authored-By: Claude (claude-opus-4-6) |
||
|
|
ffca0afe37 |
docs: Add AGENTS.md with agent instructions and CLAUDE.md symlink
Provide canonical agent-facing documentation referencing all skills, commands, and key conventions. CLAUDE.md symlinks to AGENTS.md for Claude Code compatibility. Co-Authored-By: Claude <noreply@anthropic.com> |