View Source Mobius (mobius v0.5.1)
Localized metrics reporter
Link to this section Summary
Types
Arguments to Mobius
The name of the Mobius instance
A single metric data point
The name of the metric
Functions
Returns a specification to start this module under a supervisor.
Get the current metric information
Persist the metrics to disk
Start Mobius
Link to this section Types
@type arg() :: {:mobius_instance, instance()} | {:metrics, [Telemetry.Metrics.t()]} | {:persistence_dir, binary()} | {:database, Mobius.RRD.t()} | {:remote_reporter, Mobius.RemoteReporter.t() | {Mobius.RemoteReporter.t(), term()}} | {:remote_report_interval, non_neg_integer()}
Arguments to Mobius
:name
- the name of the mobius instance (defaults to:mobius
):metrics
- list of telemetry metrics for Mobius to track:persistence_dir
- the top level directory where mobius will persist:autosave_interval
- time in seconds between automatic writes of the persistence data (default disabled) metric information:database
- theMobius.RRD.t()
to use. This will default to the the default values found inMobius.RRD
@type instance() :: atom()
The name of the Mobius instance
This is used to store data for a particular set of mobius metrics.
@type metric() :: %{ type: metric_type(), value: term(), tags: map(), timestamp: integer(), name: binary() }
A single metric data point
:type
- the type of the metric:value
- the value of the measurement for the metric:tags
- a map of the tags for the metric:timestamp
- the naive time in seconds the metric was sampled:name
- the name of the metric
@type metric_name() :: binary()
The name of the metric
Example: "vm.memory.total"
@type metric_type() :: :counter | :last_value | :sum | :summary
@type time_unit() :: :second | :minute | :hour | :day
@type timestamp() :: integer()
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Get the current metric information
If you configured Mobius to use a different name then you can pass in your custom name to ensure Mobius requests the metrics from the right place.
@spec info(instance() | nil) :: :ok
Persist the metrics to disk
Start Mobius