ElixirScope.Core.MessageTracker (elixir_scope v0.0.1)

Tracks message flows between processes.

Provides functionality for capturing and querying message exchanges between processes. This module will be enhanced in future iterations to provide comprehensive message flow analysis.

Summary

Functions

Disables message tracking for a process.

Enables message tracking for a process.

Gets message flow between two processes.

Gets all message flows for a specific process.

Gets message flow statistics.

Checks if message tracking is enabled for a process.

Functions

disable_tracking(pid)

@spec disable_tracking(pid()) :: :ok | {:error, term()}

Disables message tracking for a process.

enable_tracking(pid)

@spec enable_tracking(pid()) :: :ok | {:error, term()}

Enables message tracking for a process.

This would be used to start tracking messages for a specific process.

get_message_flow(from_pid, to_pid, opts \\ [])

@spec get_message_flow(pid(), pid(), keyword()) :: {:ok, [map()]} | {:error, term()}

Gets message flow between two processes.

Currently returns a not implemented error. This will be enhanced in future iterations to provide actual message flow tracking.

get_process_messages(pid, opts \\ [])

@spec get_process_messages(
  pid(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Gets all message flows for a specific process.

Returns both incoming and outgoing messages for the given process.

get_statistics()

@spec get_statistics() :: {:ok, map()} | {:error, term()}

Gets message flow statistics.

Returns information about message volumes, patterns, etc.

tracking_enabled?(pid)

@spec tracking_enabled?(pid()) :: boolean()

Checks if message tracking is enabled for a process.