ScoutApm.MetricSet (scout_apm v2.0.0)
Copy MarkdownA way to absorb & combine metrics into a single set, keeping track of min/max/count, etc.
While this is just a map underneath, treat it like an opaque data type.
Summary
Functions
Add this metric to this metric set.
Types
Functions
@spec absorb(t(), ScoutApm.Internal.Metric.t()) :: t()
Add this metric to this metric set.
As a safety valve in the agent, this skips adding if we've reached the limit of unique 'type' values in this set. Since 'type' is something like 'Ecto' or 'Controller', it's very unlikely that this safety valve ever gets hit in normal practice, but instead is designed to protect people from accidentally varying their custom instrumentation types.
@spec absorb_all(t(), [ScoutApm.Internal.Metric.t()]) :: t()
@spec new() :: t()
@spec to_list(t()) :: [ScoutApm.Internal.Metric.t()]