et_selector(3erl)
π NAME π
et_selector β Define event transforms and trace patterns
This is the et_selector(3erl) page, bestie β the Erlang manual for picking what trace events are interesting, transforming trace data into event records, and changing trace patterns. Itβs giving small module, big main-character energy. π
π¦ DESCRIPTION π¦
Okay so the original DESCRIPTION section is literally empty here. No prose, no extra tea, just a heading and then straight into EXPORTS. Weβre not inventing facts β the real details are all below. β¨
π₯ EXPORTS π₯
Three functions, all iconic, no filler. Letβs go. π«Ά
π make_pattern/1 π
make_pattern(RawPattern) -> TracePattern
Types
RawPattern = detail_level()
TracePattern = erlang_trace_pattern_match_spec()
detail_level() = min | max | integer(X) when X >= 0, X =< 100
This one makes a trace pattern that is suitable to feed into change_pattern/1. Itβs basically the pre-game snack before the actual pattern change. π
mindetail level deactivates tracing of calls toet:trace_me/4,5. bye tracing πmaxdetail level activates tracing of all calls toet:trace_me/4,5. all of them. periodt.integer(X)detail level activates tracing of calls toet:trace_me/4,5whose detail level argument is lesser thanX. (And yeah,Xstays in the0to100range from the type.)- Also: see
erlang:trace_pattern/2for more info about itsmatch_spec(). iykyk.
π change_pattern/1 π
change_pattern(Pattern) -> ok
Types
Pattern = detail_level() | empty_match_spec() | erlang_trace_pattern_match_spec()
detail_level() = min | max | integer(X) when X >= 0, X =< 100
empty_match_spec() = []
This activates/deactivates tracing by changing the current trace pattern. Itβs the vibe check for your trace pattern. π₯
mindetail level deactivates tracing of calls toet:trace_me/4,5.maxdetail level activates tracing of all calls toet:trace_me/4,5.integer(X)detail level activates tracing of all calls toet:trace_me/4,5whose detail level argument is lesser thanX.- An empty match spec deactivates tracing of calls to
et:trace_me/4,5. Thatβs[], bestie β empty and powerful. π - Other match specs activate tracing of calls to
et:trace_me/4,5accordingly witherlang:trace_pattern/2.
π¦ parse_event/2 π¦
parse_event(Mod, ValidTraceData) -> false | true | {true, Event}
Types
Mod = module_name() | undefined
module_name() = atom()
ValidTraceData = erlang_trace_data() | record(event)
erlang_trace_data() = {trace, Pid, Label, Info} | {trace, Pid, Label, Info, Extra} | {trace_ts, Pid, Label, Info, ReportedTS} | {trace_ts, Pid, Label, Info, Extra, ReportedTS} | {seq_trace, Label, Info} | {seq_trace, Label, Info, ReportedTS} | {drop, NumberOfDroppedItems}
This transforms trace data and makes an event record out of it. Itβs literally the glow-up from raw trace tuple to #event{} record. β¨
See erlang:trace/3 for more info about the semantics of the trace data.
An event record consists of the following fields:
detail_level: Noise has a high level as opposed to essentials.trace_ts: Time when the trace was generated. Same asevent_tsif omitted in trace data.event_ts: Time when the event record was created.from: From actor, such as sender of a message.to: To actor, such as receiver of message.label: Label intended to provide a brief event summary.contents: All nitty gritty details of the event.
See et:trace_me/4 and et:trace_me/5 for details.
Returns:
{true, Event}: whereEventis an#event{}record representing the trace data.true: means that the trace data already is an event record and that it is valid as it is. No transformation is needed.false: means that the trace data is uninteresting and should be dropped.
bestie, that false is not a sad ending β it just means the trace data didnβt pass the vibe check and gets dropped. π«Ά
π thatβs the whole page, bestie. Cute little sign-off: source is Ericsson AB, version is et 1.6.5. The footer didnβt give a date, so Iβm not inventing one β no cap. πβ¨
π¦ where this page comes from
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u1 Β· Apache-2.0
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u4 Β· Apache-2.0
- ubuntu jammy: erlang-manpages 1:24.2.1+dfsg-1 Β· Apache-2.0
- ubuntu jammy: erlang-manpages 1:24.2.1+dfsg-1ubuntu0.8 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms