Skip to content

Commit 0418305

Browse files
authored
feat(ruby): Add all missing ruby options (#12981)
1 parent 1b948d0 commit 0418305

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

docs/platforms/ruby/common/configuration/options.mdx

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ Whether to capture local variables from the raised exceptions frame. (In older v
101101

102102
</SdkOption>
103103

104+
<SdkOption name="auto_session_tracking" type="Boolean" defaultValue="true">
105+
106+
Track sessions in request/response cycles automatically.
107+
108+
</SdkOption>
109+
104110
<SdkOption name="max_breadcrumbs" type="Integer" defaultValue="100">
105111

106112
The maximum number of breadcrumbs the SDK could hold.
@@ -130,12 +136,24 @@ config.breadcrumbs_logger = [:active_support_logger, :http_logger]
130136

131137
</SdkOption>
132138

139+
<SdkOption name="exclude_loggers" type="Array<String>" defaultValue="[]">
140+
141+
Logger names to exclude from breadcrumbs.
142+
143+
</SdkOption>
144+
133145
<SdkOption name="context_lines" type="Integer" defaultValue="3">
134146

135147
How many lines to display before/after the line where issue occurs.
136148

137149
</SdkOption>
138150

151+
<SdkOption name="linecache" type="Sentry::LineCache">
152+
153+
You may provide your own `LineCache` for matching paths with source files to populate `context_lines`. This may be useful if you need to get source code from places other than the disk.
154+
155+
</SdkOption>
156+
139157
<SdkOption name="environment" type="String" defaultValue="development">
140158

141159
Sets the environment. This string is freeform and not set by default. A release can be associated with more than one environment so that you can separate them in the UI (think `staging` vs `prod` or similar).
@@ -196,12 +214,44 @@ config.enabled_patches.delete(:puma)
196214

197215
</SdkOption>
198216

217+
<SdkOption name="project_root" type="String" defaultValue="Dir.pwd">
218+
219+
Project directory root for `in_app` detection. Set to `Rails.root` for Rails applications.
220+
221+
</SdkOption>
222+
223+
<SdkOption name="app_dirs_pattern" type="Regexp" defaultValue="/(bin|exe|app|config|lib|test|spec)/">
224+
225+
Directories to be recognized as `in_app` in backtrace frames.
226+
227+
</SdkOption>
228+
229+
<SdkOption name="strip_backtrace_load_path" type="Boolean" defaultValue="true">
230+
231+
Whether to strip the load path while constructing the backtrace frame filename.
232+
233+
</SdkOption>
234+
199235
<SdkOption name="skip_rake_integration" type="Boolean" defaultValue="false">
200236

201237
Determine whether to ignore exceptions caused by rake integrations.
202238

203239
</SdkOption>
204240

241+
<SdkOption name="rack_env_whitelist" type="Array<String>" defaultValue='["REMOTE_ADDR", "SERVER_NAME", "SERVER_PORT"]'>
242+
243+
Array of rack env parameters to be included in the event sent to sentry.
244+
245+
</SdkOption>
246+
247+
<SdkOption name="server_name" type="String">
248+
249+
This option can be used to supply a server name sent in the event payload.
250+
251+
If running on Heroku, it is set to `ENV["DYNO"]` otherwise set to `Socket.gethostname`.
252+
253+
</SdkOption>
254+
205255
<SdkOption name="trusted_proxies" type="Array">
206256

207257
These trusted proxies will be skipped when the SDK computes the user's ip address and `sentry-rails` will automatically inject the value of `Rails.application.config.action_dispatch.trusted_proxies` to this option.
@@ -264,6 +314,12 @@ config.propagate_traces = false
264314

265315
</SdkOption>
266316

317+
<SdkOption name="instrumenter" type="Symbol" defaultValue=":sentry">
318+
319+
The instrumenter to use, `:sentry` or `:otel` for [use with OpenTelemetry](../../tracing/instrumentation/opentelemetry).
320+
321+
</SdkOption>
322+
267323
## Hooks
268324

269325
The below options can be used to hook the SDK in various ways and customize how events are being reported.
@@ -300,6 +356,15 @@ end
300356

301357
</SdkOption>
302358

359+
<SdkOption name="before_breadcrumb" type="lambda | proc">
360+
361+
This function is called with an SDK-specific breadcrumb object before the breadcrumb is added to the scope. When `nil` is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object.
362+
The callback typically gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like.
363+
364+
<PlatformContent includePath="enriching-events/breadcrumbs/before-breadcrumb/" />
365+
366+
</SdkOption>
367+
303368
## Transport Options
304369

305370
<SdkOption name="background_worker_threads" type="Integer">
@@ -318,6 +383,12 @@ config.background_worker_threads = 0
318383

319384
</SdkOption>
320385

386+
<SdkOption name="background_worker_max_queue" type="Integer" defaultValue="30">
387+
388+
The maximum queue size for the background worker. Jobs will be rejected above this limit.
389+
390+
</SdkOption>
391+
321392
<SdkOption name="transport_class" type="class" defaultValue="Sentry::HTTPTransport">
322393

323394
By default, the SDK uses the `Sentry::HTTPTransport` class for sending events to Sentry, which should work for the majority of users. But if you want to use your own Transport class, you can change it with this option:
@@ -354,3 +425,63 @@ end
354425
```
355426

356427
</SdkOption>
428+
429+
<SdkOption name="spotlight" type="Boolean | String" defaultValue="false">
430+
431+
Whether to also capture events and traces into [Spotlight](https://spotlightjs.com/setup/other/).
432+
433+
If you set this to true, Sentry will send events and traces to the local Sidecar proxy at `http://localhost:8969/stream`.
434+
435+
If you want to use a different Sidecar proxy address, set this to String with the proxy URL.
436+
437+
</SdkOption>
438+
439+
## Cron Options
440+
441+
<SdkOption name="default_checkin_margin" type="Integer" defaultValue="nil">
442+
443+
How long (in minutes) after the expected checkin time we will wait until we consider the checkin to have been missed.
444+
445+
```ruby
446+
config.cron.default_checkin_margin = 5
447+
```
448+
449+
</SdkOption>
450+
451+
<SdkOption name="default_max_runtime" type="Integer" defaultValue="nil">
452+
453+
How long (in minutes) is the checkin allowed to be `in_progress` before it is considered failed.
454+
455+
```ruby
456+
config.cron.default_max_runtime = 30
457+
```
458+
459+
</SdkOption>
460+
461+
<SdkOption name="default_timezone" type="String" defaultValue="nil">
462+
463+
Database style timezone string for checkins.
464+
465+
```ruby
466+
config.cron.default_timezone = "America/New_York"
467+
```
468+
469+
</SdkOption>
470+
471+
## Profiler Options
472+
473+
<SdkOption name="profiles_sample_rate" type="Float" defaultValue="nil">
474+
475+
A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all profiles created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled.
476+
477+
</SdkOption>
478+
479+
<SdkOption name="profiler_class" type="Class" defaultValue="Sentry::Profiler">
480+
481+
The profiler to use for collecting profiles.
482+
483+
Set to `Sentry::Vernier::Profiler` when using `vernier` and `Sentry::Profiler` when using `stackprof`.
484+
485+
See [the Profiling documentation](../../profiling) for setup instructions.
486+
487+
</SdkOption>

0 commit comments

Comments
 (0)