Elistrix.Metrics

Source

Summary

get_metrics()

Gets all registered metrics

register(cmd_name)

Registers a command with the metrics collector

start_link(opts \\ [])
track_command_reset(cmd_name)

Tracks a command that has been reset

track_command_tripped(cmd_name)

Tracks a command that has been tripped

track_error(cmd_name, latency)

Tracks an unsuccessful command call

track_success(cmd_name, latency)

Tracks a successful command call

Functions

get_metrics()

Gets all registered metrics.

Source
register(cmd_name)

Registers a command with the metrics collector.

There are pre-defined metrics — request count, latency, etc — that we want to track for commands, and we register them here before they can be updated/set.

Source
start_link(opts \\ [])
Source
track_command_reset(cmd_name)

Tracks a command that has been reset.

Source
track_command_tripped(cmd_name)

Tracks a command that has been tripped.

Source
track_error(cmd_name, latency)

Tracks an unsuccessful command call.

This increments the request count, the unsuccessful (errors) request count, and tracks the latency of the call.

Source
track_success(cmd_name, latency)

Tracks a successful command call.

This increments the request count, the successful request count, and tracks the latency of the call.

Source