scout_apm v1.0.7 ScoutApm.MetricSet

A 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.

Link to this section Summary

Link to this section Types

Link to this type

options()

options() :: %{
  collapse_all: boolean(),
  compare_desc: boolean(),
  max_types: non_neg_integer()
}
Link to this type

t()

t() :: %ScoutApm.MetricSet{data: map(), options: options(), types: MapSet.t()}

Link to this section Functions

Link to this function

absorb(metric_set, metric)

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.

Link to this function

absorb_all(metric_set, metrics)

absorb_all(t(), [ScoutApm.Internal.Metric.t()]) :: t()
Link to this function

merge(set1, set2)

merge(t(), t()) :: t()
Link to this function

new()

new() :: t()
Link to this function

new(options)

new(map()) :: t()
Link to this function

to_list(metric_set)

to_list(t()) :: [ScoutApm.Internal.Metric.t()]