diff --git a/zh-cn/application-dev/reference/apis-performance-analysis-kit/js-apis-hiviewdfx-hiappevent.md b/zh-cn/application-dev/reference/apis-performance-analysis-kit/js-apis-hiviewdfx-hiappevent.md index 2ac77975fd95e8451ba2b730684bed50b95a01df..d937d9974f6557a65f39c15d99d8f7e0a1467764 100644 --- a/zh-cn/application-dev/reference/apis-performance-analysis-kit/js-apis-hiviewdfx-hiappevent.md +++ b/zh-cn/application-dev/reference/apis-performance-analysis-kit/js-apis-hiviewdfx-hiappevent.md @@ -200,7 +200,7 @@ hiAppEvent.removeWatcher(watcher); setEventParam(params: Record<string, ParamType>, domain: string, name?: string): Promise<void> -事件自定义参数设置方法,使用Promise方式作为异步回调。在同一生命周期中,可以通过事件领域和事件名称关联系统事件和应用事件,系统事件仅支持崩溃和卡死事件。 +事件自定义参数设置方法,使用Promise方式作为异步回调。在同一生命周期中,可以通过事件领域和事件名称关联系统事件和应用事件,系统事件仅支持[崩溃事件](../../dfx/hiappevent-watcher-crash-events.md)和[卡死事件](../../dfx/hiappevent-watcher-freeze-events.md)。 **原子化服务API:** 从API version 12开始,该接口支持在原子化服务中使用。 @@ -227,6 +227,10 @@ setEventParam(params: Record<string, ParamType>, domain: string, name?: st | 错误码ID | 错误信息 | | -------- | --------------------------------------------- | | 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. | +| 11100001 | Function disabled. Possible caused by the param disable in ConfigOption is true. | +| 11101001 | Invalid event domain. Possible causes: 1. Contain invalid characters; 2. Length is invalid. | +| 11101002 | Invalid event name. Possible causes: 1. Contain invalid characters; 2. Length is invalid. | +| 11101005 | Invalid event parameter name. Possible causes: 1. Contain invalid characters; 2. Length is invalid. | | 11101007 | The number of parameter keys exceeds the limit. | **示例:** @@ -380,6 +384,8 @@ hiAppEvent.setEventConfig(hiAppEvent.event.MAIN_THREAD_JANK, params).then(() => | eventTypes | [EventType](#eventtype)[] | 否 | 是 | 需要订阅的事件类型集合。默认不进行过滤。 | | names11+ | string[] | 否 | 是 | 需要订阅的事件名称集合。默认不进行过滤。 | +> **说明** +> 系统事件中:[踩内存事件](../../dfx/hiappevent-watcher-address-sanitizer-events.md)、[任务执行超时事件](../../dfx/hiappevent-watcher-apphicollie-events.md)不支持在元服务中订阅;启动耗时事件、滑动丢帧事件、CPU高负载事件、24h功耗器件分解统计事件不支持在元服务和分身应用中订阅。 ## AppEventPackageHolder