ScoutApm.Instruments.PhoenixErrorTelemetry (scout_apm v2.0.0)

Copy Markdown

Telemetry handler for automatic Phoenix error capture.

Attaches to Phoenix telemetry events to automatically capture:

  • Router dispatch exceptions
  • Error rendering events

Usage

In your application's start/2 function:

def start(_type, _args) do
  ScoutApm.Instruments.PhoenixErrorTelemetry.attach()
  # ... rest of supervision tree
end

This will automatically capture all unhandled exceptions in Phoenix routes.

Summary

Functions

Attaches telemetry handlers for Phoenix error events. Call this once during application startup.

Detaches the telemetry handlers. Useful for testing.

Functions

attach()

Attaches telemetry handlers for Phoenix error events. Call this once during application startup.

detach()

Detaches the telemetry handlers. Useful for testing.

handle_event(arg1, measurements, metadata, config)