Skip to content

Commit 5ffca6a

Browse files
philprimeclaude
andauthored
docs(apple): Promote Metrics to GA (#17494)
## DESCRIBE YOUR PR Sentry Cocoa SDK has graduated Metrics from experimental to GA in 9.12.0. The `experimental.enableMetrics` and `experimental.beforeSendMetric` properties are removed; the new top-level `enableMetrics` and `beforeSendMetric` options replace them. - Drop the `beta: true` flag and open-beta alert from the Apple Metrics page - Update Swift/Objective-C samples and option docs to use the top-level `enableMetrics` and `beforeSendMetric` - Document the removed `experimental.*` options with `removedSince="9.12.0"` and pointers to the new GA options - Drop the Metrics section from the Apple experimental features page - Bump the requirements include to 9.12.0 The Swift-only limitation on `SentrySDK.metrics` is unchanged (Objective-C support is tracked in getsentry/sentry-cocoa#6342). Refs getsentry/sentry-cocoa#7842 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [x] Urgent deadline (GA date, etc.): April 28th, 2026 - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2908035 commit 5ffca6a

5 files changed

Lines changed: 20 additions & 35 deletions

File tree

docs/platforms/apple/common/configuration/options.mdx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -908,19 +908,16 @@ This option is only used when <PlatformIdentifier name="enableSpotlight" /> is s
908908
</SdkOption>
909909
910910
## Metrics Options
911-
<Alert>
912-
This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry-cocoa/discussions) if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony.
913-
</Alert>
914911
915-
<SdkOption name="experimental.enableMetrics" type="bool" defaultValue="true" availableSince="9.2.0">
912+
<SdkOption name="enableMetrics" type="bool" defaultValue="true" availableSince="9.12.0">
916913
917914
When enabled, the SDK can send metrics to Sentry. Note that metrics are not collected automatically — you must manually call the `SentrySDK.metrics` API to record counters, gauges, and distributions.
918915
919916
Learn more in the <PlatformLink to="/metrics/">Metrics documentation</PlatformLink>.
920917
921918
</SdkOption>
922919
923-
<SdkOption name="experimental.beforeSendMetric" type="function" availableSince="9.2.0">
920+
<SdkOption name="beforeSendMetric" type="function" availableSince="9.12.0">
924921
925922
Use this callback to filter or modify metrics before they're sent to Sentry. Return `nil` to drop the metric.
926923
@@ -932,7 +929,7 @@ import Sentry
932929
SentrySDK.start { options in
933930
options.dsn = "___PUBLIC_DSN___"
934931
// Metrics are enabled by default, no need to set enableMetrics = true
935-
options.experimental.beforeSendMetric = { metric in
932+
options.beforeSendMetric = { metric in
936933
// Create a mutable copy (SentryMetric is a struct)
937934
var metric = metric
938935

@@ -951,3 +948,15 @@ SentrySDK.start { options in
951948
```
952949

953950
</SdkOption>
951+
952+
<SdkOption name="experimental.enableMetrics" type="bool" defaultValue="true" availableSince="9.4.0" removedSince="9.12.0">
953+
954+
**Removed in version 9.12.0** — Metrics has graduated to GA. Use the top-level <PlatformIdentifier name="enableMetrics" /> option instead. See [sentry-cocoa#7842](https://github.com/getsentry/sentry-cocoa/pull/7842).
955+
956+
</SdkOption>
957+
958+
<SdkOption name="experimental.beforeSendMetric" type="function" availableSince="9.4.0" removedSince="9.12.0">
959+
960+
**Removed in version 9.12.0** — Metrics has graduated to GA. Use the top-level <PlatformIdentifier name="beforeSendMetric" /> option instead. See [sentry-cocoa#7842](https://github.com/getsentry/sentry-cocoa/pull/7842).
961+
962+
</SdkOption>

docs/platforms/apple/common/features/experimental-features.mdx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,6 @@ Indicators for reliable environments include:
7171

7272
Learn more in the <PlatformLink to="/session-replay/">Session Replay</PlatformLink> documentation.
7373

74-
## Metrics
75-
76-
Use <PlatformLink to="/metrics/">Metrics</PlatformLink> to send counters, gauges, and distributions from your application to Sentry. Once in Sentry, these metrics can be viewed alongside related errors, traces, and logs, and searched using their individual attributes.
77-
78-
The metrics feature is enabled by default, but metrics are not collected automatically. You must manually call the `SentrySDK.metrics` API to record metrics (e.g., `SentrySDK.metrics.count(key: "my_counter", value: 1)`). To disable the feature entirely:
79-
80-
```swift
81-
options.experimental.enableMetrics = false
82-
```
83-
84-
```objc {tabTitle:Objective-C}
85-
options.experimental.enableMetrics = NO;
86-
```
87-
88-
Learn more in the <PlatformLink to="/metrics/">Metrics documentation</PlatformLink>.
89-
9074
## Providing Feedback
9175

9276
Let us know if you have feedback through [GitHub issues](https://github.com/getsentry/sentry-cocoa/issues). Your feedback helps us improve these experimental features and move them toward stable releases.

docs/platforms/apple/common/metrics/index.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@ sidebar_title: Metrics
44
description: "Metrics allow you to send, view and query counters, gauges, and distributions from your Sentry-configured apps to track application health and drill down into related traces, logs, and errors."
55
sidebar_order: 7
66
sidebar_section: features
7-
beta: true
87
---
98

109
With Sentry's Application Metrics, you can send counters, gauges, and distributions from your applications to Sentry. Once in Sentry, these metrics can be viewed alongside relevant errors, traces, and logs, and searched using their individual attributes.
1110

12-
<Alert>
13-
This feature is currently in open beta. Please reach out on
14-
[GitHub](https://github.com/getsentry/sentry/discussions/102275) if you have
15-
feedback or questions. Features in beta are still in-progress and may have
16-
bugs. We recognize the irony.
17-
</Alert>
18-
1911
## Requirements
2012

2113
<PlatformContent includePath="metrics/requirements" />

platform-includes/metrics/options/apple.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ The Sentry Cocoa SDK provides several options to configure how metrics are captu
22

33
### Enabling/Disabling Metrics
44

5-
Metrics are enabled by default, but are not collected automatically. You must manually call the `SentrySDK.metrics` API to record metrics. If you need to disable metrics entirely, set `options.experimental.enableMetrics` to `false` when initializing the SDK:
5+
Metrics are enabled by default, but are not collected automatically. You must manually call the `SentrySDK.metrics` API to record metrics. If you need to disable metrics entirely, set `options.enableMetrics` to `false` when initializing the SDK:
66

77
```swift {tabTitle:Swift}
88
import Sentry
99

1010
SentrySDK.start { options in
1111
options.dsn = "___PUBLIC_DSN___"
12-
options.experimental.enableMetrics = false // Metrics are enabled by default
12+
options.enableMetrics = false // Metrics are enabled by default
1313
}
1414
```
1515

@@ -18,7 +18,7 @@ SentrySDK.start { options in
1818

1919
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
2020
options.dsn = @"___PUBLIC_DSN___";
21-
options.experimental.enableMetrics = NO; // Metrics are enabled by default
21+
options.enableMetrics = NO; // Metrics are enabled by default
2222
}];
2323
```
2424
@@ -49,7 +49,7 @@ import Sentry
4949
SentrySDK.start { options in
5050
options.dsn = "___PUBLIC_DSN___"
5151
// Metrics are enabled by default, no need to set enableMetrics = true
52-
options.experimental.beforeSendMetric = { metric in
52+
options.beforeSendMetric = { metric in
5353
// Create a mutable copy (SentryMetric is a struct)
5454
var metric = metric
5555
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Metrics are supported in Sentry Cocoa SDK version `9.2.0` and above.
1+
Metrics are supported in Sentry Cocoa SDK version `9.12.0` and above (previously experimental since `9.4.0`).

0 commit comments

Comments
 (0)