Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
24 changes: 17 additions & 7 deletions platform-includes/debug-symbols-apple/_default.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Sentry requires dSYMs (debug information files) to symbolicate your stack traces. The symbolication process unscrambles the stack traces to reveal the function, file names, and line numbers of the crash.

You can also upload your code for source context. This feature allows Sentry to display snippets of your code next to the event stack traces.

<OnboardingOptionButtons
options={[{ id:"source-context", checked: false }]}
/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h: I think this should be directly above the code snippets. The experience is quite confusing to me now as it's I have no clue what the checkbox is doing, cause I don't see the code snippets.

CleanShot 2024-11-14 at 16 10 11@2x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brustolin, I think it would be better to somehow make the button non sticky. When I navigate down to the SentryFastlane plugin, I now see the button but it misses explanation.
CleanShot 2024-11-18 at 15 56 35@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But It affects all the code snippets in the page. And since the entire page is about uploading debug information, I think this makes sense.

Its like this in all other pages that this component is used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its like this in all other pages that this component is used.

Maybe they could also be improved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyways, it's better than before. Step by step.


Every solution requires a **Sentry Auth Token**. You can create tokens on the [Organization Auth Tokens](https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/) settings page.

To view uploaded dSYMs in your project, select an existing project from the "Projects" page, then go to **Settings > Debug Files**. You can upload dSYMs using:
Expand All @@ -25,7 +31,7 @@ For this to work, your project settings for `DEBUG_INFORMATION_FORMAT` must be s

<OrgAuthTokenNote />

```bash
```bash {"onboardingOptions": {"source-context": "2"}}
sentry-cli debug-files upload --auth-token ___ORG_AUTH_TOKEN___ \
--include-sources \
--org ___ORG_SLUG___ \
Expand All @@ -44,7 +50,7 @@ Sentry can display snippets of your code next to event stack traces. This featur

<OrgAuthTokenNote />

```ruby {tabTitle:Current Fastlane plugin}
```ruby {tabTitle:Current Fastlane plugin} {"onboardingOptions": {"source-context": "5"}}
sentry_debug_files_upload(
auth_token: '___ORG_AUTH_TOKEN___',
org_slug: '___ORG_SLUG___',
Expand All @@ -53,7 +59,7 @@ sentry_debug_files_upload(
)
```

```ruby {tabTitle:Fastlane plugin before 1.20.0}
```ruby {tabTitle:Fastlane plugin before 1.20.0} {"onboardingOptions": {"source-context": "5"}}
sentry_upload_dif(
auth_token: '___ORG_AUTH_TOKEN___',
org_slug: '___ORG_SLUG___',
Expand Down Expand Up @@ -94,7 +100,7 @@ Another option is to use warnings, and then set `GCC_TREAT_WARNINGS_AS_ERRORS` t

<OrgAuthTokenNote />

```bash {tabTitle:Warn on failures - nonblocking}
```bash {tabTitle:Warn on failures - nonblocking} {"onboardingOptions": {"source-context": "10"}}
if [[ "$(uname -m)" == arm64 ]]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
Expand All @@ -103,7 +109,9 @@ if which sentry-cli >/dev/null; then
export SENTRY_ORG=___ORG_SLUG___
export SENTRY_PROJECT=___PROJECT_SLUG___
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
ERROR=$(sentry-cli debug-files upload \
--include-sources \
"$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
Expand All @@ -112,7 +120,7 @@ echo "warning: sentry-cli not installed, download from https://github.com/getsen
fi
```

```bash {tabTitle:Error on failures - blocking}
```bash {tabTitle:Error on failures - blocking} {"onboardingOptions": {"source-context": "10"}}
if [[ "$(uname -m)" == arm64 ]]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
Expand All @@ -121,7 +129,9 @@ if which sentry-cli >/dev/null; then
export SENTRY_ORG=___ORG_SLUG___
export SENTRY_PROJECT=___PROJECT_SLUG___
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" --force-foreground 2>&1 >/dev/null)
ERROR=$(sentry-cli debug-files upload \
--include-sources \
"$DWARF_DSYM_FOLDER_PATH" --force-foreground 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "error: sentry-cli - $ERROR"
fi
Expand Down
10 changes: 10 additions & 0 deletions src/components/onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,23 @@ const optionDetails: Record<
</span>
),
},
'source-context': {
name: 'Source context',
description: (
<span>
Upload your source code to allow Sentry to display snippets of your code next to
the event stack traces.
</span>
),
},
};

const OPTION_IDS = [
'error-monitoring',
'performance',
'profiling',
'session-replay',
'source-context',
] as const;

type OptionId = (typeof OPTION_IDS)[number];
Expand Down
Loading