-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathSentryOptions.xml
More file actions
189 lines (189 loc) · 17.2 KB
/
Copy pathSentryOptions.xml
File metadata and controls
189 lines (189 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SentryOptions" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
Contains Sentry SDK options.
</brief_description>
<description>
Defines options for the Sentry SDK. These options can be modified in the Project Settings under the [b]Sentry[/b] category or from code through a configuration callback using manual initialization. See [method SentrySDK.init].
There are two options, that only appear in the project settings:
[b]Auto Init[/b] - Enables automatic initialization of the Sentry SDK when the game starts.
[b]Skip Auto Init on Editor Play[/b] - Prevents automatic initialization when running the game from the editor (by pressing the play button or F5).
To learn more, visit [url=https://docs.sentry.io/platforms/godot/configuration/options/]Options documentation[/url].
</description>
<tutorials>
</tutorials>
<members>
<member name="android" type="SentryAndroidOptions" setter="" getter="get_android">
Configures Android-specific options, such as ANR (Application Not Responding) detection.
</member>
<member name="app_hang_timeout_ms" type="int" setter="set_app_hang_timeout_ms" getter="get_app_hang_timeout_ms" default="5000">
Specifies the timeout duration in milliseconds after which the application is considered to have hanged. When [member enable_app_hang_tracking] is enabled, if the main thread is blocked for longer than this duration, it will be reported as an application hang event to Sentry.
</member>
<member name="app_hang_timeout_sec" type="float" setter="deprecated_set_app_hang_timeout_sec" getter="deprecated_get_app_hang_timeout_sec" default="5.0" deprecated="Use [member app_hang_timeout_ms] instead.">
Specifies the timeout duration in seconds after which the application is considered to have hanged.
</member>
<member name="app_hang_tracking" type="bool" setter="deprecated_set_app_hang_tracking" getter="deprecated_get_app_hang_tracking" default="false" deprecated="Use [member enable_app_hang_tracking] instead.">
If [code]true[/code], enables automatic detection and reporting of application hangs.
</member>
<member name="attach_log" type="bool" setter="set_attach_log" getter="is_attach_log_enabled" default="true">
If [code]true[/code], the SDK will attach the Godot log file to the event.
</member>
<member name="attach_scene_tree" type="bool" setter="set_attach_scene_tree" getter="is_attach_scene_tree_enabled" default="false">
If [code]true[/code], enables automatic capture of scene tree hierarchy data with each event.
</member>
<member name="attach_screenshot" type="bool" setter="set_attach_screenshot" getter="is_attach_screenshot_enabled" default="false">
If [code]true[/code], enables automatic screenshot capture for events meeting or exceeding the [member screenshot_level] threshold. By default, only fatal events trigger screenshots.
[b]Important[/b]: This feature is experimental and may impact performance when capturing screenshots. We recommend testing before enabling in production.
</member>
<member name="before_capture_screenshot" type="Callable" setter="set_before_capture_screenshot" getter="get_before_capture_screenshot" default="Callable()">
If assigned, this callback runs before a screenshot is captured. It takes [SentryEvent] as a parameter and returns [code]false[/code] to skip capturing the screenshot, or [code]true[/code] to capture the screenshot.
[codeblock]
func _before_capture_screenshot(event: SentryEvent) -> bool:
if is_showing_sensitive_info():
return false
return true
[/codeblock]
</member>
<member name="before_send" type="Callable" setter="set_before_send" getter="get_before_send" default="Callable()">
If assigned, this callback runs before an event is sent to Sentry. It takes [SentryEvent] as a parameter and return either the same event object, with or without modifications, or [code]null[/code] to skip reporting the event. You can assign it in a configuration callback using manual initialization (see [method SentrySDK.init]). To check if the event is a crash, use [method SentryEvent.is_crash].
[codeblock]
func _before_send(event: SentryEvent) -> SentryEvent:
if event.environment == "editor_dev_run":
# Discard event if running from the editor.
return null
if event.message.contains("Bruno"):
# Remove sensitive information from the event.
event.message = event.message.replace("Bruno", "REDACTED")
return event
[/codeblock]
To learn more, visit [url=https://docs.sentry.io/platforms/godot/configuration/filtering/]Filtering documentation[/url]. Also, check out [url=https://docs.sentry.io/platforms/godot/data-management/sensitive-data/]Scrubbing Sensitive Data[/url].
</member>
<member name="before_send_log" type="Callable" setter="set_before_send_log" getter="get_before_send_log" default="Callable()">
If assigned, this callback will be called before sending a log message to Sentry. It can be used to modify the log message or prevent it from being sent.
[codeblock]
func _before_send_log(log_entry: SentryLog) -> SentryLog:
# Filter junk.
if log_entry.body == "Junk message":
return null
# Remove sensitive information from log messages.
log_entry.body = log_entry.body.replace("Bruno", "REDACTED")
# Add custom attributes.
log_entry.set_attribute("current_scene", current_scene.name)
return log_entry
[/codeblock]
</member>
<member name="before_send_metric" type="Callable" setter="set_before_send_metric" getter="get_before_send_metric" default="Callable()">
If assigned, this callback will be called before sending a metric to Sentry. It can be used to modify the metric or prevent it from being sent.
[codeblock]
func _before_send_metric(metric: SentryMetric) -> SentryMetric:
# Drop debug-only metrics in release builds.
if not OS.is_debug_build() and metric.name.begins_with("debug."):
return null
# Enrich with runtime context.
metric.set_attribute("current_scene", get_tree().current_scene.name)
return metric
[/codeblock]
</member>
<member name="debug" type="bool" setter="set_debug_enabled" getter="is_debug_enabled" default="true">
If [code]true[/code], the SDK will print useful debugging information to standard output. These messages do not appear in the Godot console but can be seen when launching Godot from a terminal.
You can control the verbosity using the [member diagnostic_level] option.
</member>
<member name="diagnostic_level" type="int" setter="set_diagnostic_level" getter="get_diagnostic_level" enum="SentrySDK.Level" default="0">
Specifies the minimum level of messages to be printed if [member debug] is enabled.
</member>
<member name="dist" type="String" setter="set_dist" getter="get_dist" default="""">
The application's distribution. Distributions are used to disambiguate build or deployment variants of the same release of an application.
</member>
<member name="dsn" type="String" setter="set_dsn" getter="get_dsn" default="""">
Data Source Name (DSN): Specifies where the SDK should send the events. If this value is not provided, the SDK will try to read it from the [code]SENTRY_DSN[/code] environment variable. If that variable also does not exist, the SDK will just not send any events.
</member>
<member name="enable_app_hang_tracking" type="bool" setter="set_app_hang_tracking_enabled" getter="is_app_hang_tracking_enabled" default="false">
If [code]true[/code], enables automatic detection and reporting of application hangs. The SDK will monitor the main thread and report hang events when it becomes unresponsive for longer than the duration specified in [member app_hang_timeout_ms]. This helps identify performance issues where the application becomes frozen or unresponsive.
[b]Note:[/b] This feature applies to iOS and macOS only. On Android, [member android] configures ANR (Application Not Responding) detection instead.
</member>
<member name="enable_logs" type="bool" setter="set_enable_logs" getter="get_enable_logs" default="true">
Enables Sentry's structured logging. If [code]true[/code], log entries can be emitted through [member SentrySDK.logger], and Godot logger events listed in [member SentryGodotLoggerOptions.log_mask] are automatically captured as Sentry Logs. [member SentryGodotLoggerOptions.log_mask] is empty by default, so no events are auto-captured.
See [member godot_logger] for options to capture Godot errors as Sentry events or breadcrumbs.
For more information, see [url=https://docs.sentry.io/platforms/godot/logs/]Sentry Logs[/url] documentation.
</member>
<member name="enable_metrics" type="bool" setter="set_enable_metrics" getter="get_enable_metrics" default="true">
Enables Sentry metrics functionality. When enabled, you can emit custom metrics using the [SentryMetrics] API available through [member SentrySDK.metrics].
</member>
<member name="environment" type="String" setter="set_environment" getter="get_environment" default=""{auto}"">
Environments indicate where an error occurred, such as in a release export, headless server, QA build, or another deployment. The SDK automatically detects Godot-specific environments, such as [code]headless_server[/code] and [code]export_release[/code], but you can also assign it in a configuration callback using manual initialization (see [method SentrySDK.init]).
This option defaults to [code]{auto}[/code], which automatically detects the environment based on the current runtime context and sets it to one of the following values: [code]editor_dev[/code], [code]editor_dev_run[/code], [code]export_debug[/code], [code]export_release[/code], or [code]dedicated_server[/code].
To learn more, visit [url=https://docs.sentry.io/platforms/godot/configuration/environments/]Environments documentation[/url].
</member>
<member name="experimental" type="SentryExperimental" setter="" getter="get_experimental">
Configures experimental features. Use this to enable and configure features that are not yet stable or generally available in Sentry.
</member>
<member name="godot_logger" type="SentryGodotLoggerOptions" setter="" getter="get_godot_logger">
Configures the capture of Godot errors and log messages as Sentry events, breadcrumbs, and logs. See [SentryGodotLoggerOptions].
</member>
<member name="logger_breadcrumb_mask" type="int" setter="deprecated_set_logger_breadcrumb_mask" getter="deprecated_get_logger_breadcrumb_mask" enum="SentryOptions.GodotLoggerEventMask" is_bitfield="true" default="143" deprecated="Use [member SentryGodotLoggerOptions.breadcrumb_mask] instead.">
Specifies the Godot logger events that are automatically captured as Sentry breadcrumbs. Accepts a single value or a bitwise combination of [enum GodotLoggerEventMask] masks.
</member>
<member name="logger_enabled" type="bool" setter="deprecated_set_logger_enabled" getter="deprecated_is_logger_enabled" default="true" deprecated="Use [member SentryGodotLoggerOptions.enabled] instead.">
If [code]true[/code], the SDK will capture logged errors as events, logs and/or breadcrumbs, as defined by [member logger_event_mask] and [member logger_breadcrumb_mask]. Crashes are always captured. See also [member enable_logs].
</member>
<member name="logger_event_mask" type="int" setter="deprecated_set_logger_event_mask" getter="deprecated_get_logger_event_mask" enum="SentryOptions.GodotLoggerEventMask" is_bitfield="true" default="13" deprecated="Use [member SentryGodotLoggerOptions.event_mask] instead.">
Specifies the Godot logger events that are automatically captured as Sentry events. Accepts a single value or a bitwise combination of [enum GodotLoggerEventMask] masks.
[b]Note:[/b] [code]MASK_MESSAGE[/code] has no effect here. To capture log messages, set it in [member logger_log_mask] and/or [member logger_breadcrumb_mask] instead.
</member>
<member name="logger_include_source" type="bool" setter="deprecated_set_logger_include_source" getter="deprecated_is_logger_include_source_enabled" default="true" deprecated="Use [member SentryGodotLoggerOptions.include_source_context] instead.">
If [code]true[/code], the SDK will include the surrounding source code of logged errors, if available in the exported project.
</member>
<member name="logger_include_variables" type="bool" setter="deprecated_set_logger_include_variables" getter="deprecated_is_logger_include_variables_enabled" default="false" deprecated="Use [member SentryGodotLoggerOptions.include_variables] instead.">
If [code]true[/code], 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 [member ProjectSettings.debug/settings/gdscript/always_track_local_variables].
[b]Note:[/b] Enabling this option may impact performance, especially for applications with frequent errors or deep call stacks.
</member>
<member name="logger_limits" type="SentryLoggerLimits" setter="deprecated_set_logger_limits" getter="deprecated_get_logger_limits" deprecated="Use [member SentryGodotLoggerOptions.limits] instead.">
Defines throttling limits for the error logger. These limits are used to prevent the SDK from sending too many non-critical and repeating error events. See [SentryLoggerLimits].
</member>
<member name="logger_log_mask" type="int" setter="deprecated_set_logger_log_mask" getter="deprecated_get_logger_log_mask" enum="SentryOptions.GodotLoggerEventMask" is_bitfield="true" default="0" deprecated="Use [member SentryGodotLoggerOptions.log_mask] instead.">
Specifies the Godot logger events that are automatically captured as Sentry logs. Accepts a single value or a bitwise combination of [enum GodotLoggerEventMask] masks.
</member>
<member name="logger_messages_as_breadcrumbs" type="bool" setter="deprecated_set_logger_messages_as_breadcrumbs" getter="deprecated_is_logger_messages_as_breadcrumbs_enabled" default="true" deprecated="Set the [code]MASK_MESSAGE[/code] flag in [member SentryGodotLoggerOptions.breadcrumb_mask] instead.">
If [code]true[/code], the SDK will capture log messages (such as [code]print()[/code] statements) as breadcrumbs along with events.
</member>
<member name="max_breadcrumbs" type="int" setter="set_max_breadcrumbs" getter="get_max_breadcrumbs" default="100">
Maximum number of breadcrumbs to send with an event. You should be aware that Sentry has a maximum payload size and any events exceeding that payload size will be dropped.
</member>
<member name="release" type="String" setter="set_release" getter="get_release" default=""{app_name}@{app_version}"">
Release version of the application. This value must be unique across all projects in your organization. Suggested format is [code]my-game@1.0.0[/code].
You can use the [code]{app_name}[/code] and [code]{app_version}[/code] placeholders to insert the application name and version from the Project Settings.
</member>
<member name="sample_rate" type="float" setter="set_sample_rate" getter="get_sample_rate" default="1.0">
Configures the sample rate for error events, in the range of 0.0 to 1.0. The default is 1.0, which means that 100% of error events will be sent. If set to 0.1, only 10% of error events will be sent. Events are picked randomly.
</member>
<member name="screenshot_level" type="int" setter="set_screenshot_level" getter="get_screenshot_level" enum="SentrySDK.Level" default="4">
Specifies the minimum level of events for which screenshots will be captured. By default, screenshots are captured for fatal events. Changing this option may impact performance in the frames the screenshots are taken.
</member>
<member name="send_default_pii" type="bool" setter="set_send_default_pii" getter="is_send_default_pii_enabled" default="false">
If [code]true[/code], the SDK will include PII (Personally Identifiable Information) with the events.
</member>
<member name="shutdown_timeout_ms" type="int" setter="set_shutdown_timeout_ms" getter="get_shutdown_timeout_ms" default="2000">
The maximum time in milliseconds the SDK will wait for pending events to be sent when [method SentrySDK.close] is called. If the timeout expires, the SDK will perform a forced shutdown and any unsent events may be lost.
</member>
</members>
<constants>
<constant name="MASK_NONE" value="0" enum="GodotLoggerEventMask" is_bitfield="true">
No logger errors or messages will be captured.
</constant>
<constant name="MASK_ERROR" value="1" enum="GodotLoggerEventMask" is_bitfield="true">
Native (C++) and engine errors, which may also originate from a script.
</constant>
<constant name="MASK_WARNING" value="2" enum="GodotLoggerEventMask" is_bitfield="true">
Warnings.
</constant>
<constant name="MASK_SCRIPT" value="4" enum="GodotLoggerEventMask" is_bitfield="true">
Script errors.
</constant>
<constant name="MASK_SHADER" value="8" enum="GodotLoggerEventMask" is_bitfield="true">
Shader errors.
</constant>
<constant name="MASK_MESSAGE" value="128" enum="GodotLoggerEventMask" is_bitfield="true">
Log messages such as [code]print()[/code] statements.
</constant>
</constants>
</class>