From 2217909a4f7e12209236ddcb2af96a6d7dc6bc71 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 14:31:36 +0100 Subject: [PATCH 01/10] Remove experimental status from Godot log options --- platform-includes/logs/options/godot.mdx | 4 ++-- platform-includes/logs/setup/godot.mdx | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/platform-includes/logs/options/godot.mdx b/platform-includes/logs/options/godot.mdx index 273f9c9edfd23..90553463ea8b4 100644 --- a/platform-includes/logs/options/godot.mdx +++ b/platform-includes/logs/options/godot.mdx @@ -4,8 +4,8 @@ To filter logs, or update them before they are sent to Sentry, you can use the ` ```GDScript SentrySDK.init(func(options: SentryOptions) -> void: - options.experimental.enable_logs = true - options.experimental.before_send_log = _before_send_log + options.enable_logs = true + options.before_send_log = _before_send_log ) func _before_send_log(log_entry: SentryLog) -> SentryLog: diff --git a/platform-includes/logs/setup/godot.mdx b/platform-includes/logs/setup/godot.mdx index 1a9734f05d4bc..9099c69f257fa 100644 --- a/platform-includes/logs/setup/godot.mdx +++ b/platform-includes/logs/setup/godot.mdx @@ -2,15 +2,14 @@ To enable logging in your Godot project, you need to configure the Sentry SDK wi ### Project Settings Configuration -1. Open **Project Settings** in Godot, and navigate to **Sentry > Experimental**. -2. Turn on the **Enable Logs** option. +The SDK enables logs by default. To modify this setting, navigate to **Project Settings** in Godot, then go to **Sentry > Options** and adjust the **Enable Logs** option as needed. ### Programmatic Configuration -Alternatively, you can enable logs programmatically when initializing the SDK: +The SDK enables logs by default. If needed, you can disable logs programmatically when initializing the SDK: ```GDScript SentrySDK.init(func(options: SentryOptions) -> void: - options.experimental.enable_logs = true + options.enable_logs = false ) ``` From 49027faa570e7a3ed83930783b43c263fcb76b72 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 14:47:49 +0100 Subject: [PATCH 02/10] Add Log options --- .../platforms/godot/configuration/options.mdx | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index 95d057c34afa8..e979ea8c80719 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -163,7 +163,18 @@ This option is turned on by default. -## Error Logger Options +## Logging Options + + + +If `true`, enables Sentry structured logs functionality, allowing you to use dedicated logging APIs through +`SentrySDK.logger`, and Godot's built-in log messages are automatically captured and sent to Sentry Logs. +Use `logger_enabled` and other `logger_*` options to control how Godot's error messages and log output +(including `print()` statements) are captured and processed by Sentry. + + + +## Godot Logger Options @@ -255,7 +266,7 @@ These options can be used to hook the SDK in various ways to customize the repor The callbacks you set as hooks will be called on the thread where the event happened. So you can only use thread-safe APIs and only use Godot-specific APIs after you've checked that you're on the main thread. - + If assigned, this callback runs before an event is sent to Sentry. You can only set it [programmatically](#programmatic-configuration). It takes `SentryEvent` as a parameter and returns either the same event object, with or without modifications, or `null` to skip reporting the event. This can be used, for instance, for stripping PII before sending. @@ -274,7 +285,7 @@ func _before_send(event: SentryEvent) -> SentryEvent: - + If assigned, this callback runs before a screenshot is captured. You can only set it [programmatically](#programmatic-configuration). It takes `SentryEvent` as a parameter and returns `false` to skip capturing the screenshot, or `true` to capture the screenshot. @@ -286,3 +297,22 @@ func _before_capture_screenshot(event: SentryEvent) -> bool: ``` + + + +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. + +```GDScript +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 +``` + + From 1f1fbf56ab2e0a0cb2e2e50a27d2b22c26862dea Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 14:50:36 +0100 Subject: [PATCH 03/10] Update godot.mdx --- platform-includes/logs/setup/godot.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform-includes/logs/setup/godot.mdx b/platform-includes/logs/setup/godot.mdx index 9099c69f257fa..d3a555bc66f75 100644 --- a/platform-includes/logs/setup/godot.mdx +++ b/platform-includes/logs/setup/godot.mdx @@ -2,11 +2,11 @@ To enable logging in your Godot project, you need to configure the Sentry SDK wi ### Project Settings Configuration -The SDK enables logs by default. To modify this setting, navigate to **Project Settings** in Godot, then go to **Sentry > Options** and adjust the **Enable Logs** option as needed. +Structured logs are enabled by default. If you want to modify this setting, navigate to **Project Settings** in Godot, then go to **Sentry > Options** and adjust the **Enable Logs** option as needed. ### Programmatic Configuration -The SDK enables logs by default. If needed, you can disable logs programmatically when initializing the SDK: +Structured logs are enabled by default. If needed, you can disable logs programmatically when initializing the SDK: ```GDScript SentrySDK.init(func(options: SentryOptions) -> void: From 6cf5cac4d4de0398064a4c20e5c1b309617b83a6 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 17:41:38 +0100 Subject: [PATCH 04/10] Apply suggestions --- docs/platforms/godot/configuration/options.mdx | 2 +- platform-includes/logs/requirements/godot.mdx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index e979ea8c80719..6dfeb376e425f 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -180,7 +180,7 @@ Use `logger_enabled` and other `logger_*` options to control how Godot's error m 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. -This option is turned on by default. +Supported from version `1.1.0` and above, this option is turned on by default starting with version `1.2.0`. diff --git a/platform-includes/logs/requirements/godot.mdx b/platform-includes/logs/requirements/godot.mdx index 7537475250dfc..cd69c7756effb 100644 --- a/platform-includes/logs/requirements/godot.mdx +++ b/platform-includes/logs/requirements/godot.mdx @@ -1 +1,2 @@ Logs for Godot Engine are supported in Sentry Godot SDK version `1.1.0` and above. +Starting with version `1.2.0`, the feature is enabled by default. From f7446dbf9886ea7b0c359ed84a701a7e8a257254 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 17:44:42 +0100 Subject: [PATCH 05/10] Rephrase --- docs/platforms/godot/configuration/options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index 6dfeb376e425f..767ec3c6b8539 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -180,7 +180,7 @@ Use `logger_enabled` and other `logger_*` options to control how Godot's error m 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. -Supported from version `1.1.0` and above, this option is turned on by default starting with version `1.2.0`. +Logs are supported from version `1.1.0` and above, and enabled by default from version `1.2.0`. From d91b15baf1973bfca9aaa66d9f6fe412dfe907ab Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 17:51:37 +0100 Subject: [PATCH 06/10] Corrections --- docs/platforms/godot/configuration/options.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index 767ec3c6b8539..ab45a8b3218a0 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -165,13 +165,15 @@ This option is turned on by default. ## Logging Options - + If `true`, enables Sentry structured logs functionality, allowing you to use dedicated logging APIs through `SentrySDK.logger`, and Godot's built-in log messages are automatically captured and sent to Sentry Logs. Use `logger_enabled` and other `logger_*` options to control how Godot's error messages and log output (including `print()` statements) are captured and processed by Sentry. +This option is turned on by default. + ## Godot Logger Options @@ -180,7 +182,7 @@ Use `logger_enabled` and other `logger_*` options to control how Godot's error m 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. -Logs are supported from version `1.1.0` and above, and enabled by default from version `1.2.0`. +This option is turned on by default. From 86796b6f8ec6e68f4f1fb0964cee4b390dbb9597 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 17:55:33 +0100 Subject: [PATCH 07/10] Clarify requirements section --- platform-includes/logs/requirements/godot.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/logs/requirements/godot.mdx b/platform-includes/logs/requirements/godot.mdx index cd69c7756effb..4c8cbbf440938 100644 --- a/platform-includes/logs/requirements/godot.mdx +++ b/platform-includes/logs/requirements/godot.mdx @@ -1,2 +1,2 @@ Logs for Godot Engine are supported in Sentry Godot SDK version `1.1.0` and above. -Starting with version `1.2.0`, the feature is enabled by default. +Starting with version `1.2.0`, the feature is generally available and enabled by default. From 0699b2af4b170a636e6dfe3640d9b9df59bc953a Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 18:00:28 +0100 Subject: [PATCH 08/10] Update `logger_enabled` option --- docs/platforms/godot/configuration/options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index ab45a8b3218a0..aacf78a3d93cc 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -180,7 +180,7 @@ This option is turned on by default. -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. +If `true`, the SDK will capture logged errors as events, logs and/or breadcrumbs, as defined by `logger_event_mask` and `logger_breadcrumb_mask` options. Crashes are always captured. See also `enable_logs` option. This option is turned on by default. From 04c105a71c15a5806bcfb6a813acdcf4e2408d8f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 19:25:18 +0100 Subject: [PATCH 09/10] Add availableSince tag to before_send_log --- docs/platforms/godot/configuration/options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/godot/configuration/options.mdx b/docs/platforms/godot/configuration/options.mdx index aacf78a3d93cc..1184947ce9c18 100644 --- a/docs/platforms/godot/configuration/options.mdx +++ b/docs/platforms/godot/configuration/options.mdx @@ -300,7 +300,7 @@ func _before_capture_screenshot(event: SentryEvent) -> bool: - + 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. From ace9472af94b3a0a5c60ed560328099032b2ce0c Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 19:43:53 +0100 Subject: [PATCH 10/10] Add to features replacing breadcrumbs in the same area --- platform-includes/getting-started-primer/godot.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-primer/godot.mdx b/platform-includes/getting-started-primer/godot.mdx index e5332a7ce0192..68574fae848c2 100644 --- a/platform-includes/getting-started-primer/godot.mdx +++ b/platform-includes/getting-started-primer/godot.mdx @@ -10,7 +10,7 @@ Our SDK for Godot Engine builds on top of existing Sentry SDKs, extending them w - Automatically capture Godot runtime errors, such as script and shader errors - GDScript stack traces with optional [local and member variable](/platforms/godot/configuration/options/#logger_include_variables) information - Include surrounding script source code with events when available at runtime -- Automatic breadcrumbs for console output, such as `print()` statements +- [Structured Logs](/platforms/godot/logs/) that automatically capture console output like `print()` statements and connect to your traces with searchable attributes - [Enrich events](/platforms/godot/enriching-events/) with tags, breadcrumbs, contexts, and attachments - Information about user configuration like GPU, CPU, platform and such - [Filter and customize events](/platforms/godot/data-management/sensitive-data/#scrubbing-data) in `before_send` callback (in GDScript)