telemetry

package
v0.0.0-...-ea1c39e Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closeable

type Closeable interface {
	Close()
}

type CloseableDogStatsdSink

type CloseableDogStatsdSink struct {
	*datadog.DogStatsdSink
}

func NewCloseableDogStatsdSink

func NewCloseableDogStatsdSink(addr string, hostName string) (*CloseableDogStatsdSink, error)

func (*CloseableDogStatsdSink) Close

func (s *CloseableDogStatsdSink) Close()

type CloseableMetricSink

type CloseableMetricSink interface {
	Closeable
	metrics.MetricSink
}

type CloseableMetricSinkAdapter

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

func NewCloseableMetricSinkAdapter

func NewCloseableMetricSinkAdapter(delegate metrics.MetricSink) *CloseableMetricSinkAdapter

func (*CloseableMetricSinkAdapter) AddSample

func (w *CloseableMetricSinkAdapter) AddSample(key []string, val float32)

func (*CloseableMetricSinkAdapter) AddSampleWithLabels

func (w *CloseableMetricSinkAdapter) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)

func (*CloseableMetricSinkAdapter) Close

func (w *CloseableMetricSinkAdapter) Close()

func (*CloseableMetricSinkAdapter) EmitKey

func (w *CloseableMetricSinkAdapter) EmitKey(key []string, val float32)

func (*CloseableMetricSinkAdapter) IncrCounter

func (w *CloseableMetricSinkAdapter) IncrCounter(key []string, val float32)

func (*CloseableMetricSinkAdapter) IncrCounterWithLabels

func (w *CloseableMetricSinkAdapter) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)

func (*CloseableMetricSinkAdapter) SetGauge

func (w *CloseableMetricSinkAdapter) SetGauge(key []string, val float32)

func (*CloseableMetricSinkAdapter) SetGaugeWithLabels

func (w *CloseableMetricSinkAdapter) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)

type Telemetry

type Telemetry struct {
	Metrics *metrics.Metrics
	// contains filtered or unexported fields
}

func MustNullTelemetry

func MustNullTelemetry() *Telemetry

func NewTelemetry

func NewTelemetry(opts *TelemetryOpts) (*Telemetry, error)

func NewTelemetryForCloseableSink

func NewTelemetryForCloseableSink(opts *TelemetryOpts, sink CloseableMetricSink) (*Telemetry, error)

func NewTelemetryForSink

func NewTelemetryForSink(opts *TelemetryOpts, sink metrics.MetricSink) (*Telemetry, error)

func NullTelemetry

func NullTelemetry() (*Telemetry, error)

func (*Telemetry) AddLabel

func (t *Telemetry) AddLabel(name string, value string)

func (*Telemetry) Close

func (t *Telemetry) Close()

func (*Telemetry) Instrument

func (t *Telemetry) Instrument(baseMetricName []string, err *error) func()

type TelemetryOpts

type TelemetryOpts struct {
	ServiceName string

	// ServiceName && AsLabel == service name as label
	//
	// ServiceName && !AsLabel == service name as prefix
	ServiceAsLabel          bool
	Socket                  string
	Labels                  map[string]string
	OIDCMetricName          []string
	RolesAnywhereMetricName []string
}

Jump to

Keyboard shortcuts

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