alerts.performance namespace
Stay organized with collections
Save and categorize content based on your preferences.
Functions
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. |
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
Returns:
CloudFunction<PerformanceEvent<ThresholdAlertPayload>>
A function that you can export and deploy.
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.
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
Returns:
CloudFunction<PerformanceEvent<ThresholdAlertPayload>>
A function that you can export and deploy.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-18 UTC.
[null,null,["Last updated 2023-04-18 UTC."],[],[],null,["# alerts.performance namespace\n\nFunctions\n---------\n\n| Function | Description |\n|------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| [onThresholdAlertPublished(handler)](./firebase-functions.alerts.performance.md#alertsperformanceonthresholdalertpublished) | Declares a function that can handle receiving performance threshold alerts. |\n| [onThresholdAlertPublished(appId, handler)](./firebase-functions.alerts.performance.md#alertsperformanceonthresholdalertpublished) | Declares a function that can handle receiving performance threshold alerts. |\n| [onThresholdAlertPublished(opts, handler)](./firebase-functions.alerts.performance.md#alertsperformanceonthresholdalertpublished) | Declares a function that can handle receiving performance threshold alerts. |\n\nInterfaces\n----------\n\n| Interface | Description |\n|--------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| [PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface) | A custom CloudEvent for Firebase Alerts (with custom extension attributes). |\n| [PerformanceOptions](./firebase-functions.alerts.performance.performanceoptions.md#alertsperformanceperformanceoptions_interface) | Configuration for app distribution functions. |\n| [ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface) | The internal payload object for a performance threshold alert. Payload is wrapped inside a object. |\n\nalerts.performance.onThresholdAlertPublished()\n----------------------------------------------\n\nDeclares a function that can handle receiving performance threshold alerts.\n\n**Signature:** \n\n export declare function onThresholdAlertPublished(handler: (event: PerformanceEvent\u003cThresholdAlertPayload\u003e) =\u003e any | Promise\u003cany\u003e): CloudFunction\u003cPerformanceEvent\u003cThresholdAlertPayload\u003e\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| handler | (event: [PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e) =\\\u003e any \\| Promise\\\u003cany\\\u003e | Event handler which is run every time a threshold alert is received. |\n\n**Returns:**\n\n[CloudFunction](./firebase-functions.cloudfunction.md#cloudfunction_interface)\\\u003c[PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e\\\u003e\n\nA function that you can export and deploy.\n\nalerts.performance.onThresholdAlertPublished()\n----------------------------------------------\n\nDeclares a function that can handle receiving performance threshold alerts.\n\n**Signature:** \n\n export declare function onThresholdAlertPublished(appId: string, handler: (event: PerformanceEvent\u003cThresholdAlertPayload\u003e) =\u003e any | Promise\u003cany\u003e): CloudFunction\u003cPerformanceEvent\u003cThresholdAlertPayload\u003e\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| appId | string | A specific application the handler will trigger on. |\n| handler | (event: [PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e) =\\\u003e any \\| Promise\\\u003cany\\\u003e | Event handler which is run every time a threshold alert is received. |\n\n**Returns:**\n\n[CloudFunction](./firebase-functions.cloudfunction.md#cloudfunction_interface)\\\u003c[PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e\\\u003e\n\nA function that you can export and deploy.\n\nalerts.performance.onThresholdAlertPublished()\n----------------------------------------------\n\nDeclares a function that can handle receiving performance threshold alerts.\n\n**Signature:** \n\n export declare function onThresholdAlertPublished(opts: PerformanceOptions, handler: (event: PerformanceEvent\u003cThresholdAlertPayload\u003e) =\u003e any | Promise\u003cany\u003e): CloudFunction\u003cPerformanceEvent\u003cThresholdAlertPayload\u003e\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| opts | [PerformanceOptions](./firebase-functions.alerts.performance.performanceoptions.md#alertsperformanceperformanceoptions_interface) | Options that can be set on the function. |\n| handler | (event: [PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e) =\\\u003e any \\| Promise\\\u003cany\\\u003e | Event handler which is run every time a threshold alert is received. |\n\n**Returns:**\n\n[CloudFunction](./firebase-functions.cloudfunction.md#cloudfunction_interface)\\\u003c[PerformanceEvent](./firebase-functions.alerts.performance.performanceevent.md#alertsperformanceperformanceevent_interface)\\\u003c[ThresholdAlertPayload](./firebase-functions.alerts.performance.thresholdalertpayload.md#alertsperformancethresholdalertpayload_interface)\\\u003e\\\u003e\n\nA function that you can export and deploy."]]