Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions skills/sentry-cocoa-sdk/references/session-replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
| `sessionReplay.errorReplayDuration` | `TimeInterval` | `30` | Seconds of buffer kept before an error |
| `sessionReplay.sessionSegmentDuration` | `TimeInterval` | `5` | Seconds per upload segment |
| `sessionReplay.maximumDuration` | `TimeInterval` | `3600` | Maximum session duration (60 min) |
| `experimental.enableSessionReplayInUnreliableEnvironment` | `Bool` | `false` | Force-enable on iOS 26+ (⚠️ PII risk) |

## Code Examples

Expand Down Expand Up @@ -164,15 +163,6 @@ Replay continues to work if:

**SDKs older than v8.57.0** do **not** include this safeguard and may crash or leak PII on iOS 26. Upgrade immediately.

**Force-enable on iOS 26+ (experimental — will be removed once masking is fixed):**

```swift
SentrySDK.start { options in
// ⚠️ WARNING: May leak PII. Only use if you understand the risk.
options.experimental.enableSessionReplayInUnreliableEnvironment = true
}
```

Track the fix at [getsentry/sentry-cocoa#6390](https://github.com/getsentry/sentry-cocoa/issues/6390).

---
Expand All @@ -193,7 +183,6 @@ Track the fix at [getsentry/sentry-cocoa#6390](https://github.com/getsentry/sent

## Best Practices

- Never enable `enableSessionReplayInUnreliableEnvironment` in production without understanding the PII risk
- Set `maskAllText = true` and `maskAllImages = true` (both default) — only unmasked explicitly what's safe to show
- Use `.sentryReplayUnmask()` sparingly on known-safe content rather than globally disabling masking
- Start with `onErrorSampleRate = 1.0` and `sessionSampleRate = 0` to capture replays only on errors (lowest overhead)
Expand All @@ -204,7 +193,7 @@ Track the fix at [getsentry/sentry-cocoa#6390](https://github.com/getsentry/sent
| Issue | Solution |
|-------|----------|
| No replays appearing | Verify `sessionSampleRate > 0` or `onErrorSampleRate > 0`; both default to `0` |
| Replay disabled on iOS 26 | Expected — SDK 8.57.0+ auto-disables for safety; use the experimental override at your own risk |
| Replay disabled on iOS 26 | Expected — SDK 8.57.0+ auto-disables for safety; set `UIDesignRequiresCompatibility = YES` in `Info.plist` to build with Xcode < 26 compatibility |
| PII visible in replay | Verify `maskAllText = true` and `maskAllImages = true`; check `.sentryReplayUnmask()` isn't applied too broadly |
| Scrolling jank during replay | Enable `enableFastViewRendering = true`; switch to `quality = .low`; consider disabling on low-end devices |
| Replay stops after 60 minutes | Expected — `maximumDuration = 3600` seconds is the default cap |
Expand Down
3 changes: 2 additions & 1 deletion skills/sentry-react-native-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ For each feature: `Read ${SKILL_ROOT}/references/<feature>.md`, follow steps exa
| `dsn` | `string` | — | **Required.** Project DSN; SDK disabled if empty. Env: `SENTRY_DSN` |
| `environment` | `string` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` |
| `release` | `string` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` |
| `dist` | `string` | — | Build number / variant identifier (max 64 chars) |
| `dist` | `string` | — | Build number / variant identifier (max 64 chars). Env: `SENTRY_DIST` |
| `sendDefaultPii` | `boolean` | `false` | Include PII: IP address, cookies, user data |
| `sampleRate` | `number` | `1.0` | Error event sampling (0.0–1.0) |
| `maxBreadcrumbs` | `number` | `100` | Max breadcrumbs per event |
Expand Down Expand Up @@ -659,6 +659,7 @@ Sentry.init({
| `SENTRY_ORG` | Organization slug | Used by wizard and build plugins |
| `SENTRY_PROJECT` | Project slug | Used by wizard and build plugins |
| `SENTRY_RELEASE` | Release identifier | Falls back from `release` option |
| `SENTRY_DIST` | Distribution identifier | Falls back from `dist` option |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation incorrectly describes SENTRY_DIST as a runtime environment variable, but it is only used at build-time, which may mislead users.
Severity: LOW

Suggested Fix

Update the documentation in SKILL.md to clarify that SENTRY_DIST is a build-time environment variable. Consider moving it out of the section for runtime variables or adding a clear note explaining its build-time-only nature.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-react-native-sdk/SKILL.md#L662

Potential issue: The documentation for the `SENTRY_DIST` environment variable in
`SKILL.md` is misleading. It is listed with runtime variables and described as 'Falls
back from `dist` option', implying it can be set at runtime. However, evidence from the
original feature implementation and official Sentry documentation indicates that
`SENTRY_DIST` is exclusively a build-time variable. Setting it at runtime will have no
effect, which could lead to confusion and incorrect configuration for users trying to
set the distribution at runtime.

Did we get this right? 👍 / 👎 to inform future reviews.

| `SENTRY_ENVIRONMENT` | Environment name | Falls back from `environment` option |
| `SENTRY_DISABLE_AUTO_UPLOAD` | Skip source map upload | Set `true` during local builds |
| `EXPO_PUBLIC_SENTRY_DSN` | Expo public env var for DSN | Safe to embed in client bundle |
Expand Down
6 changes: 6 additions & 0 deletions skills/sentry-ruby-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ grep -iE '\bpuma\b' Gemfile 2>/dev/null
# Background jobs
grep -iE '\bsidekiq\b|\bresque\b|\bdelayed_job\b' Gemfile 2>/dev/null

# Yabeda metrics framework
grep -iE '\byabeda\b' Gemfile 2>/dev/null

# Competitor monitoring tools — triggers migration path if found
grep -iE '\bappsignal\b|\bhoneybadger\b|\bbugsnag\b|\brollbar\b|\bairbrake\b' Gemfile 2>/dev/null

Expand All @@ -66,6 +69,7 @@ cat package.json frontend/package.json web/package.json 2>/dev/null | grep -E '"
- **Rails** → use `sentry-rails` + `config/initializers/sentry.rb`
- **Rack/Sinatra** → `sentry-ruby` + `Sentry::Rack::CaptureExceptions` middleware
- **Sidekiq** → add `sentry-sidekiq`; recommend Metrics if existing metric patterns found
- **Yabeda detected** → add `sentry-yabeda`; routes Yabeda metrics to Sentry metrics
- **Puma detected** → queue time capture is automatic (v6.4.0+), but the reverse proxy must set `X-Request-Start` header; see `${SKILL_ROOT}/references/tracing.md` → "Request Queue Time"
- **OTel tracing detected** (`opentelemetry-sdk` + instrumentations in Gemfile, or `OpenTelemetry::SDK.configure` in source) → use OTLP path: `config.otlp.enabled = true`; do **not** set `traces_sample_rate`; Sentry links errors to OTel traces automatically

Expand Down Expand Up @@ -103,6 +107,7 @@ gem "sentry-rails"
gem "sentry-sidekiq" # if using Sidekiq
gem "sentry-resque" # if using Resque
gem "sentry-delayed_job" # if using DelayedJob
gem "sentry-yabeda" # if using Yabeda metrics framework
```

**Rack / Sinatra / plain Ruby:**
Expand All @@ -121,6 +126,7 @@ Run `bundle install`.
| Sidekiq | `sentry-sidekiq` | Sentry initializer or Sidekiq config | Worker execution → transactions |
| Resque | `sentry-resque` | Sentry initializer | Worker execution → transactions |
| DelayedJob | `sentry-delayed_job` | Sentry initializer | Job execution → transactions |
| Yabeda metrics | `sentry-yabeda` | Sentry initializer | Yabeda metric events → Sentry metrics |

### Init — Rails (`config/initializers/sentry.rb`)

Expand Down
Loading