diff --git a/src/platform-includes/performance/automatic-performance-metrics/android.mdx b/src/platform-includes/performance/automatic-performance-metrics/android.mdx index 6be21b1f0f6d6..49a3b688c5434 100644 --- a/src/platform-includes/performance/automatic-performance-metrics/android.mdx +++ b/src/platform-includes/performance/automatic-performance-metrics/android.mdx @@ -1,4 +1,4 @@ If configured, the Android SDK automatically collects the following performance metrics: -* Cold and warm app start time - learn more in App Start Instrumentation. -* Frozen and slow frame rendering - learn more in Slow and Frozen Frames. +* Cold and warm app start time. +* Slow and frozen frame rendering. diff --git a/src/platform-includes/performance/automatic-performance-metrics/apple.mdx b/src/platform-includes/performance/automatic-performance-metrics/apple.mdx new file mode 100644 index 0000000000000..8cf2a9637e231 --- /dev/null +++ b/src/platform-includes/performance/automatic-performance-metrics/apple.mdx @@ -0,0 +1,4 @@ +If configured, the Cocoa SDK automatically collects the following performance metrics: + +* Cold and warm app start time +* Slow and frozen frame rendering diff --git a/src/platform-includes/performance/custom-performance-metrics/apple.mdx b/src/platform-includes/performance/custom-performance-metrics/apple.mdx new file mode 100644 index 0000000000000..ab1d385dcc0b2 --- /dev/null +++ b/src/platform-includes/performance/custom-performance-metrics/apple.mdx @@ -0,0 +1,32 @@ +Adding custom metrics is supported in Sentry's Cocoa SDK, version `7.28.0` and above. + +```swift {tabTitle: Swift} +import Sentry + +let span = SentrySDK.span; + +// Record amount of memory used +span?.setMeasurement(name: "memory_used", value: 64, unit: MeasurementUnitInformation.megabyte); + +// Record time it took to load user profile +span?.setMeasurement(name: "user_profile_loading_time", value: 1.3, unit: MeasurementUnitDuration.second); + +// Record number of times the screen was loaded +span?.setMeasurement(name: "screen_load_count", value: 4); +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +id span = SentrySDK.span; +if (span != nil) { + // Record amount of memory used + [span setMeasurement:@"memory_used" value:@64 unit:SentryMeasurementUnitInformation.megabyte]; + + // Record time it took to load user profile + [span setMeasurement:@"user_profile_loading_time" value:@1.3 unit:SentryMeasurementUnitDuration.second]; + + // Record number of times the screen was loaded + [span setMeasurement:@"screen_load_count" value:@4]; +} +``` diff --git a/src/platform-includes/performance/custom-performance-metrics/java.mdx b/src/platform-includes/performance/custom-performance-metrics/java.mdx index 070946296d599..c687e870b0fd1 100644 --- a/src/platform-includes/performance/custom-performance-metrics/java.mdx +++ b/src/platform-includes/performance/custom-performance-metrics/java.mdx @@ -1,4 +1,4 @@ -Adding custom metrics is supported in Sentry's Java SDK version `6.5.0` and above. +Adding custom metrics is supported in Sentry's Java SDK, version `6.5.0` and above. ```java {tabTitle:Java} import io.sentry.ISpan; diff --git a/src/platforms/common/performance/instrumentation/performance-metrics.mdx b/src/platforms/common/performance/instrumentation/performance-metrics.mdx index b1257ccabd089..c2e18f99167e0 100644 --- a/src/platforms/common/performance/instrumentation/performance-metrics.mdx +++ b/src/platforms/common/performance/instrumentation/performance-metrics.mdx @@ -10,13 +10,13 @@ supported: - java - java.spring-boot - android + - apple notSupported: - javascript.cordova - javascript.electron - dotnet - go - ruby - - apple - unity - rust - native @@ -31,7 +31,7 @@ description: "Learn how to attach performance metrics to your transactions." Sentry's SDKs support sending performance metrics data to Sentry. These are numeric values attached to transactions that are aggregated and displayed in Sentry. - +