et(3erl)

πŸ“¦
version 25.3.2.8 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

🌈 NAME 🌈

okay bestie, welcome to et(3erl) β€” the Erlang Module Definition for the Event Trace (ET) app. The star of the show is et, and its whole job is being the Main API of the Event Trace (ET) application. iconic behavior, honestly πŸ‘‘


✨ DESCRIPTION ✨

et is the interface module for the Event Trace (ET) application. That’s it, that’s the vibe: it’s the front door, the group-chat admin, the one you call when you need ET energy πŸ’…


πŸŽ€ EXPORTS πŸŽ€

πŸ’– trace_me(DetailLevel, From, To, Label, Contents) -> hopefully_traced

trace_me(DetailLevel, From, To, Label, Contents) -> hopefully_traced

🧚 Types 🧚

DetailLevel = integer(X) when X =< 0, X >= 100
From = actor()
To = actor()
Label = atom() | string() | term()
Contents = [{Key, Value}] | term()
actor() = term()

A function that is intended to be traced. Yes, literally designed for the tracing spotlight ✨

This function is intended to be invoked at strategic places in user applications in order to enable simplified tracing. The functions are extremely light weight as they do nothing besides returning an atom. They are designed for being traced. The global tracing mechanism in et_collector defaults to set its trace pattern to these functions. So yeah, this is main-character tracing energy, fr fr 🫢

The Label is intended to provide a brief summary of the event. It is preferred to use an atom, but a string would also do. Either way, keep it cute and descriptive πŸŽ€

The Contents can be any term, but in order to simplify post processing of the traced events, a plain list of {Key, Value} tuples is preferred. That’s the organized-bestie option, and honestly it slays πŸ’–

Some events, such as messages, are directed from some actor to another. Other events β€” termed actions β€” may be undirected and only have one actor. One actor, one vibe, no drama 🌸


πŸ¦‹ trace_me(DetailLevel, FromTo, Label, Contents) -> hopefully_traced

trace_me(DetailLevel, FromTo, Label, Contents) -> hopefully_traced

This one invokes et:trace_me/5 with both From and To set to FromTo. Same trace energy, one less argument. lowkey convenient, highkey iconic πŸ’…


πŸ›Έ phone_home(DetailLevel, FromTo, Label, Contents) -> hopefully_traced

πŸ›Έ phone_home(DetailLevel, From, To, Label, Contents) -> hopefully_traced

phone_home(DetailLevel, FromTo, Label, Contents) -> hopefully_traced
phone_home(DetailLevel, From, To, Label, Contents) -> hopefully_traced

These functions send a signal to the outer space, and the caller hopes that someone is listening. No cap, that’s the plot πŸ‘½ In other words, they invoke et:trace_me/4 and et:trace_me/5 respectively. phone_home/4 invokes et:trace_me/4, and phone_home/5 invokes et:trace_me/5. Respectively, bestie, respectively πŸ“‘


πŸ’€ report_event(DetailLevel, FromTo, Label, Contents) -> hopefully_traced

πŸ’€ report_event(DetailLevel, From, To, Label, Contents) -> hopefully_traced

report_event(DetailLevel, FromTo, Label, Contents) -> hopefully_traced
report_event(DetailLevel, From, To, Label, Contents) -> hopefully_traced
🚨 Deprecated alert! These are deprecated functions, but for the time being they are kept for backwards compatibility. They invoke et:trace_me/4 and et:trace_me/5 respectively. So: old signature, still showing up to the function party, politely 🫢

okay that’s the whole glow-up πŸ’– β€” brought to you by Ericsson AB, stamped et 1.6.5, and signed with the et(3erl) footer. byeeee 🫢✨