Documentation ¶
Index ¶
- Variables
- func AgentTags(cardinality collectors.TagCardinality) ([]string, error)
- func GetEntityHash(entity string, cardinality collectors.TagCardinality) string
- func Init()
- func List(cardinality collectors.TagCardinality) response.TaggerListResponse
- func OrchestratorScopeTag() ([]string, error)
- func OrchestratorScopeTagBuilder(tb *util.TagsBuilder) error
- func SetDefaultTagger(tagger Tagger)
- func StandardTags(entity string) ([]string, error)
- func Stop() error
- func Tag(entity string, cardinality collectors.TagCardinality) ([]string, error)
- func TagBuilder(entity string, cardinality collectors.TagCardinality, tb *util.TagsBuilder) error
- func TagWithHash(entity string, cardinality collectors.TagCardinality) ([]string, string, error)
- type Tagger
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 AgentTags ¶
func AgentTags(cardinality collectors.TagCardinality) ([]string, error)
AgentTags returns the agent tags It relies on the container provider utils to get the Agent container ID
func GetEntityHash ¶
func GetEntityHash(entity string, cardinality collectors.TagCardinality) string
GetEntityHash returns the hash for the tags associated with the given entity Returns an empty string if the tags lookup fails
func List ¶
func List(cardinality collectors.TagCardinality) response.TaggerListResponse
List the content of the defaulTagger
func OrchestratorScopeTag ¶
OrchestratorScopeTag queries tags for orchestrator scope (e.g. task_arn in ECS Fargate)
func OrchestratorScopeTagBuilder ¶
func OrchestratorScopeTagBuilder(tb *util.TagsBuilder) error
OrchestratorScopeTagBuilder queries tags for orchestrator scope (e.g. task_arn in ECS Fargate) and appends them to the TagsBuilder
func SetDefaultTagger ¶
func SetDefaultTagger(tagger Tagger)
SetDefaultTagger sets the global Tagger instance
func StandardTags ¶
StandardTags queries the defaultTagger to get entity standard tags (env, version, service) from cache or sources.
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).
func TagBuilder ¶
func TagBuilder(entity string, cardinality collectors.TagCardinality, tb *util.TagsBuilder) error
TagBuilder queries the defaultTagger to get entity tags from cache or sources and appends them to the TagsBuilder. It can return tags at high cardinality (with tags about individual containers), or at orchestrator cardinality (pod/task level).
func TagWithHash ¶
func TagWithHash(entity string, cardinality collectors.TagCardinality) ([]string, string, error)
TagWithHash is similar to Tag but it also computes and returns the hash of the tags found
Types ¶
type Tagger ¶
type Tagger interface { Init() error Stop() error Tag(entity string, cardinality collectors.TagCardinality) ([]string, error) TagBuilder(entity string, cardinality collectors.TagCardinality, tb *util.TagsBuilder) error Standard(entity string) ([]string, error) List(cardinality collectors.TagCardinality) response.TaggerListResponse Subscribe(cardinality collectors.TagCardinality) chan []types.EntityEvent Unsubscribe(ch chan []types.EntityEvent) }
Tagger is an interface for transparent access to both localTagger and remoteTagger.
func GetDefaultTagger ¶
func GetDefaultTagger() Tagger
GetDefaultTagger returns the global Tagger instance