Documentation ¶
Index ¶
- Variables
- func GetEntityHash(entity string) string
- func Init()
- func List(cardinality collectors.TagCardinality) response.TaggerListResponse
- func Stop() error
- func Tag(entity string, cardinality collectors.TagCardinality) ([]string, error)
- type Tagger
- func (t *Tagger) GetEntityHash(entity string) string
- func (t *Tagger) Init(catalog collectors.Catalog)
- func (t *Tagger) List(cardinality collectors.TagCardinality) response.TaggerListResponse
- func (t *Tagger) Stop() error
- func (t *Tagger) Tag(entity string, cardinality collectors.TagCardinality) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var ChecksCardinality collectors.TagCardinality
ChecksCardinality defines the cardinality of tags we should send for check metrics this can still be overridden when calling get_tags in python checks.
var DogstatsdCardinality collectors.TagCardinality
DogstatsdCardinality defines the cardinality of tags we should send for metrics from dogstatsd.
Functions ¶
func GetEntityHash ¶
GetEntityHash returns the hash for the tags associated with the given entity
func List ¶
func List(cardinality collectors.TagCardinality) response.TaggerListResponse
List the content of the defaulTagger
func Tag ¶
func Tag(entity string, cardinality collectors.TagCardinality) ([]string, error)
Tag queries the defaultTagger to get entity tags from cache or sources. It can return tags at high cardinality (with tags about individual containers), or at orchestrator cardinality (pod/task level)
Types ¶
type Tagger ¶
Tagger is the entry class for entity tagging. It holds collectors, memory store and handles the query logic. One can use the package methods to use the default tagger instead of instantiating one.
func (*Tagger) GetEntityHash ¶
GetEntityHash returns the tags hash of an entity
func (*Tagger) Init ¶
func (t *Tagger) Init(catalog collectors.Catalog)
Init goes through a catalog and tries to detect which are relevant for this host. It then starts the collection logic and is ready for requests.
func (*Tagger) List ¶
func (t *Tagger) List(cardinality collectors.TagCardinality) response.TaggerListResponse
List the content of the tagger
func (*Tagger) Tag ¶
func (t *Tagger) Tag(entity string, cardinality collectors.TagCardinality) ([]string, error)
Tag returns tags for a given entity