-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move /common/profiling to platform docs (#8692)
- Loading branch information
1 parent
1f41323
commit abce7df
Showing
16 changed files
with
434 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Set Up Profiling | ||
description: "Learn how to enable profiling in your app if it is not already set up." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
<PlatformContent includePath="profiling/index/preface" /> | ||
|
||
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments. | ||
|
||
## Enable Performance Monitoring | ||
|
||
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK: | ||
|
||
In `AndroidManifest.xml`: | ||
|
||
```xml | ||
<application> | ||
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" /> | ||
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" /> | ||
</application> | ||
``` | ||
|
||
Check out the <PlatformLink to="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. | ||
|
||
By default, some transactions will be created automatically for common operations like loading a view controller/activity and app startup. | ||
|
||
## Enable Profiling | ||
|
||
<Note> | ||
|
||
Android profiling is available starting in SDK version `6.16.0`. | ||
|
||
</Note> | ||
|
||
In `AndroidManifest.xml`: | ||
|
||
<SignInNote /> | ||
|
||
```xml | ||
<application> | ||
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" /> | ||
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" /> | ||
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" /> | ||
</application> | ||
``` | ||
|
||
<Note> | ||
|
||
The `io.sentry.traces.profiling.sample-rate` setting is _relative_ to the `io.sentry.traces.sample-rate` setting. | ||
|
||
</Note> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Troubleshooting | ||
description: "Learn how to troubleshoot your profiling setup." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following: | ||
|
||
- Ensure that performance monitoring <PlatformLink to="/performance/">is enabled</PlatformLink>. | ||
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the **Performance** page in [sentry.io](https://sentry.io). | ||
- If the automatic instrumentation is not sending performance data, try using <PlatformLink to="/performance/instrumentation/custom-instrumentation">custom instrumentation</PlatformLink>. | ||
- Enable <PlatformLink to="/configuration/options/#debug">debug mode</PlatformLink> in the SDK and check the logs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: Set Up Profiling | ||
description: "Learn how to enable profiling in your app if it is not already set up." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
<PlatformContent includePath="profiling/index/preface" /> | ||
|
||
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments. | ||
|
||
## Enable Performance Monitoring | ||
|
||
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK: | ||
|
||
<SignInNote /> | ||
|
||
```swift {tabTitle:Swift} | ||
import Sentry | ||
|
||
SentrySDK.start { options in | ||
options.dsn = "___PUBLIC_DSN___" | ||
options.tracesSampleRate = 1.0 | ||
} | ||
``` | ||
|
||
```objc {tabTitle:Objective-C} | ||
@import Sentry; | ||
|
||
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { | ||
options.dsn = @"___PUBLIC_DSN___"; | ||
options.tracesSampleRate = @1.0; | ||
}]; | ||
``` | ||
Check out the <PlatformLink to="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. | ||
By default, some transactions will be created automatically for common operations like loading a view controller/activity and app startup. | ||
## Enable Profiling | ||
<Note> | ||
iOS profiling is available starting in SDK version `8.12.0`. | ||
</Note> | ||
<SignInNote /> | ||
```swift {tabTitle:Swift} | ||
import Sentry | ||
SentrySDK.start { options in | ||
options.dsn = "___PUBLIC_DSN___" | ||
options.tracesSampleRate = 1.0 // tracing must be enabled for profiling | ||
options.profilesSampleRate = 1.0 // see also `profilesSampler` if you need custom sampling logic | ||
} | ||
``` | ||
|
||
```objc {tabTitle:Objective-C} | ||
@import Sentry; | ||
|
||
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { | ||
options.dsn = @"___PUBLIC_DSN___"; | ||
options.tracesSampleRate = @1.0; // tracing must be enabled for profiling | ||
options.profilesSampleRate = @1.0; // see also `profilesSampler` if you need custom sampling logic | ||
}]; | ||
``` | ||
<Note> | ||
The <PlatformIdentifier name="profiles-sample-rate" /> setting is _relative_ to the <PlatformIdentifier name="traces-sample-rate" /> setting. | ||
</Note> |
12 changes: 12 additions & 0 deletions
12
src/platforms/apple/common/profiling/troubleshooting/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Troubleshooting | ||
description: "Learn how to troubleshoot your profiling setup." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following: | ||
|
||
- Ensure that performance monitoring <PlatformLink to="/performance/">is enabled</PlatformLink>. | ||
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the **Performance** page in [sentry.io](https://sentry.io). | ||
- If the automatic instrumentation is not sending performance data, try using <PlatformLink to="/performance/instrumentation/custom-instrumentation">custom instrumentation</PlatformLink>. | ||
- Enable <PlatformLink to="/configuration/options/#debug">debug mode</PlatformLink> in the SDK and check the logs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: Set Up Profiling | ||
description: "Learn how to enable profiling in your app if it is not already set up." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
<PlatformContent includePath="profiling/index/preface" /> | ||
|
||
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments. | ||
|
||
## Enable Performance Monitoring | ||
|
||
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK: | ||
|
||
<SignInNote /> | ||
|
||
```dart | ||
SentryFlutter.init( | ||
(options) => { | ||
options.dsn = '___PUBLIC_DSN___'; | ||
// We recommend adjusting this value in production: | ||
options.tracesSampleRate = 1.0; | ||
}, | ||
appRunner: () => runApp(MyApp()), | ||
); | ||
``` | ||
|
||
Check out the <PlatformLink to="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. | ||
|
||
## Enable Profiling | ||
|
||
<Note> | ||
|
||
Flutter Profiling alpha is available for iOS and macOS since SDK version `7.12.0`. | ||
|
||
</Note> | ||
|
||
To enable profiling, set the `profilesSampleRate`: | ||
|
||
<SignInNote /> | ||
|
||
```dart | ||
SentryFlutter.init( | ||
(options) => { | ||
options.dsn = '___PUBLIC_DSN___'; | ||
// We recommend adjusting this value in production: | ||
options.tracesSampleRate = 1.0; | ||
// The sampling rate for profiling is relative to tracesSampleRate | ||
// Setting to 1.0 will profile 100% of sampled transactions: | ||
options.profilesSampleRate = 1.0; | ||
}, | ||
appRunner: () => runApp(MyApp()), | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Troubleshooting | ||
description: "Learn how to troubleshoot your profiling setup." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following: | ||
|
||
- Ensure that performance monitoring <PlatformLink to="/performance/">is enabled</PlatformLink>. | ||
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the **Performance** page in [sentry.io](https://sentry.io). | ||
- If the automatic instrumentation is not sending performance data, try using <PlatformLink to="/performance/instrumentation/custom-instrumentation">custom instrumentation</PlatformLink>. | ||
- Enable <PlatformLink to="/configuration/options/#debug">debug mode</PlatformLink> in the SDK and check the logs. | ||
|
||
### Limitations | ||
|
||
Profiling is currently available only for iOS and macOS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Set Up Profiling | ||
description: "Learn how to enable profiling in your app if it is not already set up." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
<PlatformContent includePath="profiling/index/preface" /> | ||
|
||
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments. | ||
|
||
## Enable Performance Monitoring | ||
|
||
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK: | ||
|
||
<SignInNote /> | ||
|
||
```go | ||
err := sentry.Init(sentry.ClientOptions{ | ||
Dsn: "___PUBLIC_DSN___", | ||
EnableTracing: true, | ||
// We recommend adjusting this value in production: | ||
TracesSampleRate: 1.0, | ||
}) | ||
``` | ||
|
||
Check out the <PlatformLink to="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. | ||
|
||
## Enable Profiling | ||
|
||
<Note> | ||
|
||
Go Profiling alpha is available since SDK version `0.22.0`. | ||
|
||
</Note> | ||
|
||
To enable profiling, set the `ProfilesSampleRate`: | ||
|
||
<SignInNote /> | ||
|
||
```go | ||
err := sentry.Init(sentry.ClientOptions{ | ||
Dsn: "___PUBLIC_DSN___", | ||
EnableTracing: true, | ||
// We recommend adjusting these values in production: | ||
TracesSampleRate: 1.0, | ||
// The sampling rate for profiling is relative to TracesSampleRate: | ||
ProfilesSampleRate: 1.0, | ||
}) | ||
``` |
19 changes: 19 additions & 0 deletions
19
src/platforms/go/common/profiling/troubleshooting/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Troubleshooting | ||
description: "Learn how to troubleshoot your profiling setup." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following: | ||
|
||
- Ensure that performance monitoring <PlatformLink to="/performance/">is enabled</PlatformLink>. | ||
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the **Performance** page in [sentry.io](https://sentry.io). | ||
- If the automatic instrumentation is not sending performance data, try using <PlatformLink to="/performance/instrumentation/custom-instrumentation">custom instrumentation</PlatformLink>. | ||
- Enable <PlatformLink to="/configuration/options/#debug">debug mode</PlatformLink> in the SDK and check the logs. | ||
|
||
### Limitations | ||
|
||
Profile samples are collected periodically for each goroutine. | ||
If your program uses a large number of concurrent goroutines, make sure to check whether the overhead is within the acceptable range for your use case. | ||
|
||
As always, and especially with Profiling in Go being an alpha feature, feedback is welcome on [Discord](https://discord.com/channels/621778831602221064/621786587939864586) or [GitHub](https://github.com/getsentry/sentry-go/issues/630). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Set Up Profiling | ||
description: "Learn how to enable profiling in your app if it is not already set up." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
<PlatformContent includePath="profiling/index/preface" /> | ||
|
||
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments. | ||
|
||
## Enable Performance Monitoring | ||
|
||
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK: | ||
|
||
```javascript | ||
Sentry.init({ | ||
dsn: "___DSN___", | ||
tracesSampleRate: 1.0, | ||
}); | ||
``` | ||
|
||
Check out the <PlatformLink to="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. | ||
|
||
## Enable Profiling | ||
|
||
<Note> | ||
|
||
Profiling for React Native is available in beta in SDK versions `5.8.0` and above. Currently, it supports profiling the JavaScript layer. Combined profiling with native Android/iOS layers isn't supported at this time. | ||
|
||
</Note> | ||
|
||
To enable profiling, set the `profilesSampleRate`: | ||
|
||
```javascript | ||
Sentry.init({ | ||
dsn: "___DSN___", | ||
tracesSampleRate: 1.0, | ||
_experiments: { | ||
// profilesSampleRate is relative to tracesSampleRate. | ||
// Here, we'll capture profiles for 100% of transactions. | ||
profilesSampleRate: 1.0, | ||
}, | ||
}); | ||
``` |
19 changes: 19 additions & 0 deletions
19
src/platforms/react-native/profiling/troubleshooting/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Troubleshooting | ||
description: "Learn how to troubleshoot your profiling setup." | ||
sidebar_order: 5000 | ||
--- | ||
|
||
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following: | ||
|
||
- Ensure that performance monitoring <PlatformLink to="/performance/">is enabled</PlatformLink>. | ||
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the **Performance** page in [sentry.io](https://sentry.io). | ||
- If the automatic instrumentation is not sending performance data, try using <PlatformLink to="/performance/instrumentation/custom-instrumentation">custom instrumentation</PlatformLink>. | ||
- Enable <PlatformLink to="/configuration/options/#debug">debug mode</PlatformLink> in the SDK and check the logs. | ||
|
||
### Limitations | ||
|
||
Because profile samples are collected at a fixed sampling frequency, we recommend checking if profiling's [Performance Overhead](/product/profiling/performance-overhead) is acceptable for your use case. Note that | ||
we're working on symbolication of the collected profiles which means that at the moment you'll see only function names but not resolved source file paths. | ||
|
||
As always, and especially since Profiling in React Native is an alpha feature, feedback is welcome on [Discord](https://discord.com/channels/621778831602221064/750735628932612096) or [GitHub](https://github.com/getsentry/sentry-react-native/issues/2668). |
Oops, something went wrong.
abce7df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sentry-docs – ./
sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev