LiveDebugger.LiveHelpers.TracingHelper (LiveDebugger v0.1.4)

View Source

This module provides a helper to manage tracing. It is responsible for determining if the tracing should be stopped. It introduces a fuse mechanism to prevent LiveView from being overloaded with traces.

Summary

Functions

Checks if the fuse is blown and stops tracing if it is. It uses the tracing_helper assign to store information. When tracing is not started returns {:noop, socket}.

Functions

check_fuse(socket)

@spec check_fuse(Phoenix.LiveView.Socket.t()) ::
  {:ok | :stopped | :noop, Phoenix.LiveView.Socket.t()}

Checks if the fuse is blown and stops tracing if it is. It uses the tracing_helper assign to store information. When tracing is not started returns {:noop, socket}.

disable_tracing(socket)

init(socket)

switch_tracing(socket)