ElixirScope.Events (elixir_scope v0.0.1)

Core event structures for ElixirScope.

Defines all event types that can be captured during execution and provides efficient serialization/deserialization for storage and transmission.

Events are designed to be:

  • Lightweight with minimal overhead
  • Self-contained with all necessary context
  • Timestamped with high resolution
  • Correlated with unique IDs for causal analysis

Summary

Functions

%ElixirScope.Events{}

(struct)

Base event structure with common fields for all event types.

deserialize(binary)

Deserializes an event from binary format.

function_entry(module, function, arity, args, opts \\ [])

function_exit(module, function, arity, call_id, result, duration_ns, exit_reason, opts \\ [])

message_send(sender_pid, receiver_pid, message, send_type, opts \\ [])

new_event(event_type, data, opts \\ [])

Creates a new event with automatic metadata injection.

This is the recommended way to create events as it automatically populates common fields like timestamp, node, and generates unique IDs.

process_spawn(spawned_pid, parent_pid, spawn_module, spawn_function, spawn_args, opts \\ [])

serialize(event)

Serializes an event to binary format for efficient storage.

serialized_size(event)

state_change(server_pid, callback, old_state, new_state, opts \\ [])