EosMetrics.EventRecorder.prototype.record_events

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

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. Optionally, associate arbitrary data, auxiliary_payload, with these particular instances of the event. Under no circumstances should personally-identifiable information be included in the auxiliary_payload, the event_id, or num_events. Large auxiliary payloads dominate the size of the event and should therefore be used sparingly. Events for which precise timing information is required should instead be recorded using EosMetrics.EventRecorder.prototype.record_event.

At the discretion of the metrics system, the events may be discarded before being reported to the metrics server. The events may take arbitrarily long to reach the server and may be persisted unencrypted on the client for arbitrarily long. There is no guarantee that the events are delivered via the network; for example, they may instead be delivered manually on a USB drive. No indication of successful or failed delivery is provided, and no application should rely on successful delivery. To conserve bandwidth, the events may be aggregated in a lossy fashion with other events with the same event_id before reaching the server.

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.