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