Documentation ¶
Overview ¶
Package taggerimpl contains the implementation of the tagger component.
Index ¶
- func Module() fxutil.Module
- func NewOptionalTagger(deps optionalTaggerDeps) optional.Option[taggerComp.Component]
- func OptionalModule() fxutil.Module
- type TaggerClient
- func (t *TaggerClient) AccumulateTagsFor(entity string, cardinality types.TagCardinality, tb tagset.TagsAccumulator) error
- func (t *TaggerClient) AgentTags(cardinality types.TagCardinality) ([]string, error)
- func (t *TaggerClient) ChecksCardinality() types.TagCardinality
- func (t *TaggerClient) DogstatsdCardinality() types.TagCardinality
- func (t *TaggerClient) EnrichTags(tb tagset.TagsAccumulator, originInfo taggertypes.OriginInfo)
- func (t *TaggerClient) GetDefaultTagger() taggerComp.Component
- func (t *TaggerClient) GetEntity(entityID string) (*types.Entity, error)
- func (t *TaggerClient) GetEntityHash(entity string, cardinality types.TagCardinality) string
- func (t *TaggerClient) GlobalTags(cardinality types.TagCardinality) ([]string, error)
- func (t *TaggerClient) List() types.TaggerListResponse
- func (t *TaggerClient) ResetCaptureTagger()
- func (t *TaggerClient) SetNewCaptureTagger(newCaptureTagger taggerComp.Component)
- func (t *TaggerClient) Standard(entity string) ([]string, error)
- func (t *TaggerClient) Start(ctx context.Context) error
- func (t *TaggerClient) Stop() error
- func (t *TaggerClient) Subscribe(cardinality types.TagCardinality) chan []types.EntityEvent
- func (t *TaggerClient) Tag(entity string, cardinality types.TagCardinality) ([]string, error)
- func (t *TaggerClient) Unsubscribe(ch chan []types.EntityEvent)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptionalTagger ¶
func NewOptionalTagger(deps optionalTaggerDeps) optional.Option[taggerComp.Component]
NewOptionalTagger returns a tagger component if workloadmeta is available
func OptionalModule ¶
OptionalModule defines the fx options when tagger should be used as an optional
Types ¶
type TaggerClient ¶
type TaggerClient struct {
// contains filtered or unexported fields
}
TaggerClient is a component that contains two tagger component: capturetagger and defaulttagger
nolint:revive // TODO(containers) Fix revive linter
func (*TaggerClient) AccumulateTagsFor ¶
func (t *TaggerClient) AccumulateTagsFor(entity string, cardinality types.TagCardinality, tb tagset.TagsAccumulator) error
AccumulateTagsFor queries the defaultTagger to get entity tags from cache or sources and appends them to the TagsAccumulator. It can return tags at high cardinality (with tags about individual containers), or at orchestrator cardinality (pod/task level).
func (*TaggerClient) AgentTags ¶
func (t *TaggerClient) AgentTags(cardinality types.TagCardinality) ([]string, error)
AgentTags returns the agent tags It relies on the container provider utils to get the Agent container ID
func (*TaggerClient) ChecksCardinality ¶
func (t *TaggerClient) ChecksCardinality() types.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.
func (*TaggerClient) DogstatsdCardinality ¶
func (t *TaggerClient) DogstatsdCardinality() types.TagCardinality
DogstatsdCardinality defines the cardinality of tags we should send for metrics from dogstatsd.
func (*TaggerClient) EnrichTags ¶
func (t *TaggerClient) EnrichTags(tb tagset.TagsAccumulator, originInfo taggertypes.OriginInfo)
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 (*TaggerClient) GetDefaultTagger ¶
func (t *TaggerClient) GetDefaultTagger() taggerComp.Component
GetDefaultTagger returns the default Tagger in current instance
func (*TaggerClient) GetEntity ¶
func (t *TaggerClient) GetEntity(entityID string) (*types.Entity, error)
GetEntity returns the hash for the provided entity id.
func (*TaggerClient) GetEntityHash ¶
func (t *TaggerClient) GetEntityHash(entity string, cardinality types.TagCardinality) string
GetEntityHash returns the hash for the tags associated with the given entity Returns an empty string if the tags lookup fails
func (*TaggerClient) GlobalTags ¶
func (t *TaggerClient) GlobalTags(cardinality types.TagCardinality) ([]string, error)
GlobalTags queries global tags that should apply to all data coming from the agent.
func (*TaggerClient) List ¶
func (t *TaggerClient) List() types.TaggerListResponse
List the content of the defaulTagger
func (*TaggerClient) ResetCaptureTagger ¶
func (t *TaggerClient) ResetCaptureTagger()
ResetCaptureTagger resets the capture tagger to nil
func (*TaggerClient) SetNewCaptureTagger ¶
func (t *TaggerClient) SetNewCaptureTagger(newCaptureTagger taggerComp.Component)
SetNewCaptureTagger sets the tagger to be used when replaying a capture
func (*TaggerClient) Standard ¶
func (t *TaggerClient) Standard(entity string) ([]string, error)
Standard queries the defaultTagger to get entity standard tags (env, version, service) from cache or sources.
func (*TaggerClient) Start ¶
func (t *TaggerClient) Start(ctx context.Context) error
Start calls defaultTagger.Start
func (*TaggerClient) Subscribe ¶
func (t *TaggerClient) Subscribe(cardinality types.TagCardinality) chan []types.EntityEvent
Subscribe calls defaultTagger.Subscribe
func (*TaggerClient) Tag ¶
func (t *TaggerClient) Tag(entity string, cardinality types.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 (*TaggerClient) Unsubscribe ¶
func (t *TaggerClient) Unsubscribe(ch chan []types.EntityEvent)
Unsubscribe calls defaultTagger.Unsubscribe
Directories ¶
Path | Synopsis |
---|---|
Package api implements the Tagger API.
|
Package api implements the Tagger API. |
Package collectors implements a collector for the Tagger component that subscribes to workloadmeta
|
Package collectors implements a collector for the Tagger component that subscribes to workloadmeta |
Package empty implements empty functions for the tagger component interface.
|
Package empty implements empty functions for the tagger component interface. |
Package local implements a local Tagger.
|
Package local implements a local Tagger. |
Package remote implements a remote Tagger.
|
Package remote implements a remote Tagger. |
Package replay implements the Tagger replay.
|
Package replay implements the Tagger replay. |
Package server implements a gRPC server that streams Tagger entities.
|
Package server implements a gRPC server that streams Tagger entities. |
Package subscriber implements the functionality needed to subscribe to events generated by the Tagger component.
|
Package subscriber implements the functionality needed to subscribe to events generated by the Tagger component. |
Package tagstore implements the TagStore which is the component of the Tagger responsible for storing the tags in memory.
|
Package tagstore implements the TagStore which is the component of the Tagger responsible for storing the tags in memory. |
Package telemetry defines the telemetry for the Tagger component.
|
Package telemetry defines the telemetry for the Tagger component. |