View Source mix prometheus_telemetry.gen.metrics (prometheus_telemetry v0.4.6)

This can be used to generate metrics modules

The format used is

<metric_type>:<metric_name>:<event_name>:<measurement_unit>:tags:<tag_name>:<tag_name>

example

Example

$ mix prometheus_telemetry.gen.metrics MyApp.Metrics.Type counter:event.name.measurement.count:event.name.count:count:tags:profile:region

The following metrics have been implemented: counter, distribution, last_value and sum

With distribution you can also provide a second parameter of milliseconds, seconds or microseconds

Link to this section Summary

Functions

Callback implementation for Mix.Task.run/1.

Link to this section Functions

Callback implementation for Mix.Task.run/1.