From 6f2c3f76138ec3ac27592bcfd8c7dd58405f8cc7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 6 Mar 2026 14:12:03 +0100 Subject: [PATCH] docs(godot): Document adding attachments in config callback Co-Authored-By: Claude --- .../godot/enriching-events/attachments/index.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/platforms/godot/enriching-events/attachments/index.mdx b/docs/platforms/godot/enriching-events/attachments/index.mdx index 57ceb9a6bcc76..906771b6525b7 100644 --- a/docs/platforms/godot/enriching-events/attachments/index.mdx +++ b/docs/platforms/godot/enriching-events/attachments/index.mdx @@ -49,6 +49,17 @@ You can add attachments that will be sent with every event using +You can also add attachments inside the `SentrySDK.init()` configuration callback. This is useful when you want to register attachments as part of SDK setup: + +```GDScript +SentrySDK.init(func(options: SentryOptions) -> void: + # Add attachment during initialization. + var att := SentryAttachment.create_with_path("user://logs/godot.log") + att.content_type = "text/plain" + SentrySDK.add_attachment(att) +) +``` + To clear all user-added attachments, use . Built-in attachments such as log files, screenshots, and view hierarchy are preserved. ```GDScript