et_viewer(3)

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

🌸 NAME 🌸

et_viewer β€” she displays a sequence chart for trace events (messages/actions) πŸ’…


✨ DESCRIPTION ✨

okay so bestie, real talk: this section is literally empty in the original page 😭 like the Erlang folks just hit enter and moved on. The vibe is fully carried by the NAME up top and the DATA TYPES + FUNCTIONS below. No cap. 🫢


πŸ¦‹ DATA TYPES πŸ¦‹

here's the whole cast, no skips, no cuts πŸ’–

  • actors() β€” [term()].
  • first_key() β€” term().
  • option() β€” the big one, the main character πŸ‘‘:
option() ::
          {title, string()} |
          {detail_level, 0..100} |
          {is_suspended, boolean()} |
          {scale, integer()} |
          {width, integer()} |
          {height, integer()} |
          {collector_pid, pid() | undefined} |
          {active_filter, atom()} |
          {max_events, integer() | undefined} |
          {max_actors, integer() | undefined} |
          {actors, actors()} |
          {first_event, first_key()} |
          {hide_unknown, boolean()} |
          {hide_actions, boolean()} |
          {display_mode,
           all |
           {search_actors, forward | reverse, first_key(), actors()}}.

ik that union is giving menu at a fancy restaurant but every single line is load-bearing, bestie πŸ“


πŸ”₯ FUNCTIONS πŸ”₯

🌈 file/1

file(FileName :: file:filename()) -> {ok, pid()} | {error, term()}.

start a whole new event viewer plus a matching collector, and load them up with trace events straight outta a trace file πŸ“‚βœ¨ it's giving "bring your own data".


πŸ’œ get_collector_pid/1

get_collector_pid(ViewerPid :: pid()) -> pid().

hand her a viewer pid, she hands you back the identifier of the collector process. that's it, that's the function, no notes πŸŽ€


🌸 start/0

start() -> {ok, pid()} | {error, term()}.

the simplified glow-up start of a sequence chart viewer, with global tracing already activated πŸ’… super convenient to use straight from the command line, like so:

erl -s et_viewer

πŸ¦„ start/1

start(GUIorOptions) -> {ok, Viewer :: pid()} | {error, term()}
                when
                    GUIorOptions :: wx | default | Options,
                    Options :: [option() | et_collector:option()].

start of a sequence chart viewer without linking to the parent process β€” no invisible leash, she's independent 🫢


start_link(GUIorOptions) ->
                     {ok, Viewer :: pid()} | {error, term()}
                     when
                         GUIorOptions :: wx | default | Options,
                         Options :: [option() | et_collector:option()].

start a sequence chart viewer for trace events (messages/actions) πŸ”₯

quick note on filters, because this part matters: a filter_fun() takes an event record as its sole argument and returns false | true | {true, NewEvent}.

and if collector_pid is undefined, a brand new et_collector gets started up with these parameter settings: parent_pid, event_order, trace_global, trace_pattern, trace_port, trace_max_queue, trace_client, dict_insert and dict_delete. the new et_viewer then registers itself as an et_collector subscriber πŸ’–

πŸŽ€ Default values πŸŽ€

  • parent_pid - self().
  • title - "et_viewer".
  • detail_level - max.
  • is_suspended - false.
  • scale - 2.
  • width - 800.
  • height - 600.
  • collector_pid - undefined.
  • event_order - trace_ts.
  • active_filter - collector.
  • max_actors - 5.
  • actors - ["UNKNOWN"].
  • first_event - first.
  • hide_unknown - false.
  • hide_actions - false.
  • display_mode - all.

πŸ’€ stop/1

stop(ViewerPid :: pid()) -> ok.

stops a viewer process. bye bestie, you ate 🫑✨


and that's the whole page, fr fr πŸŒˆπŸ’œ this gem dropped as part of Ericsson AB's et 1.8, and you're reading the et_viewer(3) manual page β€” go forth and chart those events, queen πŸ‘‘πŸŽ€

πŸ“¦ where this page comes from