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 ¶
- func IsRollupID(name []byte, tags []byte, iterPool id.SortedTagIteratorPool) bool
- func NameAndTags(id []byte) ([]byte, []byte, error)
- func NewID(id []byte, iterPool id.SortedTagIteratorPool) id.ID
- func NewPooledSortedTagIterator(sortedTagPairs []byte, pool id.SortedTagIteratorPool) id.SortedTagIterator
- func NewRollupID(name []byte, tagPairs []id.TagPair) []byte
- func NewSortedTagIterator(sortedTagPairs []byte) id.SortedTagIterator
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 ¶
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 ¶
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.