![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for telemetry.c:Go to the source code of this file.
Functions | |
| void | dt_telemetry_init (const gboolean have_gui) |
| void | dt_telemetry_shutdown (void) |
| void | dt_telemetry_capture (const char *event, JsonObject *properties) |
| void | dt_telemetry_record_module_usage (const char *category, const char *name) |
| void | dt_telemetry_record_file_type (const struct dt_image_t *img, const char *pipeline) |
| void dt_telemetry_capture | ( | const char * | event, |
| JsonObject * | properties | ||
| ) |
Queue one analytics event for asynchronous delivery to PostHog.
| event | event name, e.g. "session_start". |
| properties | a JsonObject of event properties, or NULL. Ownership is transferred to this function (it is unref'd internally). |
Non-blocking and thread-safe. No-op (and still consumes properties) when analytics is disabled or not opted in.
Definition at line 417 of file telemetry.c.
| void dt_telemetry_init | ( | const gboolean | have_gui | ) |
Initialize opt-in usage analytics (PostHog, EU region).
This is SEPARATE from crash reporting (Sentry): it has its own consent dialog and its own preference (telemetry/enabled). On first launch with a GUI it asks the user, once, whether to share anonymous usage statistics. Analytics is started only if the user opted in and a PostHog API key was configured at build time. It sends anonymous, aggregate data (no images, file names or personal data) keyed by a random per-installation id.
Safe to call without telemetry support (USE_TELEMETRY=OFF): no-op.
| have_gui | whether a GUI is up and a consent dialog may be shown. |
Definition at line 409 of file telemetry.c.
Referenced by dt_init().
| void dt_telemetry_record_file_type | ( | const struct dt_image_t * | img, |
| const char * | pipeline | ||
| ) |
Record the kind of an image processed during this session (extension and type flags only, never the file name or path).
De-duplicated per image+pipeline like the crash context, accumulated in-memory and sent aggregated in the "session_end" event. Thread-safe; no-op when analytics is disabled.
| img | the image being processed. |
| pipeline | pipeline label, e.g. "darkroom" or "export". |
Definition at line 426 of file telemetry.c.
Referenced by dt_dev_pixelpipe_process().
| void dt_telemetry_record_module_usage | ( | const char * | category, |
| const char * | name | ||
| ) |
Count one usage of a module/view/panel for the current session.
Accumulated in-memory (counts only, no order, no timing) and sent aggregated in the "session_end" event at shutdown. Thread-safe; no-op when analytics is disabled.
| category | one of "view", "lib", "iop". |
| name | the module's stable operation/plugin name. |
Definition at line 422 of file telemetry.c.
Referenced by _gui_off_callback(), dt_lib_gui_set_expanded(), and dt_view_manager_switch_by_view().
Flush pending analytics events and stop the background worker. No-op if analytics was never started.
Definition at line 413 of file telemetry.c.
Referenced by dt_cleanup().