Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fdd2d91
perf: use recursive rwlock for global scope
jpnurmi Jul 14, 2026
22a16b5
fix: prevent rwlock writer starvation
jpnurmi Jul 16, 2026
cbee686
WIP: drop recursive, hide scope
jpnurmi Jul 21, 2026
acff4c0
reset
jpnurmi Jul 22, 2026
cadd3de
refactor(scope): hide direct data access
jpnurmi Jul 22, 2026
241b14a
WIP: observers
jpnurmi Jul 27, 2026
bcdab09
feat(sync): add platform rwlock primitive
jpnurmi Aug 5, 2026
557879d
refactor(sync): make rwlock operations inline
jpnurmi Aug 5, 2026
466a386
refactor(scope): guard simple fields with rwlock
jpnurmi Aug 5, 2026
c3bed2e
refactor(scope): retain user and fingerprint values safely
jpnurmi Aug 5, 2026
c6e8ee7
refactor(scope): store string fields as values
jpnurmi Aug 5, 2026
dda98a7
refactor(scope): move locked payload into scope data
jpnurmi Aug 6, 2026
3cfdf9a
refactor(scope): hide direct scope data access
jpnurmi Aug 6, 2026
5eec237
ref containers
jpnurmi Aug 6, 2026
884c831
breadcrumbs
jpnurmi Aug 7, 2026
bcbcba6
trace_context
jpnurmi Aug 7, 2026
26843b8
propagation_context
jpnurmi Aug 7, 2026
a93501d
dsc
jpnurmi Aug 7, 2026
4059643
span/transaction_object
jpnurmi Aug 7, 2026
922faa1
restore
jpnurmi Aug 7, 2026
b7c09a3
ref(value): track string length
jpnurmi Aug 7, 2026
c7f00f6
attachments
jpnurmi Aug 7, 2026
ae763a2
lock observers
jpnurmi Aug 7, 2026
05fe336
finally :D
jpnurmi Aug 7, 2026
9c92900
fix formatting
jpnurmi Aug 7, 2026
9676b47
init
jpnurmi Aug 7, 2026
f2f0133
attachments cont'd
jpnurmi Aug 9, 2026
ab8fc0e
fix(scope): Keep global scope alive during access
jpnurmi Aug 9, 2026
8ec9c8c
fix(attachments): Release ignored attachment references
jpnurmi Aug 9, 2026
3c7c966
attachments again
jpnurmi Aug 9, 2026
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
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ IndentPPDirectives: AfterHash
ColumnLimit: 80
AlwaysBreakAfterDefinitionReturnType: All
PointerAlignment: Right
ForEachMacros: ['SENTRY_WITH_SCOPE', 'SENTRY_WITH_SCOPE_MUT', 'SENTRY_WITH_SCOPE_MUT_NO_FLUSH', 'SENTRY_WITH_OPTIONS', 'SENTRY_WITH_OPTIONS_MUT']
ForEachMacros: ['SENTRY_WITH_SCOPE', 'SENTRY_WITH_SCOPE_MUT', 'SENTRY_WITH_SCOPE_MUT_NO_FLUSH', 'SENTRY_WITH_OPTIONS', 'SENTRY_WITH_OPTIONS_MUT', 'DATA_READ_LOCK', 'DATA_WRITE_LOCK']
InsertNewlineAtEOF: True
40 changes: 23 additions & 17 deletions examples/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,17 +944,20 @@ main(int argc, char **argv)
}

if (has_arg(argc, argv, "attachment")) {
sentry_attachment_t *bytes
= sentry_attach_bytes("\xc0\xff\xee", 3, "bytes.bin");
sentry_attachment_set_content_type(bytes, "application/octet-stream");
sentry_value_t bytes = sentry_value_attachment_from_bytes(
"\xc0\xff\xee", 3, "bytes.bin");
sentry_value_attachment_set_content_type(
bytes, "application/octet-stream");
sentry_add_attachment(bytes);
}
if (has_arg(argc, argv, "attach-view-hierarchy")) {
// assuming the example / test is run directly from the cmake build
// directory
sentry_attachment_t *view_hierarchy
= sentry_attach_file("./view-hierarchy.json");
sentry_attachment_set_type(
sentry_value_t view_hierarchy
= sentry_value_attachment_from_file("./view-hierarchy.json");
sentry_value_attachment_set_type(
view_hierarchy, SENTRY_ATTACHMENT_TYPE_VIEW_HIERARCHY);
sentry_add_attachment(view_hierarchy);
}

if (has_arg(argc, argv, "large-attachment")) {
Expand All @@ -972,11 +975,11 @@ main(int argc, char **argv)
remaining -= chunk;
}
fclose(f);
sentry_attachment_t *attachment = sentry_attach_file(large_file);
if (attachment) {
sentry_attachment_set_type(
attachment, SENTRY_ATTACHMENT_TYPE_MINIDUMP);
}
sentry_value_t attachment
= sentry_value_attachment_from_file(large_file);
sentry_value_attachment_set_type(
attachment, SENTRY_ATTACHMENT_TYPE_MINIDUMP);
sentry_add_attachment(attachment);
}
}

Expand Down Expand Up @@ -1083,9 +1086,11 @@ main(int argc, char **argv)
// assuming the example / test is run directly from the cmake build
// directory
sentry_attach_file("./CMakeCache.txt");
sentry_attachment_t *bytes
= sentry_attach_bytes("\xc0\xff\xee", 3, "bytes.bin");
sentry_attachment_set_content_type(bytes, "application/octet-stream");
sentry_value_t bytes = sentry_value_attachment_from_bytes(
"\xc0\xff\xee", 3, "bytes.bin");
sentry_value_attachment_set_content_type(
bytes, "application/octet-stream");
sentry_add_attachment(bytes);
}

if (has_arg(argc, argv, "update-release-env")) {
Expand Down Expand Up @@ -1126,10 +1131,11 @@ main(int argc, char **argv)
// assuming the example / test is run directly from the cmake build
// directory
sentry_scope_attach_file(scope, "./CMakeCache.txt");
sentry_attachment_t *bytes = sentry_scope_attach_bytes(
scope, "\xc0\xff\xee", 3, "bytes.bin");
sentry_attachment_set_content_type(
sentry_value_t bytes = sentry_value_attachment_from_bytes(
"\xc0\xff\xee", 3, "bytes.bin");
sentry_value_attachment_set_content_type(
bytes, "application/octet-stream");
sentry_scope_add_attachment(scope, bytes);
}

sentry_scope_capture_event(scope, event);
Expand Down
Loading