Excessibility.TelemetryCapture.Enricher behaviour (Excessibility v0.14.0)
View SourceBehaviour for timeline event enrichers.
Enrichers add computed data to timeline events during timeline building. All enrichers run automatically for every event.
Example
defmodule MyApp.CustomEnricher do
@behaviour Excessibility.TelemetryCapture.Enricher
def name, do: :custom
def cost, do: :cheap
def enrich(assigns, _opts) do
%{custom_field: compute_value(assigns)}
end
endCallbacks
name/0- Returns atom identifier for this enricherenrich/2- Takes assigns and options, returns map of fields to add to timeline eventcost/0- (optional) Returns:cheap,:moderate, or:expensivefor filtering
Summary
Functions
Returns the cost of an enricher, defaulting to :cheap if not defined.