metrics

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(appMetricsPrefix string)

Init instantiates the metrics singleton and registers core metrics

func StartServer

func StartServer(ctx context.Context, port int) error

StartServer starts the MetricsServer using the passed context to handle shutdown

Types

type Metrics

type Metrics struct {
	AppMetricsPrefix string
	// contains filtered or unexported fields
}

Metrics holds prometheus collectors for firebolt core, the configured source, and all configured nodes. This is managed as a singleton, do not create instances in your code. Use the Init() and Get() methods instead.

func Get

func Get() *Metrics

Get returns the singleton instance of this metrics manager

type NodeMetrics

type NodeMetrics struct {
	EventsReceived   *prometheus.CounterVec
	Successes        *prometheus.CounterVec
	Failures         *prometheus.CounterVec
	Filtered         *prometheus.CounterVec
	BufferedEvents   *prometheus.GaugeVec
	ProcessTime      *prometheus.HistogramVec
	DiscardedEvents  *prometheus.CounterVec
	BufferFullEvents *prometheus.CounterVec
}

NodeMetrics encapsulates the prometheus collectors used by firebolt to record metrics about each node

func Node

func Node() NodeMetrics

Node returns the NodeMetrics for the node identified by 'nodeId'. If no metrics have been registered for this node they are lazy-initialized and returned.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the HTTP server for prometheus metrics

type SourceMetrics

type SourceMetrics struct {
	EventsEmitted prometheus.Counter
}

SourceMetrics encapsulates the prometheus collectors used by firebolt to record metrics about the source

func Source

func Source() SourceMetrics

Source returns the SourceMetrics for the configured source

Jump to

Keyboard shortcuts

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