metrics

package
v0.0.0-...-bfe00b6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package metrics provides the serverless metric agent for collecting and forwarding metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DogStatsDFactory

type DogStatsDFactory interface {
	NewServer(demux aggregator.Demultiplexer, extraTags []string) (dogstatsdServer.ServerlessDogstatsd, error)
}

DogStatsDFactory allows create a new DogStatsD server

type MetricConfig

type MetricConfig struct {
}

MetricConfig abstacts the config package

func (*MetricConfig) GetMultipleEndpoints

func (m *MetricConfig) GetMultipleEndpoints() (utils.EndpointDescriptorSet, error)

GetMultipleEndpoints returns the api keys per domain specified in the main agent config

type MetricDogStatsD

type MetricDogStatsD struct {
}

MetricDogStatsD abstracts the DogStatsD package

func (*MetricDogStatsD) NewServer

NewServer returns a running DogStatsD server

type MultipleEndpointConfig

type MultipleEndpointConfig interface {
	GetMultipleEndpoints() (utils.EndpointDescriptorSet, error)
}

MultipleEndpointConfig abstracts the config package

type ServerlessMetricAgent

type ServerlessMetricAgent struct {
	Tagger tagger.Component
	Demux  aggregator.Demultiplexer

	SketchesBucketOffset time.Duration
	// contains filtered or unexported fields
}

ServerlessMetricAgent represents the DogStatsD server and the aggregator

func (*ServerlessMetricAgent) AddEnhancedMetric

func (c *ServerlessMetricAgent) AddEnhancedMetric(name string, value float64, metricSource metrics.MetricSource, timestamp float64, extraTags ...string)

AddEnhancedMetric reports a metric value to the intake with the given timestamp and tags selected for enhanced metrics. optional tags supplied as `key:value` strings through extraTags.

func (*ServerlessMetricAgent) AddEnhancedUsageMetric

func (c *ServerlessMetricAgent) AddEnhancedUsageMetric(name string, value float64, metricSource metrics.MetricSource, timestamp float64, extraTags ...string)

AddEnhancedUsageMetric reports a metric value to the intake with the given timestamp and tags selected for enhanced usage metrics. optional tags supplied as `key:value` strings through extraTags.

func (*ServerlessMetricAgent) AddLegacyEnhancedMetric

func (c *ServerlessMetricAgent) AddLegacyEnhancedMetric(name string, value float64, metricSource metrics.MetricSource, extraTags ...string)

AddLegacyEnhancedMetric reports a metric value to the intake with all tags. This method should be removed in a future major serverless-init release. optional tags supplied as `key:value` strings through extraTags.

func (*ServerlessMetricAgent) Flush

func (c *ServerlessMetricAgent) Flush()

Flush triggers a DogStatsD flush

func (*ServerlessMetricAgent) IsReady

func (c *ServerlessMetricAgent) IsReady() bool

IsReady indicates whether or not the DogStatsD server is ready

func (*ServerlessMetricAgent) Start

func (c *ServerlessMetricAgent) Start(forwarderTimeout time.Duration, multipleEndpointConfig MultipleEndpointConfig, dogstatFactory DogStatsDFactory, shouldForceFlushAllOnForceFlushToSerializer bool, extraTags []string, enhancedMetricTags []string, enhancedUsageMetricTags []string)

Start starts the DogStatsD agent

func (*ServerlessMetricAgent) Stop

func (c *ServerlessMetricAgent) Stop()

Stop stops the DogStatsD server

func (*ServerlessMetricAgent) WaitForPendingSamples

func (c *ServerlessMetricAgent) WaitForPendingSamples()

WaitForPendingSamples blocks until all buffered metric samples have been consumed by the worker. Only safe during shutdown when no new samples are being submitted.

Jump to

Keyboard shortcuts

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