Breaking / Important behavior changes:
- Attachment APIs now use
sentry_value_tandsentry_uuid_tinstead ofsentry_attachment_t *handles. Most attachment APIs, function names and arguments, are otherwise unchanged. (#1974) sentry_init()now consumes<db>/last_crashafter caching its value, aligning crashed-last-run behavior with other Sentry SDKs. (#2023)- Change the
hintparameter ofbefore_sendcallbacks (sentry_event_function_t) fromvoid *tosentry_hint_t *. Update callbacks registered withsentry_options_set_before_sendto use the new parameter type. (#2099) - Add a
sentry_hint_t *hintargument toon_crashcallbacks. (#2112) - Add a
sentry_hint_t *hintargument tosentry_scope_capture_event. PassNULLif no hint is needed. (#2099) - Remove
sentry_options_get/set_enable_logsandsentry_options_get/set_enable_metrics. (#1980)Structured logs and metrics have been enabled by default since
0.13, and the options were deprecated and made no-ops in0.16.We recognize that this change may inconvenience applications that rely on the opt-out. Use
sentry_options_set_before_send_logorsentry_options_set_before_send_metricto filter logs or metrics. We made this tradeoff deliberately because consistent behavior across SDK integrations will help most users successfully adopt these features.
Features:
- Add
sentry_attachment_from_file/bytes(and their wide-string variants) for creating attachment values that can be fully configured before they are added. (#2079) - Add
sentry_add_attachment,sentry_scope_add_attachment, andsentry_hint_add_attachmentfor adding configured attachments to the global scope, a specific scope, or a hint. These functions consume and freeze the attachment value. (#2079, #1974) - Add
sentry_start_new_trace()as a clearer name for starting a new trace. (#2095) - Add hint support to
sentry_scope_capture_eventto pass event-specific attachments. The hint is also passed tobefore_sendandon_crash, which can modify attachments before the event is sent. (#2099, #2112) - Add
sentry_hint_get_attachments,sentry_hint_remove_attachment, andsentry_hint_clear_attachments. (#2099)
Fixes:
- Reduce lock contention for multi-threaded log and metric capture by allowing concurrent reads of scope data, and reusing a single options reference throughout each capture. (#2091, #2094)
Other changes:
- Promote structured logs and metrics APIs to stable. (#2101)
Deprecations: