Telemetry event handlers and attachment helpers.
PlaidEx emits :telemetry events for every significant operation.
Attach handlers to integrate with your metrics backend, logging
pipeline, or alerting system.
Attaching all handlers
# In your application.ex start/2:
PlaidEx.Telemetry.Handler.attach_all()Event reference
HTTP events
[:plaid_ex, :http, :start]— request initiated- metadata:
%{path, attempt, tenant_id, url}
- metadata:
[:plaid_ex, :http, :stop]— request completed- measurements:
%{system_time} - metadata:
%{path, status, duration_ms, attempt, tenant_id}
- measurements:
[:plaid_ex, :http, :error]— request failed (after retries)- metadata:
%{path, error_code, error_type, status, attempt, tenant_id}
- metadata:
[:plaid_ex, :http, :retry]— retry scheduled- metadata:
%{path, attempt, delay_ms, error_code, tenant_id}
- metadata:
Sync events
[:plaid_ex, :sync, :start]— sync cycle started[:plaid_ex, :sync, :page]— page fetched and processed- measurements:
%{added, modified, removed} - metadata:
%{tenant_id, has_more, total_pages}
- measurements:
[:plaid_ex, :sync, :reauth_required]— item needs reauthentication
Webhook events
[:plaid_ex, :webhook, :received]— webhook received and ACK'd- metadata:
%{webhook_type, webhook_code, item_id, tenant_id}
- metadata:
[:plaid_ex, :webhook, :dispatch]— dispatched to handler- measurements:
%{duration_ms}
- measurements:
[:plaid_ex, :webhook, :duplicate]— duplicate discarded[:plaid_ex, :webhook, :invalid_signature]— signature check failed
Circuit breaker events
[:plaid_ex, :circuit_breaker, :open]— circuit opened- measurements:
%{failure_count} - metadata:
%{environment}
- measurements:
[:plaid_ex, :circuit_breaker, :close]— circuit closed (recovered)
Rate limit events
[:plaid_ex, :rate_limit, :throttled]— request throttled client-side- metadata:
%{tenant_id}
- metadata:
Summary
Functions
Attaches the built-in structured logging handler for all PlaidEx events.
Detaches the built-in handler.
Returns all event names emitted by PlaidEx.