@@ -20,6 +20,13 @@ To create and capture a manual event, follow these steps:
20202. Add custom attributes to the event, like a `message` or an `exception`.
21213. Send the event to Sentry by invoking `sentry_capture_event`.
2222
23+ The custom attribute data must be of type `sentry_value_t`, which can store:
24+ * 32-bit signed integers,
25+ * 64-bit signed and unsigned integers,
26+ * double-precision floating-points,
27+ * null-terminated strings, as well as
28+ * lists and string-keyed maps containing `sentry_value_t` entries
29+
2330In a more complex example, it looks like this:
2431
2532```c
@@ -29,9 +36,15 @@ sentry_value_set_by_key(event, "message", sentry_value_new_string("Hello!"));
2936sentry_value_t screen = sentry_value_new_object();
3037sentry_value_set_by_key(screen, "width", sentry_value_new_int32(1920));
3138sentry_value_set_by_key(screen, "height", sentry_value_new_int32(1080));
39+ sentry_value_set_by_key(screen, "refresh_rate", sentry_value_new_double(29.97));
40+
41+ sentry_value_t processed_files = sentry_value_new_list();
42+ sentry_value_append(processed_files, sentry_value_new_uint64(1073741824ULL));
43+ sentry_value_append(processed_files, sentry_value_new_uint64(2147483648ULL));
3244
3345sentry_value_t contexts = sentry_value_new_object();
3446sentry_value_set_by_key(contexts, "screen_size", screen);
47+ sentry_value_set_by_key(contexts, "processed_files", processed_files);
3548
3649sentry_value_set_by_key(event, "contexts", contexts);
3750sentry_capture_event(event);
0 commit comments