fix: correct factual inaccuracies across 9 skills based on Sentry docs audit

Cross-referenced all skills against official Sentry documentation and fixed:

- sentry-react-setup: duplicate integrations key (runtime bug), wrong file path,
  missing router v4 integration, misleading env var prefix
- sentry-setup-tracing: wrong Ruby span API, outdated sampler patterns,
  Next.js oversimplification, non-standard op value
- sentry-setup-logging: wrong Ruby patch operator, incorrect Python log level
  examples, flagged unverifiable Winston integration
- sentry-setup-ai-monitoring: 6 wrong JS min SDK versions (all 10.28.0),
  wrong Python install commands (no extras needed), wrong Vercel AI platform
  scope, LangChain incorrectly marked explicit
- sentry-python-setup: defaults None not 0/False, environment default is
  production, separated SDK vs CLI env vars
- sentry-ruby-setup: defaults nil not 0, added Vernier profiler option,
  added missing redis_logger
- sentry-ios-swift-setup: iOS min 11.0 not 13.0, SPM version 9.5.0 not 9.0.0,
  CocoaPods syntax, removed undocumented SentrySDK.crash(), replay min SDK
  8.31.1, fixed auto-instrumentation list, fastlane install command
- sentry-react-native-setup: .env.local -> env.local (no leading dot)
- sentry-create-alert: removed fabricated Critical=100 priority, fixed Slack
  and PagerDuty field names, added issue_resolved_trigger, added PUT endpoint
This commit is contained in:
Cody De Arkland
2026-02-20 22:08:29 -08:00
parent 2b39e26a70
commit 0b9ba0d1e6
9 changed files with 96 additions and 76 deletions
+9 -5
View File
@@ -73,6 +73,7 @@ Pick which issue events fire the workflow. Use `logicType: "any-short"` (trigger
| `first_seen_event` | New issue created |
| `regression_event` | Resolved issue recurs |
| `reappeared_event` | Archived issue reappears |
| `issue_resolved_trigger` | Issue is resolved |
### Filter Conditions
@@ -80,14 +81,14 @@ Conditions that must pass before actions execute. Use `logicType: "all"`, `"any-
| Type | comparison | Description |
|------|-----------|-------------|
| `issue_priority_greater_or_equal` | `25` / `50` / `75` / `100` | Priority >= Low/Medium/High/Critical |
| `issue_priority_greater_or_equal` | `25` / `50` / `75` | Priority >= Low/Medium/High |
| `issue_priority_deescalating` | `true` | Priority dropped below peak |
| `event_frequency_count` | `<number>` | Event count exceeds threshold |
| `event_unique_user_frequency_count` | `<number>` | Affected users exceed threshold |
| `tagged_event` | `"key:value"` | Event has specific tag |
| `assigned_to` | `"<user_or_team_id>"` | Issue assigned to target |
Priority scale: Low=25, Medium=50, High=75, Critical=100.
Priority scale: Low=25, Medium=50, High=75.
Set `conditionResult` to `false` to invert (fire when condition is NOT met).
@@ -95,9 +96,9 @@ Set `conditionResult` to `false` to invert (fire when condition is NOT met).
| Type | Key Config |
|------|-----------|
| `email` | `targetType`: `"user"` / `"team"` / `"issue_owners"`, `targetIdentifier`: `<id>` |
| `slack` | `integrationId`: `<id>`, `channel`: `"#name"`, `channel_id`: `<id>` |
| `pagerduty` | `integrationId`: `<id>`, `service`: `<id>`, `severity`: `"critical"` |
| `email` | `config.targetType`: `"user"` / `"team"` / `"issue_owners"`, `config.targetIdentifier`: `<id>` |
| `slack` | `integrationId`: `<id>`, `config.targetDisplay`: `"#channel-name"`, `config.targetIdentifier`: `<channel_id>` |
| `pagerduty` | `integrationId`: `<id>`, `config.targetDisplay`: `<service_name>`, `config.targetIdentifier`: `<service_id>`, `data.priority`: `"critical"` |
### Full Payload Structure
@@ -169,6 +170,9 @@ curl -s "$API/workflows/" -H "$AUTH"
# Get one workflow
curl -s "$API/workflows/{id}/" -H "$AUTH"
# Update a workflow
curl -s -X PUT "$API/workflows/{id}/" -H "$AUTH" -H "Content-Type: application/json" -d '{payload}'
# Delete a workflow
curl -s -X DELETE "$API/workflows/{id}/" -H "$AUTH"
# Expect 204
+18 -19
View File
@@ -15,23 +15,21 @@ Install and configure Sentry in iOS projects using Swift and SwiftUI.
## Requirements
- iOS 13.0+
- Xcode 15.0+
- Swift 5.0+
- iOS 11.0+
## Install
### Swift Package Manager (Recommended)
1. File > Add Package Dependencies
2. Enter: `https://github.com/getsentry/sentry-cocoa`
3. Select version rule: "Up to Next Major" from `9.0.0`
2. Enter: `https://github.com/getsentry/sentry-cocoa.git`
3. Select version rule: "Up to Next Major" from `9.5.0`
### CocoaPods
```ruby
# Podfile
pod 'Sentry', '~> 9.0'
pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '9.5.0'
```
Then run `pod install`.
@@ -118,10 +116,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|---------|-----------------|
| App Launches | Cold/warm start times |
| Network | URLSession requests |
| UI | Screen loads, transitions |
| UI | UIViewController loads, user interactions |
| File I/O | Read/write operations |
| Core Data | Fetch/save operations |
| App Hangs | Main thread blocking |
| Frames | Slow and frozen frame detection |
## Logging
@@ -167,8 +165,12 @@ SentrySDK.setUser(nil)
// Test error capture
SentrySDK.capture(message: "Test from iOS")
// Test crash (dev only)
SentrySDK.crash()
// Or trigger a test error
do {
try someFailingFunction()
} catch {
SentrySDK.capture(error: error)
}
```
## Production Settings
@@ -190,13 +192,10 @@ Track app bundle size with Sentry using the Fastlane plugin.
### Install Plugin
```ruby
# fastlane/Pluginfile
gem 'fastlane-plugin-sentry'
```bash
bundle exec fastlane add_plugin fastlane-plugin-sentry
```
Then run `bundle install`.
### Configure Authentication
```bash
@@ -235,7 +234,7 @@ end
bundle exec fastlane sentry_size
```
View results in Sentry: **Settings > Size Analysis**
View results in the Sentry UI after the upload completes.
## Troubleshooting
@@ -243,7 +242,7 @@ View results in Sentry: **Settings > Size Analysis**
|-------|----------|
| Events not appearing | Check DSN, enable `debug = true` |
| No traces | Set `tracesSampleRate` > 0 |
| No replays | Set `sessionSampleRate` > 0, check SDK 8.0+ |
| No logs | Set `enableLogs = true`, check SDK 8.55+ |
| CocoaPods fails | Run `pod repo update`, check iOS 13+ target |
| No replays | Set `sessionSampleRate` > 0, check SDK 8.31.1+ |
| No logs | Set `enableLogs = true`, check SDK 8.55.0+ |
| CocoaPods fails | Run `pod repo update`, check iOS 11+ target |
| Size upload fails | Check `SENTRY_AUTH_TOKEN`, verify org/project slugs |
+15 -6
View File
@@ -114,24 +114,33 @@ app = FastAPI()
| Option | Description | Default |
|--------|-------------|---------|
| `dsn` | Sentry DSN | Required |
| `send_default_pii` | Include user data | `False` |
| `traces_sample_rate` | % of transactions traced | `0` |
| `profile_session_sample_rate` | % of sessions profiled | `0` |
| `dsn` | Sentry DSN | `None` (SDK no-ops without it) |
| `send_default_pii` | Include user data | `None` |
| `traces_sample_rate` | % of transactions traced | `None` (tracing disabled) |
| `profile_session_sample_rate` | % of sessions profiled | `None` (profiling disabled) |
| `enable_logs` | Send logs to Sentry | `False` |
| `environment` | Environment name | Auto-detected |
| `environment` | Environment name | `production` (or `SENTRY_ENVIRONMENT` env var) |
| `release` | Release version | Auto-detected |
## Environment Variables
The SDK auto-reads these:
```bash
SENTRY_DSN=https://xxx@o123.ingest.sentry.io/456
SENTRY_ENVIRONMENT=production
SENTRY_RELEASE=1.0.0
```
For `sentry-cli` (source maps, releases), also set:
```bash
SENTRY_AUTH_TOKEN=sntrys_xxx
SENTRY_ORG=my-org
SENTRY_PROJECT=my-project
```
Or use in code:
Or pass DSN in code:
```python
import os
+2 -2
View File
@@ -29,7 +29,7 @@ npx @sentry/wizard@latest -i reactNative
| Android setup | Enables Gradle build step for source maps |
| iOS setup | Wraps Xcode build phase, adds debug symbol upload |
| Pod install | Runs `pod install` for iOS |
| Credentials | Stores in `ios/sentry.properties`, `android/sentry.properties`, `.env.local` |
| Credentials | Stores in `ios/sentry.properties`, `android/sentry.properties`, `env.local` |
| Init code | Configures Sentry in `App.tsx` or `_layout.tsx` |
## Manual Configuration
@@ -96,7 +96,7 @@ Works for both managed and bare Expo projects.
| `app.json` | Expo config (if Expo) |
| `ios/sentry.properties` | iOS build credentials |
| `android/sentry.properties` | Android build credentials |
| `.env.local` | Environment variables |
| `env.local` | Environment variables |
## Environment Variables
+14 -11
View File
@@ -21,7 +21,7 @@ npm install @sentry/react --save
## Configure
Create `src/instrument.js` (must be imported first in your app):
Create `instrument.js` in your project root (must be imported first in your app):
```javascript
import * as Sentry from "@sentry/react";
@@ -30,13 +30,13 @@ Sentry.init({
dsn: "YOUR_SENTRY_DSN",
sendDefaultPii: true,
// Tracing
integrations: [Sentry.browserTracingIntegration()],
// Tracing + Session Replay
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0,
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
// Session Replay
integrations: [Sentry.replayIntegration()],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
@@ -92,7 +92,8 @@ import * as Sentry from "@sentry/react";
|---------------|-------------|
| v7 (non-framework) | `Sentry.reactRouterV7BrowserTracingIntegration` |
| v6 | `Sentry.reactRouterV6BrowserTracingIntegration` |
| v4/v5 | `Sentry.reactRouterV5BrowserTracingIntegration` |
| v5 | `Sentry.reactRouterV5BrowserTracingIntegration` |
| v4 | `Sentry.reactRouterV4BrowserTracingIntegration` |
## Redux Integration (Optional)
@@ -118,12 +119,14 @@ npx @sentry/wizard@latest -i sourcemaps
## Environment Variables
```bash
REACT_APP_SENTRY_DSN=https://xxx@o123.ingest.sentry.io/456
SENTRY_AUTH_TOKEN=sntrys_xxx
SENTRY_ORG=my-org
SENTRY_PROJECT=my-project
SENTRY_DSN=https://xxx@o123.ingest.sentry.io/456
SENTRY_AUTH_TOKEN=sntrys_xxx # Used by sentry-cli / source maps, not the SDK
SENTRY_ORG=my-org # Used by sentry-cli, not the SDK
SENTRY_PROJECT=my-project # Used by sentry-cli, not the SDK
```
**Note:** The SDK reads `SENTRY_DSN` automatically. If using Create React App, prefix with `REACT_APP_`; for Vite, use `VITE_`. `SENTRY_AUTH_TOKEN`/`ORG`/`PROJECT` are used by `sentry-cli` for source map uploads, not by the browser SDK.
## Verification
Add test button to trigger error:
+7 -5
View File
@@ -24,8 +24,9 @@ Add to `Gemfile`:
```ruby
gem "sentry-ruby"
# For profiling, also add:
gem "stackprof"
# For profiling, add one of:
gem "stackprof" # SDK 5.9.0+ — works on all Ruby versions
# gem "vernier" # SDK 5.21.0+ — better profiles for multi-threaded servers (requires Ruby 3.2.1+)
```
Then run:
@@ -89,10 +90,10 @@ gem "sentry-resque" # If using Resque
| Option | Description | Default |
|--------|-------------|---------|
| `dsn` | Sentry DSN | Required |
| `dsn` | Sentry DSN | `nil` (SDK no-ops without it) |
| `send_default_pii` | Include user data | `false` |
| `traces_sample_rate` | % of transactions traced | `0` |
| `profiles_sample_rate` | % of traces profiled | `0` |
| `traces_sample_rate` | % of transactions traced | `nil` (tracing disabled) |
| `profiles_sample_rate` | % of traces profiled | `nil` (profiling disabled) |
| `enable_logs` | Send logs to Sentry | `false` |
| `environment` | Environment name | Auto-detected |
| `release` | Release version | Auto-detected |
@@ -103,6 +104,7 @@ gem "sentry-resque" # If using Resque
|--------|-------------|
| `:sentry_logger` | Sentry's own logger |
| `:http_logger` | HTTP request breadcrumbs |
| `:redis_logger` | Redis command breadcrumbs |
| `:active_support_logger` | Rails ActiveSupport (Rails only) |
## Environment Variables
+16 -14
View File
@@ -35,23 +35,25 @@ grep -E '(openai|anthropic|langchain|huggingface)' requirements.txt pyproject.to
| Package | Integration | Min Sentry SDK | Auto? |
|---------|-------------|----------------|-------|
| `openai` | `openAIIntegration()` | 10.2.0 | Yes |
| `@anthropic-ai/sdk` | `anthropicAIIntegration()` | 10.12.0 | Yes |
| `ai` (Vercel) | `vercelAIIntegration()` | 10.6.0 | Node only* |
| `@langchain/*` | `langChainIntegration()` | 10.22.0 | Yes |
| `@langchain/langgraph` | `langGraphIntegration()` | 10.25.0 | Yes |
| `@google/genai` | `googleGenAIIntegration()` | 10.14.0 | Yes |
| `openai` | `openAIIntegration()` | 10.28.0 | Yes |
| `@anthropic-ai/sdk` | `anthropicAIIntegration()` | 10.28.0 | Yes |
| `ai` (Vercel) | `vercelAIIntegration()` | 10.6.0 | Yes* |
| `@langchain/*` | `langChainIntegration()` | 10.28.0 | Yes |
| `@langchain/langgraph` | `langGraphIntegration()` | 10.28.0 | Yes |
| `@google/genai` | `googleGenAIIntegration()` | 10.28.0 | Yes |
*Vercel AI requires explicit setup for Edge runtime and `experimental_telemetry` per-call.
*Vercel AI: 10.6.0+ for Node.js, Cloudflare Workers, Vercel Edge Functions, Bun. 10.12.0+ for Deno. Requires `experimental_telemetry` per-call.
### Python
| Package | Install | Min SDK |
|---------|---------|---------|
| `openai` | `pip install "sentry-sdk[openai]"` | 2.41.0 |
| `anthropic` | `pip install "sentry-sdk[anthropic]"` | 2.x |
| `langchain` | `pip install "sentry-sdk[langchain]"` | 2.x |
| `huggingface_hub` | `pip install "sentry-sdk[huggingface_hub]"` | 2.x |
Integrations auto-enable when the AI package is installed — no extras needed:
| Package | Install | Auto? |
|---------|---------|-------|
| `openai` | `pip install sentry-sdk` | Yes |
| `anthropic` | `pip install sentry-sdk` | Yes |
| `langchain` | `pip install sentry-sdk` | Yes |
| `huggingface_hub` | `pip install sentry-sdk` | Yes |
## JavaScript Configuration
@@ -81,7 +83,7 @@ const openai = Sentry.instrumentOpenAiClient(new OpenAI());
// Use 'openai' client as normal
```
### LangChain / LangGraph (explicit)
### LangChain / LangGraph (auto-enabled)
```javascript
integrations: [
+4 -4
View File
@@ -57,7 +57,7 @@ Sentry.logger.info(Sentry.logger.fmt`User ${userId} purchased ${productName}`);
| Library | Integration | Min SDK |
|---------|-------------|---------|
| Pino | `Sentry.pinoIntegration()` | 10.18.0+ |
| Winston | `Sentry.createSentryWinstonTransport()` | 9.13.0+ |
| Winston | `Sentry.createSentryWinstonTransport()` | 9.13.0+ (undocumented) |
| Consola | `Sentry.createConsolaReporter()` | 10.12.0+ |
## Python Setup
@@ -78,7 +78,7 @@ sentry_sdk.init(
### 3. Stdlib logging capture (optional)
```python
from sentry_sdk.integrations.logging import LoggingIntegration
integrations=[LoggingIntegration(sentry_logs_level=logging.WARNING)]
integrations=[LoggingIntegration(sentry_logs_level=logging.INFO)]
```
### 4. Use structured logging
@@ -92,7 +92,7 @@ sentry_logger.error("Payment failed", order_id="456", amount=99.99)
### Loguru integration
```python
from sentry_sdk.integrations.loguru import LoguruIntegration
integrations=[LoguruIntegration(sentry_logs_level=LoggingLevels.WARNING.value)]
integrations=[LoguruIntegration(sentry_logs_level=LoggingLevels.INFO.value)]
```
## Ruby Setup
@@ -107,7 +107,7 @@ bundle show sentry-ruby
Sentry.init do |config|
config.dsn = "YOUR_DSN"
config.enable_logs = true
config.enabled_patches = [:logger] # Optional: capture stdlib Logger
config.enabled_patches << :logger # Optional: capture stdlib Logger
end
```
+11 -10
View File
@@ -18,10 +18,10 @@ Configure Sentry's performance monitoring to track transactions and spans.
| Platform | Enable | Custom Span |
|----------|--------|-------------|
| JS/Browser | `tracesSampleRate` + `browserTracingIntegration()` | `Sentry.startSpan()` |
| Next.js | `tracesSampleRate` (auto-integrated) | `Sentry.startSpan()` |
| Next.js | `tracesSampleRate` in each runtime config file | `Sentry.startSpan()` |
| Node.js | `tracesSampleRate` | `Sentry.startSpan()` |
| Python | `traces_sample_rate` | `@sentry_sdk.trace` or `start_span()` |
| Ruby | `traces_sample_rate` | `start_span()` |
| Ruby | `traces_sample_rate` | `Sentry.with_child_span()` |
## JavaScript Setup
@@ -54,11 +54,10 @@ await Sentry.startSpan({ name: "checkout", op: "transaction" }, async () => {
### Dynamic sampling
```javascript
tracesSampler: ({ name, parentSampled }) => {
tracesSampler: ({ name, inheritOrSampleWith }) => {
if (name.includes("healthcheck")) return 0;
if (name.includes("checkout")) return 1.0;
if (parentSampled !== undefined) return parentSampled;
return 0.1;
return inheritOrSampleWith(0.1); // Respects parent sampling decision, falls back to 0.1
},
```
@@ -87,10 +86,12 @@ with sentry_sdk.start_span(name="process-order", op="task") as span:
### Dynamic sampling
```python
def traces_sampler(ctx):
name = ctx.get("transaction_context", {}).get("name", "")
def traces_sampler(sampling_context):
name = sampling_context.get("transaction_context", {}).get("name", "")
parent_sampled = sampling_context.get("parent_sampled")
if "healthcheck" in name: return 0
if "checkout" in name: return 1.0
if parent_sampled is not None: return parent_sampled # Respect parent decision
return 0.1
sentry_sdk.init(dsn="YOUR_DSN", traces_sampler=traces_sampler)
@@ -113,7 +114,7 @@ end
| `http.server` | Incoming HTTP |
| `db` / `db.query` | Database |
| `cache` | Cache operations |
| `task` | Background jobs |
| `queue.task` | Background jobs |
| `function` | Function calls |
## Sampling Recommendations
@@ -132,9 +133,9 @@ Configure `tracePropagationTargets` to send trace headers to your APIs:
tracePropagationTargets: ["localhost", "https://api.yourapp.com"],
```
For Next.js 14+ App Router, add to root layout:
For Next.js 14 App Router, add to root layout (not needed in Next.js 15+):
```typescript
export async function generateMetadata() {
export function generateMetadata(): Metadata {
return { other: { ...Sentry.getTraceData() } };
}
```