Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/platforms/godot/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ You can add attachments that will be sent with every event using <PlatformIdenti

<PlatformContent includePath="enriching-events/attachment-upload" />

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 <PlatformIdentifier name="SentrySDK.clear-attachments()" />. Built-in attachments such as log files, screenshots, and view hierarchy are preserved.

```GDScript
Expand Down
Loading