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
2 changes: 2 additions & 0 deletions skills/sentry-cocoa-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ For each feature: `Read ${SKILL_ROOT}/references/<feature>.md`, follow steps exa
| `sampleRate` | `Float` | `1.0` | Error event sample rate |
| `beforeSend` | `Closure` | `nil` | Hook to mutate/drop error events |
| `onCrashedLastRun` | `Closure` | `nil` | Called on next launch after a crash |
| `strictTraceContinuation` | `Bool` | `false` | Reject incoming traces from other orgs; validates `org_id` in baggage headers (sentry-cocoa ≥9.10.0) |
| `orgId` | `String?` | `nil` | Organization ID for strict trace validation; auto-parsed from DSN host (e.g. `o123.ingest.sentry.io` → `"123"`) if not set explicitly |

### Environment Variables

Expand Down
13 changes: 10 additions & 3 deletions skills/sentry-php-sdk/references/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,25 @@ Metrics are buffered in a ring buffer (capacity: 1000 entries):

**Buffer limit:** When more than 1000 metrics are buffered, the oldest entries are dropped. Flush periodically in high-volume scripts.

## Threshold-Based Auto-Flushing
## Auto-Flush Threshold

Use `metric_flush_threshold` to automatically flush buffered metrics after N entries, without needing to call `flush()` manually:

**PHP / Laravel:**
```php
\Sentry\init([
'dsn' => '___PUBLIC_DSN___',
'metric_flush_threshold' => 100, // flush after every 100 buffered metrics
'metric_flush_threshold' => 500, // flush automatically after 500 metrics
]);
```

**Symfony:**
```yaml
sentry:
options:
metric_flush_threshold: 500
```

This is useful in CLI scripts or workers that emit metrics continuously. The threshold triggers a flush mid-process so the buffer never fills to its 1000-entry cap.

## Symfony Configuration
Expand All @@ -137,7 +144,7 @@ sentry:
options:
enable_metrics: true # default: true
attach_metric_code_locations: true # attach file/line info
metric_flush_threshold: 100 # auto-flush after N buffered metrics
metric_flush_threshold: 500 # auto-flush after N metrics (optional)
before_send_metric: 'App\Sentry\BeforeSendMetricCallback'
```

Expand Down
2 changes: 1 addition & 1 deletion skills/sentry-react-native-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ For each feature: `Read ${SKILL_ROOT}/references/<feature>.md`, follow steps exa
| `enableAutoPerformanceTracing` | `boolean` | `true` | Auto performance instrumentation |
| `enableNdkScopeSync` | `boolean` | `true` | Java→NDK scope sync (Android) |
| `attachThreads` | `boolean` | `false` | Auto-attach all threads on crash (Android) |
| `attachAllThreads` | `boolean` | `false` | Attach full stack traces of all threads to error events (iOS only) |
| `attachAllThreads` | `boolean` | `false` | Attach full stack traces for all threads to every captured event (iOS only, requires Cocoa SDK ≥9.9.0) |
| `autoInitializeNativeSdk` | `boolean` | `true` | Set `false` for manual native init |
| `onReady` | `function` | — | Callback after native SDKs initialize |

Expand Down
Loading