alerts.performance namespace

Functions

Function Description
onThresholdAlertPublished(handler) Declares a function that can handle receiving performance threshold alerts.
onThresholdAlertPublished(appId, handler) Declares a function that can handle receiving performance threshold alerts.
onThresholdAlertPublished(opts, handler) Declares a function that can handle receiving performance threshold alerts.

Interfaces

Interface Description
PerformanceEvent A custom CloudEvent for Firebase Alerts (with custom extension attributes).
PerformanceOptions Configuration for app distribution functions.
ThresholdAlertPayload The internal payload object for a performance threshold alert. Payload is wrapped inside a object.

alerts.performance.onThresholdAlertPublished()

Declares a function that can handle receiving performance threshold alerts.

Signature:

export declare function onThresholdAlertPublished(handler: (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any>): CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

Parameter Type Description
handler (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any> Event handler which is run every time a threshold alert is received.

Returns:

CloudFunction<PerformanceEvent<ThresholdAlertPayload>>

A function that you can export and deploy.

alerts.performance.onThresholdAlertPublished()

Declares a function that can handle receiving performance threshold alerts.

Signature:

export declare function onThresholdAlertPublished(appId: string, handler: (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any>): CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

Parameter Type Description
appId string A specific application the handler will trigger on.
handler (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any> Event handler which is run every time a threshold alert is received.

Returns:

CloudFunction<PerformanceEvent<ThresholdAlertPayload>>

A function that you can export and deploy.

alerts.performance.onThresholdAlertPublished()

Declares a function that can handle receiving performance threshold alerts.

Signature:

export declare function onThresholdAlertPublished(opts: PerformanceOptions, handler: (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any>): CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

Parameter Type Description
opts PerformanceOptions Options that can be set on the function.
handler (event: PerformanceEvent<ThresholdAlertPayload>) => any | Promise<any> Event handler which is run every time a threshold alert is received.

Returns:

CloudFunction<PerformanceEvent<ThresholdAlertPayload>>

A function that you can export and deploy.