Documentation ¶
Overview ¶
Package prometheus provides Prometheus metrics for asyncmachine. Metrics are collected from machine's transitions and states.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindToPusher ¶ added in v0.8.0
func BindToRegistry ¶ added in v0.8.0
func BindToRegistry(metrics *Metrics, registry *prometheus.Registry)
Types ¶
type Metrics ¶
type Metrics struct { // Tracer is a Prometheus tracer for the machine. You can detach it any time // using Machine.DetachTracer. Tracer am.Tracer // number of registered states StatesAmount prometheus.Gauge // number of relations for all registered states RelAmount prometheus.Gauge // number of state referenced by relations for all registered states RefStatesAmount prometheus.Gauge // current number of queued transitions (per transition) QueueSize prometheus.Gauge // transition duration in machine's clock (ticks per tx) TxTick prometheus.Gauge // number of active states (per transition) StatesActiveAmount prometheus.Gauge // number of inactive states (per transition) StatesInactiveAmount prometheus.Gauge // number of states added (per transition) StatesAdded prometheus.Gauge // number of states removed (per transition) StatesRemoved prometheus.Gauge // number of states touched (per transition) StatesTouched prometheus.Gauge // number of errors ExceptionsCount prometheus.Gauge // number of transitions TransitionsCount prometheus.Gauge // steps per transition StepsAmount prometheus.Gauge // amount of executed handlers per tx HandlersAmount prometheus.Gauge // transition time TxTime prometheus.Gauge // contains filtered or unexported fields }
Metrics is a set of Prometheus metrics for asyncmachine.
type PromTracer ¶ added in v0.8.0
type PromTracer struct { *am.NoOpTracer // contains filtered or unexported fields }
PromTracer is am.Tracer for tracing state machines.
func (*PromTracer) MachineDispose ¶ added in v0.8.0
func (t *PromTracer) MachineDispose(machId string)
func (*PromTracer) StructChange ¶ added in v0.8.0
func (t *PromTracer) StructChange(machine am.Api, old am.Struct)
func (*PromTracer) TransitionEnd ¶ added in v0.8.0
func (t *PromTracer) TransitionEnd(tx *am.Transition)
func (*PromTracer) TransitionInit ¶ added in v0.8.0
func (t *PromTracer) TransitionInit(tx *am.Transition)
Click to show internal directories.
Click to hide internal directories.