Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var A = Attributes
A is an alias for Attributes.
var Attributes = struct {
}{}
Attributes contains the possible metric attributes that can be used.
Functions ¶
func WithStartTime ¶
WithStartTime sets startTime on the metrics builder.
Types ¶
type MetricSettings ¶
type MetricSettings struct {
Enabled bool `mapstructure:"enabled"`
}
MetricSettings provides common settings for a particular metric.
type MetricsBuilder ¶
type MetricsBuilder struct {
// contains filtered or unexported fields
}
MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user settings.
func NewMetricsBuilder ¶
func NewMetricsBuilder(settings MetricsSettings, options ...metricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶
func (mb *MetricsBuilder) Emit(metrics pdata.MetricSlice)
Emit appends generated metrics to a pdata.MetricsSlice and updates the internal state to be ready for recording another set of data points. This function will be doing all transformations required to produce metric representation defined in metadata and user settings, e.g. delta/cumulative translation.
func (*MetricsBuilder) Reset ¶
func (mb *MetricsBuilder) Reset(options ...metricBuilderOption)
Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, and metrics builder should update its startTime and reset it's internal state accordingly.
type MetricsSettings ¶
type MetricsSettings struct { }
MetricsSettings provides settings for couchbasereceiver metrics.
func DefaultMetricsSettings ¶
func DefaultMetricsSettings() MetricsSettings