dogstatsd

package module
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package dogstatsd provides a StatsD exporter.

Deprecated: This package is no longer supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallNewPipeline

func InstallNewPipeline(config Config) (*controller.Controller, error)

InstallNewPipeline instantiates a NewExportPipeline and registers it globally. Typically called as:

pipeline, err := dogstatsd.InstallNewPipeline(dogstatsd.Config{...})
if err != nil {
	...
}
defer pipeline.Stop()
... Done

func NewExportPipeline

func NewExportPipeline(config Config, opts ...controller.Option) (*controller.Controller, error)

NewExportPipeline sets up a complete export pipeline with the recommended setup, chaining a NewRawExporter into the recommended selectors and batchers.

func SemVersion added in v0.25.0

func SemVersion() string

SemVersion is the semantic version to be supplied to tracer/meter creation.

func Version added in v0.25.0

func Version() string

Version is the current release version of the dogstatsd exporter.

Types

type AttributeEncoder added in v0.18.0

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

AttributeEncoder encodes metric attributes in the dogstatsd syntax.

TODO: find a link for this syntax. It's been copied out of code, not a specification:

https://github.com/stripe/veneur/blob/master/sinks/datadog/datadog.go

func NewAttributeEncoder added in v0.18.0

func NewAttributeEncoder() *AttributeEncoder

NewAttributeEncoder returns a new encoder for dogstatsd-syntax metric attributes.

func (*AttributeEncoder) Encode added in v0.18.0

func (e *AttributeEncoder) Encode(iter attribute.Iterator) string

Encode emits a string like "|#key1:value1,key2:value2".

func (*AttributeEncoder) ID added in v0.18.0

type Config

type Config = statsd.Config

type Exporter

type Exporter struct {
	*statsd.Exporter
	// contains filtered or unexported fields
}

Exporter implements a dogstatsd-format statsd exporter, which encodes attribute sets as independent fields in the output.

TODO: find a link for this syntax. It's been copied out of code, not a specification:

https://github.com/stripe/veneur/blob/master/sinks/datadog/datadog.go

func NewRawExporter

func NewRawExporter(config Config) (*Exporter, error)

NewRawExporter returns a new Dogstatsd-syntax exporter for use in a pipeline.

func (*Exporter) AppendName

func (*Exporter) AppendName(rec export.Record, buf *bytes.Buffer)

AppendName is part of the stats-internal adapter interface.

func (*Exporter) AppendTags

func (e *Exporter) AppendTags(rec export.Record, res *resource.Resource, buf *bytes.Buffer)

AppendTags is part of the stats-internal adapter interface.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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