Skip to content

Commit 9c435e0

Browse files
committed
add missing options
1 parent 06c0116 commit 9c435e0

File tree

1 file changed

+84
-2
lines changed

1 file changed

+84
-2
lines changed

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

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ This option can be overridden using `in_app_include`.
8383

8484
</SdkOption>
8585

86+
<SdkOption name="server_name" type='string'>
87+
88+
The server name to be reported. When not set, the server name is not sent with events.
89+
90+
</SdkOption>
91+
92+
<SdkOption name="user_agent" type='string' defaultValue="sentry.rust/<version>">
93+
94+
The user agent that should be reported when sending events to Sentry.
95+
96+
</SdkOption>
97+
8698
<SdkOption name="before_breadcrumb" type='Fn'>
8799

88100
This function is called with a breadcrumb object before the breadcrumb is added to the scope. When `None` is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the breadcrumb itself.
@@ -91,11 +103,31 @@ This function is called with a breadcrumb object before the breadcrumb is added
91103

92104
<SdkOption name="max_request_body_size" type='MaxRequestBodySize' defaultValue='MaxRequestBodySize::Medium'>
93105

94-
This option controls the maximum size of request bodies that are sent to Sentry.
106+
This option controls the maximum size of request bodies that are sent to Sentry by HTTP server integrations.
95107
The default value of `MaxRequestBodySize::Medium` will capture request bodies up to 10kB in size.
96108

97109
</SdkOption>
98110

111+
<SdkOption name="shutdown_timeout" type='Duration' defaultValue="Duration::from_secs(2)">
112+
113+
The timeout on client drop for draining events on shutdown. This controls how long the SDK will wait for pending events to be sent when shutting down.
114+
115+
</SdkOption>
116+
117+
<SdkOption name="integrations" type="Vec<Arc<dyn Integration>>">
118+
119+
A list of integrations to enable. This allows you to manually pick and choose the integrations to enable.
120+
By default, only the default integrations are enabled.
121+
122+
</SdkOption>
123+
124+
<SdkOption name="default_integrations" type='bool' defaultValue='true'>
125+
126+
Whether to add default integrations. When set to `false`, no default integrations will be added automatically.
127+
The list of default integrations depends on the feature flags of the `sentry` crate that are active.
128+
129+
</SdkOption>
130+
99131
## Error Monitoring Options
100132

101133
<SdkOption name="sample_rate" type='f32' defaultValue='1.0'>
@@ -121,6 +153,12 @@ A number between `0.0` and `1.0`, controlling the percentage chance a given tran
121153

122154
</SdkOption>
123155

156+
<SdkOption name="traces_sampler" type='Fn'>
157+
158+
If given, called with a `SamplingContext` for each transaction to determine the sampling rate. Return a sample rate between `0.0` and `1.0` for the transaction in question. Takes priority over the `traces_sample_rate`.
159+
160+
</SdkOption>
161+
124162

125163
## Transport Options
126164

@@ -136,7 +174,51 @@ A number between `0.0` and `1.0`, controlling the percentage chance a given tran
136174

137175
</SdkOption>
138176

139-
<SdkOption name="accept_invalid_certs" type='bool' envVar='SSL_VERIFY'>
177+
<SdkOption name="accept_invalid_certs" type='bool' envVar='SSL_VERIFY' defaultValue="false">
140178
Setting this to `true` disables SSL certificate validation when sending outbound requests to Sentry. This should never be enabled when using the SDK in your real codebase or otherwise handling any kind of sensitive or personally identifiable information, as it could be exposed to potential attackers.
141179

142180
</SdkOption>
181+
182+
<SdkOption name="transport" type='Arc<dyn TransportFactory>'>
183+
184+
The transport to use to send envelopes to Sentry.
185+
This is typically either a boxed function taking the client options by reference and returning a `Transport`, a boxed `Arc<Transport>` or alternatively the `DefaultTransportFactory`.
186+
By default, the SDK uses a transport based on the `reqwest` crate running on a background thread.
187+
188+
</SdkOption>
189+
190+
## Logging Options
191+
192+
The following features and options are only available when the `logs` feature of the `sentry` crate is enabled.
193+
194+
<SdkOption name="enable_logs" type='bool' defaultValue='true'>
195+
196+
Determines whether captured structured logs should be sent to Sentry.
197+
This option is only available when the `logs` feature is enabled.
198+
199+
</SdkOption>
200+
201+
<SdkOption name="before_send_log" type='Fn'>
202+
203+
Callback that is executed for each Log being captured. When `None` is returned from the function, the log record is dropped. To pass the log record through, return the log record itself.
204+
205+
This option is only available when the `logs` feature is enabled.
206+
207+
</SdkOption>
208+
209+
210+
## Session Tracking Options
211+
212+
The following features and options are only available when the `release-health` feature of the `sentry` crate is enabled.
213+
214+
<SdkOption name="auto_session_tracking" type='bool' defaultValue='false'>
215+
216+
Enable Release Health Session tracking. When automatic session tracking is enabled, a new "user-mode" session is started at the time of `sentry::init`, and will persist for the application lifetime.
217+
218+
</SdkOption>
219+
220+
<SdkOption name="session_mode" type='SessionMode' defaultValue="SessionMode::Application">
221+
222+
Determine how Sessions are being tracked. Controls the mode for session tracking when `auto_session_tracking` is enabled.
223+
224+
</SdkOption>

0 commit comments

Comments
 (0)