metrics

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elapsed added in v0.12.0

func Elapsed(h prometheus.Histogram) func()

Elapsed calculates and store method execution time for corresponding histogram.

Types

type ApiMetrics added in v0.12.0

type ApiMetrics struct {
	GetBalanceDuration               prometheus.Histogram
	AuthDuration                     prometheus.Histogram
	FormBinaryBearerDuration         prometheus.Histogram
	ListContainersDuration           prometheus.Histogram
	PutContainerDuration             prometheus.Histogram
	PostContainerDuration            prometheus.Histogram
	DeleteContainerDuration          prometheus.Histogram
	GetContainerDuration             prometheus.Histogram
	GetContainerEACLDuration         prometheus.Histogram
	PutContainerEACLDuration         prometheus.Histogram
	GetContainerObjectDuration       prometheus.Histogram
	HeadContainerObjectDuration      prometheus.Histogram
	GetByAttributeDuration           prometheus.Histogram
	HeadByAttributeDuration          prometheus.Histogram
	GetNetworkInfoDuration           prometheus.Histogram
	PutObjectDuration                prometheus.Histogram
	NewUploadContainerObjectDuration prometheus.Histogram
	NewGetByAttributeDuration        prometheus.Histogram
	NewHeadByAttributeDuration       prometheus.Histogram
	NewGetContainerObjectDuration    prometheus.Histogram
	NewHeadContainerObjectDuration   prometheus.Histogram
	SearchObjectsDuration            prometheus.Histogram
	DeleteObjectDuration             prometheus.Histogram
	GetObjectInfoDuration            prometheus.Histogram
	UploadContainerObjectDuration    prometheus.Histogram
	V2SearchObjectsDuration          prometheus.Histogram
}

ApiMetrics contains metric definitions for API.

func NewApiMetrics added in v0.12.0

func NewApiMetrics() *ApiMetrics

NewApiMetrics is a constructor ApiMetrics.

type Config

type Config struct {
	Address string
	Enabled bool
}

Config is a params to configure service.

type GateMetrics

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

func NewGateMetrics

func NewGateMetrics() *GateMetrics

NewGateMetrics creates new metrics for rest gate.

func (*GateMetrics) Collect

func (m *GateMetrics) Collect(ch chan<- prometheus.Metric)

func (GateMetrics) Describe

func (m GateMetrics) Describe(descs chan<- *prometheus.Desc)

func (*GateMetrics) SetGWVersion added in v0.6.0

func (g *GateMetrics) SetGWVersion(ver string)

func (GateMetrics) SetHealth

func (m GateMetrics) SetHealth(s int32)

type PoolMetrics added in v0.12.0

type PoolMetrics struct {
	BalanceGet                 prometheus.Histogram
	ContainerPut               prometheus.Histogram
	ContainerDelete            prometheus.Histogram
	ContainerGet               prometheus.Histogram
	ContainerSetEACL           prometheus.Histogram
	ContainerEACL              prometheus.Histogram
	ContainerList              prometheus.Histogram
	NetworkInfo                prometheus.Histogram
	ObjectHead                 prometheus.Histogram
	ObjectRangeInit            prometheus.Histogram
	ObjectDelete               prometheus.Histogram
	ObjectGetInit              prometheus.Histogram
	SearchObjects              prometheus.Histogram
	ObjectPutInit              prometheus.Histogram
	EndpointInfo               prometheus.Histogram
	SessionCreate              prometheus.Histogram
	NetMapSnapshot             prometheus.Histogram
	ObjectHash                 prometheus.Histogram
	ContainerAnnounceUsedSpace prometheus.Histogram
	AnnounceIntermediateTrust  prometheus.Histogram
	AnnounceLocalTrust         prometheus.Histogram
	ObjectGetStream            prometheus.Histogram
	ObjectRangeStream          prometheus.Histogram
	ObjectSearchStream         prometheus.Histogram
	ObjectPutStream            prometheus.Histogram
	ObjectSearchV2             prometheus.Histogram
	OverallErrors              *prometheus.CounterVec
}

PoolMetrics provides metrics for SDK pool method calls.

func NewPoolMetrics added in v0.12.0

func NewPoolMetrics() *PoolMetrics

NewPoolMetrics is a constructor for PoolMetrics.

func (*PoolMetrics) OperationCallback added in v0.12.0

func (m *PoolMetrics) OperationCallback(nodeKey []byte, endpoint string, method stat.Method, duration time.Duration, err error)

type Service

type Service struct {
	*http.Server
	// contains filtered or unexported fields
}

Service serves metrics.

func NewPprofService

func NewPprofService(l *zap.Logger, cfg Config) *Service

NewPprofService creates a new service for gathering pprof metrics.

func NewPrometheusService

func NewPrometheusService(log *zap.Logger, cfg Config) *Service

NewPrometheusService creates a new service for gathering prometheus metrics.

func (*Service) ShutDown

func (ms *Service) ShutDown(ctx context.Context)

ShutDown stops the service.

func (*Service) Start

func (ms *Service) Start()

Start runs http service with the exposed endpoint on the configured port.

Jump to

Keyboard shortcuts

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