Measurement
A Measurement
is a data structure that contains all of the information about a measurement that is sent to Polaris.
TS
interface Measurement {
id: string;
appId: string;
eventName: string;
duration: number;
result: MeasurementResult;
timestamp: DateTime;
connectionQuality: ConnectionQuality | null;
deviceType: DeviceType;
userMetadata: object;
}
Let's take a look at each of these properties in more detail.
id
- A unique identifier for the measurement. This is generated by Polaris.appId
- The ID of the app that sent the measurement.eventName
- The name of the event that was measured.duration
- The duration of the measurement in milliseconds.result
- The result of the measurement. This can be one of the following values:Success
- The measurement was successful.Failure
- The measurement failed.
timestamp
- The timestamp of the measurement.connectionQuality
- The connection quality of the measurement. This can be one of the following values:FAST
- The connection quality is determined to be 4G or higher.OK
- The connection quality is determined to be 3G.SLOW
- The connection quality is determined to be 2G.SLOWEST
- The connection quality determined to be slower than 2G.
deviceType
- The type of device that sent the measurement. This can be one of the following values:BOT
- The device type is unknown.CAR
- The device type is unknown.DESKTOP
- The device type is a desktop.PHONE
- The device type is a phone.TABLET
- The device type is a tablet.TV
- The device type is a TV.
userMetadata
- Any additional metadata that was sent with the measurement.
User Metadata
The userMetadata
property of a measurement is an object that contains any additional metadata that was sent with the measurement.
This metadata is used to provide additional context about the measurement.