TelemetryContext Class
Signature
export declare class TelemetryContext implements ITelemetryContext
Implements: ITelemetryContext
Methods
Method | Return Type | Description |
---|---|---|
get(prefix, property) | TelemetryEventPropertyType | Get the telemetry data being tracked |
serialize() | string | Returns a serialized version of all the telemetry data. Should be used when logging in telemetry events. |
set(prefix, property, value) | void | Sets value for telemetry data being tracked. |
Method Details
get
Get the telemetry data being tracked
Signature
get(prefix: string, property: string): TelemetryEventPropertyType;
Parameters
Parameter | Type | Description |
---|---|---|
prefix | string | unique prefix for this data (ex: "fluid:map:") |
property | string | property name of the telemetry data being tracked (ex: "DirectoryCount") |
Returns
undefined if item not found
Return type: TelemetryEventPropertyType
serialize
Returns a serialized version of all the telemetry data. Should be used when logging in telemetry events.
Signature
serialize(): string;
Returns
Return type: string
set
Sets value for telemetry data being tracked.
Signature
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
Parameters
Parameter | Type | Description |
---|---|---|
prefix | string | unique prefix to tag this data with (ex: "fluid:map:") |
property | string | property name of the telemetry data being tracked (ex: "DirectoryCount") |
value | TelemetryEventPropertyType | value to attribute to this summary telemetry data |