Documentation ¶
Index ¶
- Variables
- func AccumulateTagsFor(entity string, cardinality collectors.TagCardinality, tb tagset.TagAccumulator) error
- func AgentTags(cardinality collectors.TagCardinality) ([]string, error)
- func EnrichTags(tb tagset.TagAccumulator, origin string, k8sOriginID string, ...)
- func GetEntity(entityID string) (*types.Entity, error)
- func GetEntityHash(entity string, cardinality collectors.TagCardinality) string
- func Init() error
- func List(cardinality collectors.TagCardinality) response.TaggerListResponse
- func OrchestratorScopeTag() ([]string, error)
- func OrchestratorScopeTagBuilder(tb tagset.TagAccumulator) error
- func ResetCaptureTagger()
- func SetCaptureTagger(tagger Tagger)
- func SetDefaultTagger(tagger Tagger)
- func StandardTags(entity string) ([]string, error)
- func Stop() error
- func Tag(entity string, cardinality collectors.TagCardinality) ([]string, 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 AccumulateTagsFor ¶
func AccumulateTagsFor(entity string, cardinality collectors.TagCardinality, tb tagset.TagAccumulator) error
AccumulateTagsFor queries the defaultTagger to get entity tags from cache or sources and appends them to the TagAccumulator. It can return tags at high cardinality (with tags about individual containers), or at orchestrator cardinality (pod/task level).
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 EnrichTags ¶
func EnrichTags(tb tagset.TagAccumulator, origin string, k8sOriginID string, cardinalityName string)
EnrichTags extends a tag list with origin detection tags NOTE(remy): it is not needed to sort/dedup the tags anymore since after the enrichment, the metric and its tags is sent to the context key generator, which is taking care of deduping the tags while generating the context key.
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 tagset.TagAccumulator) error
OrchestratorScopeTagBuilder queries tags for orchestrator scope (e.g. task_arn in ECS Fargate) and appends them to the TagAccumulator
func ResetCaptureTagger ¶
func ResetCaptureTagger()
ResetCaptureTagger resets the capture tagger to nil
func SetCaptureTagger ¶
func SetCaptureTagger(tagger Tagger)
SetCaptureTagger sets the tagger to be used when replaying a capture
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 captureTagger (for replay scenarios) or the defaultTagger. 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) AccumulateTagsFor(entity string, cardinality collectors.TagCardinality, tb tagset.TagAccumulator) error Standard(entity string) ([]string, error) List(cardinality collectors.TagCardinality) response.TaggerListResponse GetEntity(entityID string) (*types.Entity, error) 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