Type of scalar: 'count' for numeric values, 'string' for string values, 'boolean' for boolean values. Maps to nsITelemetry.SCALAR_TYPE_*.
Checks if Telemetry upload is enabled.
Adds the value to the given keyed scalar.
The scalar name
The key name
The numeric value to add to the scalar. Only unsigned integers supported.
Sets the keyed scalar to the given value. Throws if the value type doesn't match the scalar type.
The scalar name.
The key name.
The value to set the scalar to.
Sets the keyed scalar to the maximum of the current and the passed value
The scalar name.
The key name.
The numeric value to set the scalar to. Only unsigned integers supported.
Record an event in Telemetry. Throws when trying to record an unknown event.
The category name.
The method name.
The object name.
Optionalvalue: string
An optional string value to record.
Optionalextra: { [key: string]: string }
An optional object of the form (string -> string). It should only contain registered extra keys.
Register new events to record them from addons. See nsITelemetry.idl for more details.
The unique category the events are registered in.
An object that contains registration data for 1+ events. Each property name is the category name, and the corresponding property value is an object of EventData type.
Register new scalars to record them from addons. See nsITelemetry.idl for more details.
The unique category the scalars are registered in.
An object that contains registration data for multiple scalars. Each property name is the scalar name, and the corresponding property value is an object of ScalarData type.
Adds the value to the given scalar.
The scalar name.
The numeric value to add to the scalar. Only unsigned integers supported.
Sets the named scalar to the given value. Throws if the value type doesn't match the scalar type.
The scalar name
The value to set the scalar to
Sets the scalar to the maximum of the current and the passed value
The scalar name.
The numeric value to set the scalar to. Only unsigned integers supported.
Enable recording of events in a category. Events default to recording disabled. This allows to toggle recording for all events in the specified category.
The category name.
Whether recording is enabled for events in that category.
Submits a custom ping to the Telemetry back-end, with an encrypted payload. Requires a telemetry entry in the manifest to be used.
The data payload for the ping, which will be encrypted.
Options object.
Submits a custom ping to the Telemetry back-end. See submitExternalPing inside TelemetryController.sys.mjs for more details.
The type of the ping.
The data payload for the ping.
Options object.
Use the
browser.telemetryAPI to send telemetry data to the Mozilla Telemetry service. Restricted to Mozilla privileged webextensions.Permissions:
telemetryNot allowed in: Content scripts, Devtools pages