Skip to content

Commit 3767747

Browse files
authored
feat(profiling): add wizard onboarding docs (#5778)
1 parent 7c07e52 commit 3767747

File tree

17 files changed

+286
-6
lines changed

17 files changed

+286
-6
lines changed

src/gatsby/onPostBuild.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,25 @@ export default async ({ graphql }) => {
7373
};
7474

7575
const parsePathSlug = (slug: string) => {
76-
if (slug.includes("/performance-onboarding/") || slug.includes("/replay-onboarding/")) {
76+
if (
77+
slug.includes("/performance-onboarding/") ||
78+
slug.includes("/replay-onboarding/") ||
79+
slug.includes("/profiling-onboarding/")
80+
) {
7781
const pathMatch = slug.match(
78-
/^\/(?<platform>[^/]+)\/(?<product>performance|replay)-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
82+
/^\/(?<platform>[^/]+)\/(?<product>performance|replay|profiling)-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
7983
);
8084

81-
if(!pathMatch) {
82-
throw new Error(`Unable to parse performance onboarding from slug: ${slug}`);
85+
if (!pathMatch) {
86+
throw new Error(`Unable to parse onboarding path from slug: ${slug}`);
8387
}
8488

8589
const { platform, product, sub_platform } = pathMatch.groups;
8690
const step = String(pathMatch.groups.step).replace(/\./g, "-");
87-
const sub = platform === sub_platform ? `${product}-onboarding-${step}` : `${sub_platform}-${product}-onboarding-${step}`;
91+
const sub =
92+
platform === sub_platform
93+
? `${product}-onboarding-${step}`
94+
: `${sub_platform}-${product}-onboarding-${step}`;
8895

8996
return {
9097
platform,
@@ -116,7 +123,7 @@ const writeJson = async (
116123
if (!indexJson[main]) indexJson[main] = {};
117124
if (!node.frontmatter.doc_link) {
118125
// Skip invalid files
119-
return
126+
return;
120127
}
121128
const key = sub ? `${main}.${sub}` : `${main}`;
122129
const data = {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Android
3+
doc_link: https://docs.sentry.io/platforms/android/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Install
9+
10+
For the Profiling integration to work, you must have the Sentry Android package (minimum version 6.0.0). You can choose between automatic and manual installation methods, using Sentry’s Android Gradle Plugin (shown below). Learn more about installation methods in our [full documentation](https://docs.sentry.io/platforms/android/#install).
11+
12+
```groovy
13+
buildscript {
14+
repositories {
15+
mavenCentral()
16+
}
17+
}
18+
plugins {
19+
id "io.sentry.android.gradle" version "{{ packages.version('sentry.java.android.gradle-plugin', '3.0.0') }}"
20+
}
21+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Android
3+
doc_link: https://docs.sentry.io/platforms/android/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Configure Performance
9+
10+
Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:
11+
12+
```xml {filename:AndroidManifest.xml}
13+
<application>
14+
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" />
15+
<!-- We recommend adjusting this value in production -->
16+
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
17+
</application>
18+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Android
3+
doc_link: https://docs.sentry.io/platforms/android/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Configure Profiling
9+
10+
Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:
11+
12+
```xml {filename:AndroidManifest.xml}
13+
<application>
14+
<!-- SDK Config -->
15+
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
16+
</application>
17+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Android
3+
doc_link: https://docs.sentry.io/platforms/android/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Upload Proguard Mappings
9+
10+
If your app uses Sentry’s Android Gradle Plugin, the Proguard maps will be automatically uploaded when you publish your next build on Google Play. Learn more about Sentry’s Gradle Plugin in our [full documentation](https://docs.sentry.io/platforms/android/profiling/).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: iOS
3+
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Install
9+
10+
For the Profiling integration to work, you must have the Sentry Cocoa package (minimum version 7.23.0). We offer installation methods for Carthage (shown below), CocoaPods, and Swift Package Manager. Learn more about installation methods in our [full documentation](/platforms/apple/install/).
11+
12+
```ruby
13+
github "getsentry/sentry-cocoa" "{{ packages.version('sentry.cocoa','7.23.0') }}"
14+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: iOS
3+
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Configure Performance
9+
10+
Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:
11+
12+
```swift {tabTitle:Swift}
13+
import Sentry
14+
15+
SentrySDK.start { options in
16+
options.dsn = "___PUBLIC_DSN___"
17+
// We recommend adjusting this value in production
18+
options.tracesSampleRate = 1.0
19+
}
20+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: iOS
3+
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Configure Profiling
9+
10+
Add the `profilesSampleRate` option to your SDK config.
11+
12+
```swift {tabTitle:Swift}
13+
import Sentry
14+
15+
SentrySDK.start { options in
16+
// ... SDK config
17+
options.profilesSampleRate = 1.0
18+
}
19+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: iOS
3+
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Upload Debug Symbols
9+
10+
Upload the dSYM file using either sentry-cli, the Fastlane action, or set up the Sentry App Store Connect integration. Learn more about uploading debug symbols in our [full documentation](https://docs.sentry.io/platforms/apple/guides/ios/profiling/).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Node
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
<div class='alert warning'>
9+
Profiling in Node is currently in Alpha, and there may be some bugs. We recognize the irony. If you have any questions or feedback, join our <a href="https://discord.gg/zrMjKA4Vnz">discord channel</a>.
10+
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Node
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Install
9+
10+
For the Profiling integration to work, you must have the Sentry Node SDK package (minimum version 7.x) installed.
11+
12+
```bash
13+
# Using yarn
14+
yarn add @sentry/node @sentry/tracing @sentry/profiling-node
15+
16+
# Using npm
17+
npm install --save @sentry/node @sentry/tracing @sentry/profiling-node
18+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Node
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Configure Performance
9+
10+
Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:
11+
12+
```javascript
13+
import * as Sentry from "@sentry/node";
14+
import "@sentry/tracing";
15+
16+
Sentry.init({
17+
dsn: "___PUBLIC_DSN___",
18+
// Set tracesSampleRate to 1.0 to capture 100%
19+
// of transactions for performance monitoring.
20+
// We recommend adjusting this value in production
21+
tracesSampleRate: 1.0,
22+
});
23+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Node
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Configure Profiling
9+
10+
Add the `profilesSampleRate` option to your SDK config.
11+
12+
```javascript
13+
import * as Sentry from "@sentry/node";
14+
// NOTE: @sentry/tracing should be imported before @sentry/profiling-node
15+
import "@sentry/tracing";
16+
import {ProfilingIntegration} from "@sentry/profiling-node";
17+
18+
Sentry.init({
19+
// ... SDK config
20+
integrations: [
21+
// add profiling integration
22+
new ProfilingIntegration()
23+
]
24+
profilesSampleRate: 1.0,
25+
});
26+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Python
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
<div class='alert warning'>
9+
Profiling in Python is currently in Alpha, and there may be some bugs. We recognize the irony. If you have any questions or feedback, join our <a href="https://discord.gg/zrMjKA4Vnz">discord channel</a>.
10+
</div>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Python
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Install
9+
10+
For the Profiling integration to work, you must have the Sentry Python SDK package (minimum version 1.11.0) installed.
11+
12+
```bash
13+
pip install --upgrade sentry-sdk
14+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Python
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Configure Performance
9+
10+
Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:
11+
12+
```python
13+
import sentry_sdk
14+
15+
sentry_sdk.init(
16+
dsn="___PUBLIC_DSN___",
17+
# Set tracesSampleRate to 1.0 to capture 100%
18+
# of transactions for performance monitoring.
19+
# We recommend adjusting this value in production
20+
traces_sample_rate=1.0,
21+
);
22+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Python
3+
doc_link: https://discord.gg/zrMjKA4Vnz
4+
support_level: alpha
5+
type: language
6+
---
7+
8+
#### Configure Profiling
9+
10+
Add the `profiles_sample_rate` option to your SDK config.
11+
12+
```python
13+
import sentry_sdk
14+
15+
sentry_sdk.init(
16+
# ... SDK config
17+
_experiments={
18+
"profiles_sample_rate": 1.0,
19+
}
20+
)
21+
```

0 commit comments

Comments
 (0)