![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for sentry.c:Go to the source code of this file.
Functions | |
| void | dt_sentry_init (const gboolean have_gui) |
| void | dt_sentry_shutdown (void) |
| gboolean | dt_sentry_backtrace_captured (void) |
| void | dt_sentry_record_module_usage (const char *category, const char *name) |
| void | dt_sentry_set_processed_image (const struct dt_image_t *img, const char *pipeline) |
| gboolean dt_sentry_backtrace_captured | ( | void | ) |
Whether sentry's crash handler has already captured a gdb backtrace for the current crash. The local signal handler uses this to avoid running gdb twice. Returns FALSE when built without sentry support.
Definition at line 487 of file sentry.c.
References FALSE.
Referenced by _dt_sigsegv_handler().
| void dt_sentry_init | ( | const gboolean | have_gui | ) |
Initialize sentry.io crash reporting.
On the very first launch (no consent decision recorded yet) and when a GUI is available, this shows a modal consent dialog explaining what is collected and why, and stores the user's choice. Sentry is only initialized when the user has opted in (conf key "sentry/enabled"). It enriches reports with OS and hardware context and enables crash-free session tracking.
Safe to call when built without sentry support (USE_SENTRY=OFF): it is a no-op.
| have_gui | whether a GUI is up and a consent dialog may be shown. |
Definition at line 479 of file sentry.c.
Referenced by dt_init().
| void dt_sentry_record_module_usage | ( | const char * | category, |
| const char * | name | ||
| ) |
Record that a module was used during this session, e.g. a view was entered, an iop module was enabled, or a lib panel was opened. Per-module counts are attached to crash reports as the "module_usage" context, so a crash shows which modules were exercised beforehand.
| category | short kind, e.g. "view", "iop", "lib". |
| name | module identifier (view module_name, iop op, lib plugin_name). |
Must be called from the GUI thread. No-op without sentry, or before init / when the user has not opted in.
Definition at line 492 of file sentry.c.
Referenced by _gui_off_callback(), dt_lib_gui_set_expanded(), and dt_view_manager_switch_by_view().
| void dt_sentry_set_processed_image | ( | const struct dt_image_t * | img, |
| const char * | pipeline | ||
| ) |
Record the image currently being processed, so crash reports show what was on the pipeline at the time. Only the file extension and image type flags are recorded (no file name or path). Attached as the "processed_image" context.
Cheap to call on every pipeline run: it is a no-op unless the image or pipeline actually changed. Safe to call from any pipeline thread.
| img | the image on the pipeline (its extension + type flags are read). |
| pipeline | short label of the pipeline, e.g. "darkroom"/"export". |
No-op without sentry, or before init / when the user has not opted in.
Definition at line 496 of file sentry.c.
Referenced by dt_dev_pixelpipe_process().
Flush and shut down sentry. Marks the current session as a clean (crash-free) exit and increments the local clean-session counter. No-op if sentry was never initialized.
Definition at line 483 of file sentry.c.
Referenced by dt_cleanup().