View Source Zexbox.Metrics.ContextRegistry (Zexbox v1.5.1)
GenServer that maintains an ETS set of PIDs for which metrics are disabled. Monitors registered PIDs and removes them on :DOWN to prevent leaks.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns true if the given pid is in the disabled set.
Registers the given pid as disabled for metrics. The pid is monitored so the entry is removed when the process exits.
Removes the given pid from the disabled set.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns true if the given pid is in the disabled set.
@spec register(pid()) :: :ok
Registers the given pid as disabled for metrics. The pid is monitored so the entry is removed when the process exits.
@spec start_link(keyword()) :: GenServer.on_start()
@spec unregister(pid()) :: :ok
Removes the given pid from the disabled set.