Skip to content
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
24 changes: 17 additions & 7 deletions platform-includes/debug-symbols-apple/_default.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ For this to work, your project settings for `DEBUG_INFORMATION_FORMAT` must be s

<OrgAuthTokenNote />

```bash
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 }]}
/>

```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