metrics

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Number of services. Labels: host.
	MetricServicesGauge metrics.MetricName = "gost_services"
	// Total service requests. Labels: host, service, client.
	MetricServiceRequestsCounter metrics.MetricName = "gost_service_requests_total"
	// Number of in-flight requests. Labels: host, service, client.
	MetricServiceRequestsInFlightGauge metrics.MetricName = "gost_service_requests_in_flight"
	// Request duration histogram. Labels: host, service.
	MetricServiceRequestsDurationObserver metrics.MetricName = "gost_service_request_duration_seconds"
	// Total service input data transfer size in bytes. Labels: host, service, client.
	MetricServiceTransferInputBytesCounter metrics.MetricName = "gost_service_transfer_input_bytes_total"
	// Total service output data transfer size in bytes. Labels: host, service, client.
	MetricServiceTransferOutputBytesCounter metrics.MetricName = "gost_service_transfer_output_bytes_total"
	// Chain node connect duration histogram. Labels: host, chain, node.
	MetricNodeConnectDurationObserver metrics.MetricName = "gost_chain_node_connect_duration_seconds"
	// Total service handler errors. Labels: host, service, client.
	MetricServiceHandlerErrorsCounter metrics.MetricName = "gost_service_handler_errors_total"
	// Total chain connect errors. Labels: host, chain, node.
	MetricChainErrorsCounter metrics.MetricName = "gost_chain_errors_total"
	// Total recorder records. Labels: host, recorder.
	MetricRecorderRecordsCounter metrics.MetricName = "gost_recorder_records_total"
)

Variables

This section is empty.

Functions

func Enable added in v0.0.3

func Enable(b bool)

func GetCounter

func GetCounter(name metrics.MetricName, labels metrics.Labels) metrics.Counter

func GetGauge

func GetGauge(name metrics.MetricName, labels metrics.Labels) metrics.Gauge

func GetObserver

func GetObserver(name metrics.MetricName, labels metrics.Labels) metrics.Observer

func IsEnabled

func IsEnabled() bool

func NewMetrics

func NewMetrics() metrics.Metrics

func Noop

func Noop() metrics.Metrics

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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