Skip to content

Commit b281c86

Browse files
a-haritibitsandfoxes
authored andcommitted
refactor: migrate ruby and related sdks to inline product options sytnax (#13442)
1 parent e5c22d2 commit b281c86

File tree

5 files changed

+37
-9
lines changed

5 files changed

+37
-9
lines changed

platform-includes/debug-symbols-apple/_default.mdx

+12-4
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,25 @@ Sentry can display snippets of your code next to event stack traces. This featur
5656

5757
<OrgAuthTokenNote />
5858

59-
```ruby {tabTitle:Current Fastlane plugin} {"onboardingOptions": {"source-context": "5"}}
59+
```ruby {tabTitle:Current Fastlane plugin}
6060
sentry_debug_files_upload(
6161
auth_token: '___ORG_AUTH_TOKEN___',
6262
org_slug: '___ORG_SLUG___',
6363
project_slug: '___PROJECT_SLUG___',
64+
# ___PRODUCT_OPTION_START___ source-context
6465
include_sources: true, # Optional. For source context.
66+
# ___PRODUCT_OPTION_END___ source-context
6567
)
6668
```
6769

68-
```ruby {tabTitle:Fastlane plugin before 1.20.0} {"onboardingOptions": {"source-context": "5"}}
70+
```ruby {tabTitle:Fastlane plugin before 1.20.0}
6971
sentry_upload_dif(
7072
auth_token: '___ORG_AUTH_TOKEN___',
7173
org_slug: '___ORG_SLUG___',
7274
project_slug: '___PROJECT_SLUG___',
75+
# ___PRODUCT_OPTION_START___ source-context
7376
include_sources: true, # Optional. For source context.
77+
# ___PRODUCT_OPTION_END___ source-context
7478
)
7579
```
7680

@@ -106,7 +110,7 @@ Another option is to use warnings, and then set `GCC_TREAT_WARNINGS_AS_ERRORS` t
106110

107111
<OrgAuthTokenNote />
108112

109-
```bash {tabTitle:Warn on failures - nonblocking} {"onboardingOptions": {"source-context": "10"}}
113+
```bash {tabTitle:Warn on failures - nonblocking}
110114
if [[ "$(uname -m)" == arm64 ]]; then
111115
export PATH="/opt/homebrew/bin:$PATH"
112116
fi
@@ -116,7 +120,9 @@ export SENTRY_ORG=___ORG_SLUG___
116120
export SENTRY_PROJECT=___PROJECT_SLUG___
117121
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
118122
ERROR=$(sentry-cli debug-files upload \
123+
# ___PRODUCT_OPTION_START___ source-context
119124
--include-sources \
125+
# ___PRODUCT_OPTION_END___ source-context
120126
"$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
121127
if [ ! $? -eq 0 ]; then
122128
echo "warning: sentry-cli - $ERROR"
@@ -126,7 +132,7 @@ echo "warning: sentry-cli not installed, download from https://github.com/getsen
126132
fi
127133
```
128134

129-
```bash {tabTitle:Error on failures - blocking} {"onboardingOptions": {"source-context": "10"}}
135+
```bash {tabTitle:Error on failures - blocking}
130136
if [[ "$(uname -m)" == arm64 ]]; then
131137
export PATH="/opt/homebrew/bin:$PATH"
132138
fi
@@ -136,7 +142,9 @@ export SENTRY_ORG=___ORG_SLUG___
136142
export SENTRY_PROJECT=___PROJECT_SLUG___
137143
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
138144
ERROR=$(sentry-cli debug-files upload \
145+
# ___PRODUCT_OPTION_START___ source-context
139146
--include-sources \
147+
# ___PRODUCT_OPTION_END___ source-context
140148
"$DWARF_DSYM_FOLDER_PATH" --force-foreground 2>&1 >/dev/null)
141149
if [ ! $? -eq 0 ]; then
142150
echo "error: sentry-cli - $ERROR"

platform-includes/getting-started-config/ruby.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```ruby {"onboardingOptions": {"performance": "12-15", "profiling": "16-19"}}
1+
```ruby
22
require 'sentry-ruby'
33

44
Sentry.init do |config|
@@ -10,13 +10,17 @@ Sentry.init do |config|
1010
# Add data like request headers and IP for users, if applicable;
1111
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
1212
config.send_default_pii = true
13+
# ___PRODUCT_OPTION_START___ performance
1314

1415
# enable tracing
1516
# we recommend adjusting this value in production
1617
config.traces_sample_rate = 1.0
18+
# ___PRODUCT_OPTION_END___ performance
19+
# ___PRODUCT_OPTION_START___ profiling
1720

1821
# enable profiling
1922
# this is relative to traces_sample_rate
2023
config.profiles_sample_rate = 1.0
24+
# ___PRODUCT_OPTION_END___ profiling
2125
end
2226
```

platform-includes/getting-started-config/ruby.rack.mdx

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Add `use Sentry::Rack::CaptureExceptions` to your `config.ru` or other rackup file:
44

55

6-
```ruby {filename:config.ru} {"onboardingOptions": {"performance": "12-15", "profiling": "16-19"}}
6+
```ruby {filename:config.ru}
77
require 'sentry-ruby'
88

99
Sentry.init do |config|
@@ -15,14 +15,18 @@ Sentry.init do |config|
1515
# Add data like request headers and IP for users, if applicable;
1616
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
1717
config.send_default_pii = true
18+
# ___PRODUCT_OPTION_START___ performance
1819

1920
# enable tracing
2021
# we recommend adjusting this value in production
2122
config.traces_sample_rate = 1.0
23+
# ___PRODUCT_OPTION_END___ performance
24+
# ___PRODUCT_OPTION_START___ profiling
2225

2326
# enable profiling
2427
# this is relative to traces_sample_rate
2528
config.profiles_sample_rate = 1.0
29+
# ___PRODUCT_OPTION_END___ profiling
2630
end
2731

2832
use Sentry::Rack::CaptureExceptions
@@ -37,7 +41,7 @@ be placed before your code requires Sinatra:
3741

3842
</Alert>
3943

40-
```ruby {filename:app.rb} {"onboardingOptions": {"performance": "12-15", "profiling": "16-19"}}
44+
```ruby {filename:app.rb}
4145
require 'sentry-ruby'
4246

4347
Sentry.init do |config|
@@ -49,14 +53,18 @@ Sentry.init do |config|
4953
# Add data like request headers and IP for users, if applicable;
5054
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
5155
config.send_default_pii = true
56+
# ___PRODUCT_OPTION_START___ performance
5257

5358
# enable tracing
5459
# we recommend adjusting this value in production
5560
config.traces_sample_rate = 1.0
61+
# ___PRODUCT_OPTION_END___ performance
62+
# ___PRODUCT_OPTION_START___ profiling
5663

5764
# enable profiling
5865
# this is relative to traces_sample_rate
5966
config.profiles_sample_rate = 1.0
67+
# ___PRODUCT_OPTION_END___ profiling
6068
end
6169

6270
# in a non-rackup environment you must initialize the Sentry SDK before requiring sinatra

platform-includes/getting-started-config/ruby.rails.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Initialize the SDK within your `config/initializers/sentry.rb`:
22

33

4-
```ruby {filename:config/initializers/sentry.rb} {"onboardingOptions": {"performance": "10-13", "profiling": "14-17"}}
4+
```ruby {filename:config/initializers/sentry.rb}
55
Sentry.init do |config|
66
config.dsn = '___PUBLIC_DSN___'
77

@@ -11,13 +11,17 @@ Sentry.init do |config|
1111
# Add data like request headers and IP for users, if applicable;
1212
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
1313
config.send_default_pii = true
14+
# ___PRODUCT_OPTION_START___ performance
1415

1516
# enable tracing
1617
# we recommend adjusting this value in production
1718
config.traces_sample_rate = 1.0
19+
# ___PRODUCT_OPTION_END___ performance
20+
# ___PRODUCT_OPTION_START___ profiling
1821

1922
# enable profiling
2023
# this is relative to traces_sample_rate
2124
config.profiles_sample_rate = 1.0
25+
# ___PRODUCT_OPTION_END___ profiling
2226
end
2327
```

platform-includes/getting-started-config/ruby.resque.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```ruby {"onboardingOptions": {"performance": "12-15", "profiling": "16-19"}}
1+
```ruby
22
require 'sentry-ruby'
33

44
Sentry.init do |config|
@@ -10,14 +10,18 @@ Sentry.init do |config|
1010
# Add data like request headers and IP for users, if applicable;
1111
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
1212
config.send_default_pii = true
13+
# ___PRODUCT_OPTION_START___ performance
1314

1415
# enable tracing
1516
# we recommend adjusting this value in production
1617
config.traces_sample_rate = 1.0
18+
# ___PRODUCT_OPTION_END___ performance
19+
# ___PRODUCT_OPTION_START___ profiling
1720

1821
# enable profiling
1922
# this is relative to traces_sample_rate
2023
config.profiles_sample_rate = 1.0
24+
# ___PRODUCT_OPTION_END___ profiling
2125
end
2226
```
2327

0 commit comments

Comments
 (0)