Replies: 1 comment
-
Hi @fajpunk, You can add an attachments just like in JavaScript! import sentry_sdk
from sentry_sdk.types import Event, Hint
from sentry_sdk.attachments import Attachment
def before_send(event: Event, hint: Hint):
hint["attachments"] = [Attachment(bytes=b"Hello World!", filename="attachment.txt")]
return event
sentry_sdk.init(
...
before_send=before_send,
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I add an attachment in a
before_send
handler? It looks like this is possible in the JS SDK:https://docs.sentry.io/platforms/javascript/enriching-events/attachments/#add-or-modify-attachments-before-sending
Beta Was this translation helpful? Give feedback.
All reactions