Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Griesser db4e150036 Merge remote-tracking branch 'origin/main' into feat/php-sdk-skill
# Conflicts:
#	README.md
#	SKILL_TREE.md
#	skills/sentry-sdk-setup/SKILL.md
2026-03-03 21:18:26 +01:00
Daniel Griesser 7b799ad453 Merge remote-tracking branch 'origin/main' into feat/php-sdk-skill
# Conflicts:
#	skills/sentry-sdk-setup/SKILL.md
2026-03-03 21:11:02 +01:00
Daniel Griesser 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.
2026-03-03 21:07:44 +01:00
Daniel Griesser 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
2026-03-03 21:05:02 +01:00
Daniel Griesser 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)
2026-03-03 18:49:32 +01:00
Daniel Griesser c2d4b902d8 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)
2026-03-03 17:39:43 +01:00
Daniel Griesser 48a09ce2b8 docs: rewrite README to lead with user value
Restructure the README around what users can actually do with the
plugin rather than listing technical components. Opens with the core
value prop — your AI assistant knows code, this teaches it Sentry — then
shows real examples for each use case before diving into skill tables.

Drops the plugin structure tree (internal detail) and streamlines
installation instructions. Adds a contributing section pointing to the
agent skills spec and the sdk-skill-creator skill.

Co-Authored-By: Claude (Anthropic)
2026-02-28 16:06:00 +01:00
Daniel Griesser 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)
2026-02-28 15:52:27 +01:00
David Cramer 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>
2026-02-26 13:33:34 -08:00
David Cramer 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>
2026-02-10 11:40:13 -08:00
Cody De Arkland d978716362 Clean up README to match current repo structure
Remove redundant sections (Usage Examples duplicated Features, Tips
repeated docs, Troubleshooting repeated install steps), fix stale
references to deleted MCP-SETUP.md, correct repo name in structure
tree, fix typo in sentry-code-review, and remove emojis.

Co-Authored-By: Claude (claude-opus-4-6)
2026-02-10 11:25:12 -08:00
Cody De Arkland 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)
2026-02-10 11:04:44 -08:00
Ivan Dlugos 9cd34ff314 Update installation instructions to use official Claude marketplace
Simplify the installation process by using the official Claude marketplace
instead of requiring users to manually add a custom marketplace first.
The new single-step `/install sentry` command makes it easier for users
to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:35:01 +01:00
Cody De Arkland 63b984d50c Removing spotlight for debugging 2025-11-13 00:46:39 -08:00
Cody De Arkland cc204958eb Updating readme for recent changes 2025-11-13 00:40:02 -08:00
Cody De Arkland d92fa58fca Initial commit: Sentry Claude Code Plugin
Add official Sentry integration plugin for Claude Code with:
- /seer command for natural language queries about Sentry environment
- /getIssues command for fetching recent issues by project
- issue-summarizer agent for parallel issue analysis
- sentry-pr-resolver skill for automated PR comment resolution
- Automatic MCP server configuration for Sentry API access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 01:49:14 -08:00