ElixirScope.AST.InjectorHelpers (elixir_scope v0.0.1)

Helper functions for injecting ElixirScope instrumentation into AST nodes.

Provides utilities for generating instrumentation calls while preserving original code semantics and structure.

Summary

Functions

Captures GenServer state after a callback call.

Captures GenServer state before a callback call.

Captures LiveView event data.

Captures Phoenix connection state and response after action.

Captures Phoenix connection state before action.

Captures Phoenix controller parameters.

Generates a function entry call for instrumentation.

Wraps GenServer callback body with state monitoring.

Wraps LiveView callback body with monitoring.

Wraps Phoenix action body with monitoring.

Wraps function body with try/catch for exit and exception handling.

Functions

capture_genserver_state_after_call(signature, callback_plan)

Captures GenServer state after a callback call.

capture_genserver_state_before_call(signature, callback_plan)

Captures GenServer state before a callback call.

capture_liveview_event(signature, callback_plan)

Captures LiveView event data.

capture_liveview_socket_assigns(signature, callback_plan)

Captures LiveView socket assigns.

capture_phoenix_conn_state_after_and_response(signature, action_plan)

Captures Phoenix connection state and response after action.

capture_phoenix_conn_state_before(signature, action_plan)

Captures Phoenix connection state before action.

capture_phoenix_params(signature, action_plan)

Captures Phoenix controller parameters.

report_function_entry_call(signature, function_plan)

Generates a function entry call for instrumentation.

wrap_genserver_callback_body(body, signature, callback_plan)

Wraps GenServer callback body with state monitoring.

wrap_liveview_callback_body(body, signature, callback_plan)

Wraps LiveView callback body with monitoring.

wrap_phoenix_action_body(body, signature, action_plan)

Wraps Phoenix action body with monitoring.

wrap_with_try_catch(body, signature, function_plan)

Wraps function body with try/catch for exit and exception handling.