Skip to content

Commit bf1f6ee

Browse files
sfanahataShannon Anahatalimbonaut
authored
Adding defaults for Godot options (#15216)
## DESCRIBE YOUR PR Adding missing options since changing over SDKoption for all option formatting. Preview: https://sentry-docs-git-godot-options-updates.sentry.dev/platforms/godot/configuration/options/ ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Shannon Anahata <[email protected]> Co-authored-by: Serhii Snitsaruk <[email protected]>
1 parent 672d66d commit bf1f6ee

File tree

1 file changed

+38
-22
lines changed

1 file changed

+38
-22
lines changed

docs/platforms/godot/configuration/options.mdx

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Learn more about [DSN utilization](/product/sentry-basics/dsn-explainer/#dsn-uti
2424

2525
</SdkOption>
2626

27-
<SdkOption name="debug" type="bool">
27+
<SdkOption name="debug" type="bool" defaultValue="false">
2828

2929
Turns debug mode on or off. If `debug` is enabled, the SDK will print useful debugging information. You can see it in the Output panel of the Godot editor. It's generally not recommended to turn it on in production, though turning `debug` mode on will not cause any safety concerns.
3030

@@ -34,9 +34,9 @@ You can control the verbosity using the `diagnostic_level` option.
3434

3535
</SdkOption>
3636

37-
<SdkOption name="diagnostic_level" type="enum">
37+
<SdkOption name="diagnostic_level" type="SentrySDK.Level" defaultValue="LEVEL_DEBUG">
3838

39-
Specifies the minimum level of messages to be printed if `debug` is turned on.
39+
Specifies the minimum level of messages to be printed if `debug` is turned on. Possible values are: `LEVEL_DEBUG`, `LEVEL_INFO`, `LEVEL_WARNING`, `LEVEL_ERROR`, and `LEVEL_FATAL`.
4040

4141
</SdkOption>
4242

@@ -82,16 +82,18 @@ This option is disabled by default. If you enable this option, be sure to manual
8282

8383
</SdkOption>
8484

85-
<SdkOption name="attach_log" type="bool">
85+
<SdkOption name="attach_log" type="bool" defaultValue="true">
8686

8787
If enabled, the SDK will attach the Godot log file to the event.
8888

8989
</SdkOption>
9090

91-
<SdkOption name="attach_screenshot" type="bool">
91+
<SdkOption name="attach_screenshot" type="bool" defaultValue="false">
9292

9393
If enabled, the SDK will try to take a screenshot and attach it to the event.
9494

95+
This option is turned off by default.
96+
9597
<Alert level="warning" title="Important">
9698

9799
This feature is experimental and may impact performance when capturing screenshots. We recommend testing before enabling in production.
@@ -100,9 +102,9 @@ This feature is experimental and may impact performance when capturing screensho
100102

101103
</SdkOption>
102104

103-
<SdkOption name="screenshot_level" type="enum">
105+
<SdkOption name="screenshot_level" type="SentrySDK.Level" defaultValue="LEVEL_FATAL">
104106

105-
Specifies the minimum level of events for which screenshots will be captured. By default, screenshots are captured for fatal events.
107+
Specifies the minimum level of events for which screenshots will be captured. Possible values are: `LEVEL_DEBUG`, `LEVEL_INFO`, `LEVEL_WARNING`, `LEVEL_ERROR`, and `LEVEL_FATAL`.
106108

107109
<Alert title="Note">
108110

@@ -112,42 +114,50 @@ Changing this option may impact performance in the frames the screenshots are ta
112114

113115
</SdkOption>
114116

115-
<SdkOption name="attach_scene_tree" type="bool">
117+
<SdkOption name="attach_scene_tree" type="bool" defaultValue="false">
116118

117119
If enabled, the SDK will capture and attach scene tree information to events. The scene tree data is attached as a `view-hierarchy.json` file, and you can explore it in the "Scene Tree" section of each issue that includes this attachment. This provides valuable context about your game's scene tree at the time of the error. See <PlatformLink to="/enriching-events/view-hierarchy/">Scene Tree</PlatformLink> for more details.
118120

121+
This option is turned off by default.
122+
119123
</SdkOption>
120124

121125
## GUI-only Options
122126

123127
These options are only available in the **Project Settings** window.
124128

125-
<SdkOption name="auto_init" type="bool">
129+
<SdkOption name="auto_init" type="bool" defaultValue="true">
126130

127131
Enables automatic SDK initialization when the game starts.
128132
The SDK initializes as early as possible in the lifecycle — before scenes are loaded or any scripts are executed.
129133

134+
This option is turned on by default.
135+
130136
</SdkOption>
131137

132-
<SdkOption name="skip_auto_init_on_editor_play" type="bool">
138+
<SdkOption name="skip_auto_init_on_editor_play" type="bool" defaultValue="true">
133139

134140
Prevents automatic initialization when running the game from the editor
135141
(for example, by pressing the play button or **F5**).
136142
This setting only applies if **Auto Init** is enabled.
137143

144+
This option is turned on by default.
145+
138146
</SdkOption>
139147

140148
## Error Logger Options
141149

142-
<SdkOption name="logger_enabled" type="bool">
150+
<SdkOption name="logger_enabled" type="bool" defaultValue="true">
143151

144152
If `true`, the SDK will capture logged errors as events and/or breadcrumbs, as defined by `logger_event_mask` and `logger_breadcrumb_mask` options. Crashes are always captured.
145153

154+
This option is turned on by default.
155+
146156
</SdkOption>
147157

148-
<SdkOption name="logger_breadcrumb_mask" type="int">
158+
<SdkOption name="logger_breadcrumb_mask" type="int" defaultValue="7">
149159

150-
Specifies the types of errors captured as breadcrumbs. Accepts a single value or a bitwise combination of `GodotErrorMask` masks.
160+
Specifies the types of errors captured as breadcrumbs. Accepts a single value or a bitwise combination of `GodotErrorMask` masks. The default value captures nativer errors, warnings, script and shader errors (`MASK_ERROR | MASK_WARNING | MASK_SCRIPT | MASK_SHADER`).
151161

152162
`GodotErrorMask` values:
153163
- `MASK_NONE`: No logger errors will be captured.
@@ -163,9 +173,9 @@ options.logger_breadcrumb_mask = mask
163173

164174
</SdkOption>
165175

166-
<SdkOption name="logger_event_mask" type="int">
176+
<SdkOption name="logger_event_mask" type="int" defaultValue="5">
167177

168-
Specifies the types of errors captured as events. Accepts a single value or a bitwise combination of `GodotErrorMask` masks.
178+
Specifies the types of errors captured as events. Accepts a single value or a bitwise combination of `GodotErrorMask` masks. The default value captures native, script and shader errors (`MASK_ERROR | MASK_SCRIPT` | `MASK_SHADER`).
169179

170180
```GDScript
171181
var mask = SentryOptions.MASK_ERROR | SentryOptions.MASK_SCRIPT
@@ -174,16 +184,20 @@ options.logger_event_mask = mask
174184

175185
</SdkOption>
176186

177-
<SdkOption name="logger_include_source" type="bool">
187+
<SdkOption name="logger_include_source" type="bool" defaultValue="true">
178188

179189
If `true`, the SDK will include the surrounding source code of logged errors, if available in the exported project.
180190

191+
This option is turned on by default.
192+
181193
</SdkOption>
182194

183-
<SdkOption name="logger_include_variables" type="bool">
195+
<SdkOption name="logger_include_variables" type="bool" defaultValue="true">
184196

185197
If `true`, the SDK will include local variables from stack traces when capturing script errors. This allows showing the values of variables at each frame in the call stack. Requires enabling **Debug -> Settings -> GDScript -> Always Track Local Variables** in the **Project Settings**.
186198

199+
This option is turned on by default.
200+
187201
<Alert title="Note">
188202

189203
Enabling this option may impact performance, especially for applications with frequent errors or deep call stacks.
@@ -192,10 +206,12 @@ Enabling this option may impact performance, especially for applications with fr
192206

193207
</SdkOption>
194208

195-
<SdkOption name="logger_messages_as_breadcrumbs" type="bool">
209+
<SdkOption name="logger_messages_as_breadcrumbs" type="bool" defaultValue="true">
196210

197211
If `true`, the SDK will capture log messages (such as `print()` statements) as breadcrumbs along with events.
198212

213+
This option is turned on by default.
214+
199215
</SdkOption>
200216

201217
<SdkOption name="logger_limits" type="object">
@@ -204,13 +220,13 @@ Defines throttling limits for the error logger. These limits are used to prevent
204220

205221
This option contains multiple properties that govern the behavior of throttling. The following paragraphs explain each of those properties in detail.
206222

207-
`events_per_frame` specifies the maximum number of error events to send per processed frame. If exceeded, no further errors will be captured until the next frame. This serves as a safety measure to prevent the SDK from overloading a single frame.
223+
`events_per_frame` specifies the maximum number of error events to send per processed frame. If exceeded, no further errors will be captured until the next frame. This serves as a safety measure to prevent the SDK from overloading a single frame. Default: `5`.
208224

209-
`repeated_error_window_ms` specifies the minimum time interval in milliseconds between two identical errors. If exceeded, no further errors from the same line of code with the identical message will be captured until the next interval. Set it to `0` to disable this limit.
225+
`repeated_error_window_ms` specifies the minimum time interval in milliseconds between two identical errors. If exceeded, no further errors from the same line of code with the identical message will be captured until the next interval. Set it to `0` to disable this limit. Default: `1000`.
210226

211-
`throttle_events` specifies the maximum number of events allowed within a sliding time window of `throttle_window_ms` milliseconds. If exceeded, errors will be captured as breadcrumbs only until capacity is freed.
227+
`throttle_events` specifies the maximum number of events allowed within a sliding time window of `throttle_window_ms` milliseconds. If exceeded, errors will be captured as breadcrumbs only until capacity is freed. Default: `10`.
212228

213-
`throttle_window_ms` specifies the time window in milliseconds for `throttle_events`. Set it to `0` to disable this limit.
229+
`throttle_window_ms` specifies the time window in milliseconds for `throttle_events`. Set it to `0` to disable this limit. Default: `10000`.
214230

215231
</SdkOption>
216232

0 commit comments

Comments
 (0)