sentry-native icon indicating copy to clipboard operation
sentry-native copied to clipboard

feat: Support modifying attachments after init

Open Swatinem opened this issue 5 years ago • 2 comments

Moves the attachments to the scope, and adds sentry_add_attachment and sentry_remove_attachment and wstr variants that modify this attachment list after calling init. Attachments are identified by their path.

Attachments are still based on file paths and loaded lazily, this does not add support for attachments based on in-memory buffers.

Swatinem avatar Dec 01 '20 10:12 Swatinem

I'm sorry I was wrong. I think we need some more changes to this PR. In Python and Java, we have two different types of attachments reflected in the same class. An attachment can either have a byte array or a path. Each attachment also has a filename or and a content type, see

  • https://github.com/getsentry/sentry-java/blob/feat/attachments/sentry/src/main/java/io/sentry/Attachment.java
  • https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/attachments.py

In the SDK API Evolution meeting, we decided it is fine to just copy the byte array to native with the tradeoff of increasing the memory footprint.

philipphofmann avatar Dec 01 '20 15:12 philipphofmann

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Oct 18 '23 07:10 getsantry[bot]