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 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
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
NewCounter init and return the counterCollection.
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.
Click to show internal directories.
Click to hide internal directories.