@@ -20,31 +20,17 @@ 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-
3023In a more complex example, it looks like this:
31-
3224```c
3325sentry_value_t event = sentry_value_new_event();
3426sentry_value_set_by_key(event, "message", sentry_value_new_string("Hello!"));
3527
3628sentry_value_t screen = sentry_value_new_object();
3729sentry_value_set_by_key(screen, "width", sentry_value_new_int32(1920));
3830sentry_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));
4431
4532sentry_value_t contexts = sentry_value_new_object();
4633sentry_value_set_by_key(contexts, "screen_size", screen);
47- sentry_value_set_by_key(contexts, "processed_files", processed_files);
4834
4935sentry_value_set_by_key(event, "contexts", contexts);
5036sentry_capture_event(event);
0 commit comments