查看源代码 et (et v1.7.1)
事件跟踪 (ET) 应用程序的主要 API
事件跟踪 (ET) 应用程序的接口模块
概要
函数
这些函数向外太空发送信号,调用者希望有人在监听。换句话说,它们分别调用 et:trace_me/4
和 et:trace_me/5
。
已弃用的函数,目前为保持向后兼容性而保留。分别调用 et:trace_me/4
和 et:trace_me/5
。
调用 et:trace_me/5
,其中 From
和 To
都设置为 FromTo
。
类型
函数
-spec phone_home(DetailLevel, FromTo, Label, Contents) -> hopefully_traced when DetailLevel :: level(), FromTo :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
等价于 phone_home/5
。
-spec phone_home(DetailLevel, From, To, Label, Contents) -> hopefully_traced when DetailLevel :: level(), From :: actor(), To :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
这些函数向外太空发送信号,调用者希望有人在监听。换句话说,它们分别调用 et:trace_me/4
和 et:trace_me/5
。
-spec report_event(DetailLevel, FromTo, Label, Contents) -> hopefully_traced when DetailLevel :: level(), FromTo :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
等价于 report_event/5
。
-spec report_event(DetailLevel, From, To, Label, Contents) -> hopefully_traced when DetailLevel :: level(), From :: actor(), To :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
已弃用的函数,目前为保持向后兼容性而保留。分别调用 et:trace_me/4
和 et:trace_me/5
。
-spec trace_me(DetailLevel, FromTo, Label, Contents) -> hopefully_traced when DetailLevel :: level(), FromTo :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
调用 et:trace_me/5
,其中 From
和 To
都设置为 FromTo
。
-spec trace_me(DetailLevel, From, To, Label, Contents) -> hopefully_traced when DetailLevel :: level(), From :: actor(), To :: actor(), Label :: atom() | string() | term(), Contents :: [{Key :: term(), Value :: term()}] | term().
旨在被跟踪的函数。
此函数旨在在用户应用程序中的战略位置调用,以便实现简化的跟踪。这些函数非常轻量级,除了返回一个原子之外什么也不做。这些函数被设计为可被跟踪。 et_collector
中的全局跟踪机制默认将其跟踪模式设置为这些函数。
标签旨在提供事件的简要摘要。首选使用原子,但字符串也可以。
内容可以是任何项,但为了简化对跟踪事件的后处理,首选使用 {Key, Value} 元组的纯列表。
一些事件(例如消息)是从一个参与者定向到另一个参与者的。其他事件(称为操作)可能是无定向的,只有一个参与者。