m3

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Overview

Package m3 describes m3 metric id information.

Each M3 metric id contains a metric name and a set of tag pairs. In particular, it conforms to the following format:

m3+<metric_name>+tagName1=tagValue1,tagName2=tagValue2,...tagNameN=tagValueN,

Where the tag names are sorted alphabetically in ascending order.

An example m3 metrid id is as follows: m3+response_code+env=bar,service=foo,status=404,type=counters

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRollupID

func IsRollupID(name []byte, tags []byte, iterPool id.SortedTagIteratorPool) bool

IsRollupID determines whether an id is a rollup id. Caller may optionally pass in a sorted tag iterator pool for efficiency reasons. nolint: unparam

func NameAndTags

func NameAndTags(id []byte) ([]byte, []byte, error)

NameAndTags returns the name and the tags of the given id.

func NewID

func NewID(id []byte, iterPool id.SortedTagIteratorPool) id.ID

NewID creates a new m3 metric id.

func NewPooledSortedTagIterator

func NewPooledSortedTagIterator(sortedTagPairs []byte, pool id.SortedTagIteratorPool) id.SortedTagIterator

NewPooledSortedTagIterator creates a new pooled sorted tag iterator.

func NewRollupID

func NewRollupID(name []byte, tagPairs []id.TagPair) []byte

NewRollupID generates a new rollup id given the new metric name and a list of tag pairs. Note that tagPairs are mutated in place.

func NewSortedTagIterator

func NewSortedTagIterator(sortedTagPairs []byte) id.SortedTagIterator

NewSortedTagIterator creates a new sorted tag iterator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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