Loader.LocalReporter.ReportStore (loader v0.5.0)
This GenServer creates a new ets
table for storing measurements
for the :metric
option, and registers itself with the provided registry.
Its purpose is to store all values that may be needed to create metric reports,
for a single event name (e.g. [:http_client, :request, :stop]
), and make it
easy to manage and isolate the ownership and lifecycle of the ets
table.
All entries in the ets
table "held" by this process should have the following format:
{
nearly_unique_ref OR `[:counter | metric_name]` OR `[:last_value | metric_name]`, # refs via make_ref/0
metric_name, # e.g. `[:http_client, :request, :stop, :duration]`
metric_measurement, # number, as `nil`s are ignored
}
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Link to this section Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
flush_measurements_to_file(server, filename)
Link to this function
record_measurement(event_name, measurements, metadata, arg)
@spec record_measurement( :telemetry.event_name(), map(), map(), {Registry.registry(), [Telemetry.Metrics.t()]} ) :: [ok: reference() | [atom()] | {:cast, [atom()]}, error: term()] | {:error, term()}
Link to this function
report(server, opts \\ [])
Link to this function