alerts.performance namespace

Functions

FunctionDescription
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

InterfaceDescription
PerformanceEventA custom CloudEvent for Firebase Alerts (with custom extension attributes).
PerformanceOptionsConfiguration for app distribution functions.
ThresholdAlertPayloadThe 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:

exportdeclarefunctiononThresholdAlertPublished(handler:(event:PerformanceEvent<ThresholdAlertPayload>)=>any|Promise<any>):CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

ParameterTypeDescription
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:

exportdeclarefunctiononThresholdAlertPublished(appId:string,handler:(event:PerformanceEvent<ThresholdAlertPayload>)=>any|Promise<any>):CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

ParameterTypeDescription
appIdstringA 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:

exportdeclarefunctiononThresholdAlertPublished(opts:PerformanceOptions,handler:(event:PerformanceEvent<ThresholdAlertPayload>)=>any|Promise<any>):CloudFunction<PerformanceEvent<ThresholdAlertPayload>>;

Parameters

ParameterTypeDescription
optsPerformanceOptionsOptions 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.