metrics

package
v4.1.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AlpacaStreamLastUpdate stores the Unix time when the given (minute_bar, quote, trade) stream is updated.
	AlpacaStreamLastUpdate = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: namespace,
			Subsystem: subsystem,
			Name:      "alpaca_last_update_time",
			Help:      "Last update time of Alpaca streams, partitioned by type",
		},
		[]string{
			"type",
		},
	)

	// AlpacaStreamUpdateLag stores the current lag in seconds
	// partitioned by type (minute_bar, quote, trade).
	AlpacaStreamUpdateLag = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: namespace,
			Subsystem: subsystem,
			Name:      "alpaca_update_lag",
			Help:      "Update lag of Alpaca streams, partitioned by type",
		},
		[]string{
			"type",
		},
	)

	// AlpacaStreamMessagesHandled stores the number of
	// stream messages handled partitioned by type (minute_bar, quote, trade).
	AlpacaStreamMessagesHandled = promauto.NewCounterVec(

		prometheus.CounterOpts{
			Namespace: namespace,
			Subsystem: subsystem,
			Name:      "alpaca_messages_handled",
			Help:      "Number of stream messages handled, partitioned by type",
		},
		[]string{
			"type",
		},
	)

	// AlpacaStreamQueueLength stores the number of
	// unprocessed messages currently in the queue.
	AlpacaStreamQueueLength = promauto.NewGauge(
		prometheus.GaugeOpts{
			Namespace: namespace,
			Subsystem: subsystem,
			Name:      "alpaca_waiting_queue_length",
			Help:      "Number of stream messages waiting for processing",
		},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL