EosMetrics.EventRecorder.prototype.record_events_sync

function record_events_sync(event_id: String, num_events: Number(gint64), auxiliary_payload: GLib.Variant): void {
    // Gjs wrapper for emtr_event_recorder_record_events_sync()
}
  

Make a best-effort to record the fact that num_events events of type event_id happened between the current time and the previous such recording. Behaves like EosMetrics.EventRecorder.prototype.record_events but executes synchronously, blocking until either a timeout expires or the event recorder daemon has received the event. Generally prefer EosMetrics.EventRecorder.prototype.record_events in UI threads, but use EosMetrics.EventRecorder.prototype.record_events_sync instead for the sake of reliability when recording events from a process that is about to close.

Since 0.4

event_id

an RFC 4122 UUID representing the type of event that took place

num_events

the number of times the event type took place

auxiliary_payload

miscellaneous data to associate with the events. Must not contain maybe variants as they are not compatible with D-Bus.