Skip to content

feat(profiling): add wizard onboarding docs #5778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2022
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
19 changes: 13 additions & 6 deletions src/gatsby/onPostBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,25 @@ export default async ({ graphql }) => {
};

const parsePathSlug = (slug: string) => {
if (slug.includes("/performance-onboarding/") || slug.includes("/replay-onboarding/")) {
if (
slug.includes("/performance-onboarding/") ||
slug.includes("/replay-onboarding/") ||
slug.includes("/profiling-onboarding/")
) {
const pathMatch = slug.match(
/^\/(?<platform>[^/]+)\/(?<product>performance|replay)-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
/^\/(?<platform>[^/]+)\/(?<product>performance|replay|profiling)-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
);

if(!pathMatch) {
throw new Error(`Unable to parse performance onboarding from slug: ${slug}`);
if (!pathMatch) {
throw new Error(`Unable to parse onboarding path from slug: ${slug}`);
}

const { platform, product, sub_platform } = pathMatch.groups;
const step = String(pathMatch.groups.step).replace(/\./g, "-");
const sub = platform === sub_platform ? `${product}-onboarding-${step}` : `${sub_platform}-${product}-onboarding-${step}`;
const sub =
platform === sub_platform
? `${product}-onboarding-${step}`
: `${sub_platform}-${product}-onboarding-${step}`;

return {
platform,
Expand Down Expand Up @@ -116,7 +123,7 @@ const writeJson = async (
if (!indexJson[main]) indexJson[main] = {};
if (!node.frontmatter.doc_link) {
// Skip invalid files
return
return;
}
const key = sub ? `${main}.${sub}` : `${main}`;
const data = {
Expand Down
21 changes: 21 additions & 0 deletions src/wizard/android/profiling-onboarding/android/1.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Android
doc_link: https://docs.sentry.io/platforms/android/profiling/
support_level: production
type: language
---

#### Install

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).

```groovy
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "io.sentry.android.gradle" version "{{ packages.version('sentry.java.android.gradle-plugin', '3.0.0') }}"
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Android
doc_link: https://docs.sentry.io/platforms/android/profiling/
support_level: production
type: language
---

#### Configure Performance

Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:

```xml {filename:AndroidManifest.xml}
<application>
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" />
<!-- We recommend adjusting this value in production -->
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
</application>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Android
doc_link: https://docs.sentry.io/platforms/android/profiling/
support_level: production
type: language
---

#### Configure Profiling

Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:

```xml {filename:AndroidManifest.xml}
<application>
<!-- SDK Config -->
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
</application>
```
10 changes: 10 additions & 0 deletions src/wizard/android/profiling-onboarding/android/4.upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Android
doc_link: https://docs.sentry.io/platforms/android/profiling/
support_level: production
type: language
---

#### Upload Proguard Mappings

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/).
14 changes: 14 additions & 0 deletions src/wizard/apple/profiling-onboarding/ios/1.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: iOS
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
support_level: production
type: language
---

#### Install

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/).

```ruby
github "getsentry/sentry-cocoa" "{{ packages.version('sentry.cocoa','7.23.0') }}"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: iOS
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
support_level: production
type: language
---

#### Configure Performance

Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:

```swift {tabTitle:Swift}
import Sentry

SentrySDK.start { options in
options.dsn = "___PUBLIC_DSN___"
// We recommend adjusting this value in production
options.tracesSampleRate = 1.0
}
```
19 changes: 19 additions & 0 deletions src/wizard/apple/profiling-onboarding/ios/3.configure-profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: iOS
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
support_level: production
type: language
---

#### Configure Profiling

Add the `profilesSampleRate` option to your SDK config.

```swift {tabTitle:Swift}
import Sentry

SentrySDK.start { options in
// ... SDK config
options.profilesSampleRate = 1.0
}
```
10 changes: 10 additions & 0 deletions src/wizard/apple/profiling-onboarding/ios/4.upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: iOS
doc_link: https://docs.sentry.io/platforms/apple/guides/ios/profiling/
support_level: production
type: language
---

#### Upload Debug Symbols

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/).
10 changes: 10 additions & 0 deletions src/wizard/node/profiling-onboarding/node/0.alert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Node
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

<div class='alert warning'>
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>.
</div>
18 changes: 18 additions & 0 deletions src/wizard/node/profiling-onboarding/node/1.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Node
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Install

For the Profiling integration to work, you must have the Sentry Node SDK package (minimum version 7.x) installed.

```bash
# Using yarn
yarn add @sentry/node @sentry/tracing @sentry/profiling-node

# Using npm
npm install --save @sentry/node @sentry/tracing @sentry/profiling-node
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Node
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Configure Performance

Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:

```javascript
import * as Sentry from "@sentry/node";
import "@sentry/tracing";

Sentry.init({
dsn: "___PUBLIC_DSN___",
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
```
26 changes: 26 additions & 0 deletions src/wizard/node/profiling-onboarding/node/3.configure-profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Node
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Configure Profiling

Add the `profilesSampleRate` option to your SDK config.

```javascript
import * as Sentry from "@sentry/node";
// NOTE: @sentry/tracing should be imported before @sentry/profiling-node
import "@sentry/tracing";
import {ProfilingIntegration} from "@sentry/profiling-node";

Sentry.init({
// ... SDK config
integrations: [
// add profiling integration
new ProfilingIntegration()
]
profilesSampleRate: 1.0,
});
```
10 changes: 10 additions & 0 deletions src/wizard/python/profiling-onboarding/python/0.alert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Python
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

<div class='alert warning'>
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>.
</div>
14 changes: 14 additions & 0 deletions src/wizard/python/profiling-onboarding/python/1.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Python
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Install

For the Profiling integration to work, you must have the Sentry Python SDK package (minimum version 1.11.0) installed.

```bash
pip install --upgrade sentry-sdk
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Python
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Configure Performance

Sentry’s performance monitoring product has to be enabled in order for Profiling to work. To enable performance monitoring in the SDK:

```python
import sentry_sdk

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set tracesSampleRate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production
traces_sample_rate=1.0,
);
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Python
doc_link: https://discord.gg/zrMjKA4Vnz
support_level: alpha
type: language
---

#### Configure Profiling

Add the `profiles_sample_rate` option to your SDK config.

```python
import sentry_sdk

sentry_sdk.init(
# ... SDK config
_experiments={
"profiles_sample_rate": 1.0,
}
)
```