observability

package
v0.7.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package observability provides metrics, profiling, and etc.

Index

Constants

This section is empty.

Variables

View Source
var (
	// RootScope is the root scope for all metrics.
	RootScope = meter.NewHierarchicalScope("banyandb", "_")
	// SystemScope is the system scope for all metrics.
	SystemScope = RootScope.SubScope("system")
)
View Source
var MetricsCollector = Collector{
	// contains filtered or unexported fields
}

MetricsCollector is a global metrics collector.

Functions

func NewProfService

func NewProfService() run.Service

NewProfService returns a pprof service.

func UpdatePath added in v0.4.0

func UpdatePath(path string)

UpdatePath updates a path to monitoring its disk usage.

Types

type Collector added in v0.4.0

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

Collector is a metrics collector.

func (*Collector) Register added in v0.4.0

func (c *Collector) Register(name string, getter MetricsGetter)

Register registers a metrics getter.

func (*Collector) Unregister added in v0.4.0

func (c *Collector) Unregister(name string)

Unregister unregisters a metrics getter.

type Factory added in v0.7.0

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

Factory is the factory for creating metrics.

func (*Factory) NewCounter added in v0.7.0

func (f *Factory) NewCounter(name string, labelNames ...string) meter.Counter

NewCounter init and return the counterCollection.

func (*Factory) NewGauge added in v0.7.0

func (f *Factory) NewGauge(name string, labelNames ...string) meter.Gauge

NewGauge init and return the gaugeCollection.

func (*Factory) NewHistogram added in v0.7.0

func (f *Factory) NewHistogram(name string, buckets meter.Buckets, labelNames ...string) meter.Histogram

NewHistogram init and return the histogramCollection.

type MetricsGetter added in v0.4.0

type MetricsGetter func()

MetricsGetter is a function that collects metrics.

type MetricsRegistry added in v0.7.0

type MetricsRegistry interface {
	run.Service
	// With returns a factory with the given scope.
	With(scope meter.Scope) *Factory
	// NativeEnabled returns whether the native mode is enabled.
	NativeEnabled() bool
}

MetricsRegistry is the interface for metrics registry.

func NewMetricService

func NewMetricService(metadata metadata.Repo, pipeline queue.Client, nodeType string, nodeSelector native.NodeSelector) MetricsRegistry

NewMetricService returns a metric service.

type SchedulerMetrics added in v0.7.0

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

SchedulerMetrics is the metrics for scheduler.

func NewSchedulerMetrics added in v0.7.0

func NewSchedulerMetrics(factory *Factory) *SchedulerMetrics

NewSchedulerMetrics creates a new scheduler metrics.

func (*SchedulerMetrics) Collect added in v0.7.0

func (sm *SchedulerMetrics) Collect(job string, m *timestamp.SchedulerMetrics)

Collect collects the scheduler metrics.

type Service added in v0.7.0

type Service interface {
	run.PreRunner
	run.Service
}

Service type for Metric Service.

Jump to

Keyboard shortcuts

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