et(3)

πŸ“¦
version 29.0.6 Β· 2 versions
, in nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– et(3) β€” the Event Trace main character πŸ’–

Erlang Module Definition ✨ welcome to the ET glow-up bestie ✨


🌸 NAME 🌸

et β€” the Main API of the Event Trace (ET) application, no cap πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

It's the interface module for the Event Trace (ET) application. That's the whole vibe. She's the front door πŸ’…


✨ DATA TYPES ✨

okay so these are the little types we're working with, stan them:

  • actor() :: term().
  • level() :: 0..100.

πŸ”₯ FUNCTIONS πŸ”₯

πŸ’Œ phone_home(DetailLevel, From, To, Label, Contents) -> hopefully_traced

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().

These functions send a signal to outer space 🌌 and the caller just… hopes that someone is listening πŸ₯Ί that's genuinely the whole deal. In other words (fr fr), they invoke et:trace_me/4 and et:trace_me/5 respectively. Not me sending messages into the void and trusting the process 😭


🌈 report_event(DetailLevel, From, To, Label, Contents) -> hopefully_traced

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().
🚨 bestie these are deprecated 🚨 they've been kept around for the time being for backwards compatibility, that's it, that's the reason. Invokes et:trace_me/4 and et:trace_me/5 respectively. Respectfully, move on to trace_me, iykyk πŸ’€

πŸŽ€ trace_me(DetailLevel, FromTo, Label, Contents) -> hopefully_traced

trace_me(DetailLevel, FromTo, Label, Contents) -> hopefully_traced
                    when
                        DetailLevel :: level(),
                        FromTo :: actor(),
                        Label :: atom() | string() | term(),
                        Contents ::
                            [{Key :: term(), Value :: term()}] | term().

Invokes et:trace_me/5 with both From and To set to FromTo. One actor, serving both roles, main character energy πŸ‘‘


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

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().

A function that is intended to be traced ✨ yes literally, that's her job.

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 β€” that's it! no side quests, no drama, she just hands you an atom and leaves 🫢 The functions are designed for being traced. The global tracing mechanism in et_collector defaults to set its trace pattern to these functions.

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. (atom girlies rise up πŸ’… strings, you're valid too 🌸)

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. Like, do the nice thing for future-you πŸ“‹

Some events, such as messages, are directed from some actor to another. Other events (termed actions) may be undirected and only have one actor. Solo act, iconic behavior 🌟


πŸ‘‘ sign-off πŸ‘‘

that's the whole page bestie, written by Ericsson AB, version et 1.8, filed under et(3) β€” go trace something cute and stay hydrated πŸ’–πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from