LiveDebugger.Services.TraceService (LiveDebugger v0.1.5)
View SourceThis module is responsible for accessing traces from ETS.
It uses calls to CallbackTracingServer
to get proper table reference.
Summary
Types
Pid is used to store mapping to table references. It identifies ETS tables managed by CallbackTracingServer
Functions
Deletes traces for LiveView or LiveComponent for given pid.
Returns existing traces of a process for the table with optional filters.
Gets a trace of process from the ETS table by id
.
Inserts a new trace into the ETS table.
Types
@type ets_continuation() :: term()
@type ets_elem() :: {integer(), LiveDebugger.Structs.Trace.t()}
@type ets_table_id() :: pid()
Pid is used to store mapping to table references. It identifies ETS tables managed by CallbackTracingServer
Functions
@spec clear_traces( pid :: ets_table_id(), node_id :: pid() | LiveDebugger.CommonTypes.cid() ) :: true
Deletes traces for LiveView or LiveComponent for given pid.
node_id
- PID or CID which identifies node
@spec existing_traces(pid :: ets_table_id(), opts :: keyword()) :: {[LiveDebugger.Structs.Trace.t()], ets_continuation()} | :end_of_table
Returns existing traces of a process for the table with optional filters.
Options
:node_id
- PID or CID to filter traces by:limit
- Maximum number of traces to return (default: 100):cont
- Used to get next page of items in the following queries:functions
- List of function names to filter traces by
@spec get(pid :: ets_table_id(), id :: integer()) :: LiveDebugger.Structs.Trace.t() | nil
Gets a trace of process from the ETS table by id
.
@spec insert(LiveDebugger.Structs.Trace.t()) :: true
Inserts a new trace into the ETS table.