ingestcarbon

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Overview

Package ingestcarbon implements a carbon ingester.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTagsFromName

func GenerateTagsFromName(
	name []byte,
	opts models.TagOptions,
) (models.Tags, error)

GenerateTagsFromName accepts a carbon metric name and blows it up into a list of key-value pair tags such that an input like:

foo.bar.baz

becomes

__g0__:foo
__g1__:bar
__g2__:baz

func GenerateTagsFromNameIntoSlice

func GenerateTagsFromNameIntoSlice(
	name []byte,
	opts models.TagOptions,
	tags []models.Tag,
) (models.Tags, error)

GenerateTagsFromNameIntoSlice does the same thing as GenerateTagsFromName except it allows the caller to provide the slice into which the tags are appended.

func NewIngester

func NewIngester(
	downsamplerAndWriter ingest.DownsamplerAndWriter,
	clusterNamespacesWatcher m3.ClusterNamespacesWatcher,
	opts Options,
) (m3xserver.Handler, error)

NewIngester returns an ingester for carbon metrics.

Types

type CarbonIngesterRules

type CarbonIngesterRules struct {
	Rules []config.CarbonIngesterRuleConfiguration
}

CarbonIngesterRules contains the carbon ingestion rules.

type Options

type Options struct {
	InstrumentOptions instrument.Options
	WorkerPool        xsync.PooledWorkerPool
	IngesterConfig    config.CarbonIngesterConfiguration
}

Options configures the ingester.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the options struct.

Jump to

Keyboard shortcuts

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