Skip to content

Commit 5f6227e

Browse files
authored
fix(ruby): Simplify getting started configs for performance (#9461)
1 parent c34270c commit 5f6227e

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ require 'sentry-ruby'
55

66
Sentry.init do |config|
77
config.dsn = '___PUBLIC_DSN___'
8+
# enable performance monitoring
9+
config.enable_tracing = true
10+
# get breadcrumbs from logs
811
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
9-
10-
# To activate performance monitoring, set one of these options.
11-
# We recommend adjusting the value in production:
12-
config.traces_sample_rate = 1.0
13-
# or
14-
config.traces_sampler = lambda do |context|
15-
0.5
16-
end
1712
end
1813
```

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@ require 'sentry-ruby'
99

1010
Sentry.init do |config|
1111
config.dsn = '___PUBLIC_DSN___'
12+
# enable performance monitoring
13+
config.enable_tracing = true
14+
# get breadcrumbs from logs
1215
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
13-
14-
# To activate performance monitoring, set one of these options.
15-
# We recommend adjusting the value in production:
16-
config.traces_sample_rate = 1.0
17-
# or
18-
config.traces_sampler = lambda do |context|
19-
true
20-
end
2116
end
2217

2318
use Sentry::Rack::CaptureExceptions
@@ -37,6 +32,9 @@ require 'sentry-ruby'
3732

3833
Sentry.init do |config|
3934
config.dsn = '___PUBLIC_DSN___'
35+
# enable performance monitoring
36+
config.enable_tracing = true
37+
# get breadcrumbs from logs
4038
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
4139
end
4240

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ Initialize the SDK within your `config/initializers/sentry.rb`:
55
```ruby {filename:config/initializers/sentry.rb}
66
Sentry.init do |config|
77
config.dsn = '___PUBLIC_DSN___'
8+
# enable performance monitoring
9+
config.enable_tracing = true
10+
# get breadcrumbs from logs
811
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
9-
10-
# To activate performance monitoring, set one of these options.
11-
# We recommend adjusting the value in production:
12-
config.traces_sample_rate = 1.0
13-
# or
14-
config.traces_sampler = lambda do |context|
15-
true
16-
end
1712
end
1813
```

0 commit comments

Comments
 (0)