Documentation ¶
Overview ¶
Package tagger provides the tagger component for the Datadog Agent
Index ¶
- func AgentTags(cardinality types.TagCardinality) ([]string, error)
- func ChecksCardinality() types.TagCardinality
- func DogstatsdCardinality() types.TagCardinality
- func EnrichTags(tb tagset.TagsAccumulator, originInfo taggertypes.OriginInfo)
- func GetEntity(entityID string) (*types.Entity, error)
- func GetEntityHash(entityID string, cardinality types.TagCardinality) string
- func GlobalTags(cardinality types.TagCardinality) ([]string, error)
- func List() types.TaggerListResponse
- func ResetCaptureTagger()
- func SetGlobalTaggerClient(t Component)
- func SetNewCaptureTagger(newCaptureTagger Component)
- func StandardTags(entityID string) ([]string, error)
- func Tag(entity string, cardinality types.TagCardinality) ([]string, error)
- func UnlockGlobalTaggerClient()
- type AgentTypeForTagger
- type Component
- type Params
- type ReplayTagger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentTags ¶
func AgentTags(cardinality types.TagCardinality) ([]string, error)
AgentTags is an interface function that queries taggerclient singleton
func ChecksCardinality ¶
func ChecksCardinality() types.TagCardinality
ChecksCardinality is an interface function that queries taggerclient singleton
func DogstatsdCardinality ¶
func DogstatsdCardinality() types.TagCardinality
DogstatsdCardinality is an interface function that queries taggerclient singleton
func EnrichTags ¶
func EnrichTags(tb tagset.TagsAccumulator, originInfo taggertypes.OriginInfo)
EnrichTags is an interface function that queries taggerclient singleton
func GetEntityHash ¶
func GetEntityHash(entityID string, cardinality types.TagCardinality) string
GetEntityHash is an interface function that queries taggerclient singleton
func GlobalTags ¶
func GlobalTags(cardinality types.TagCardinality) ([]string, error)
GlobalTags is an interface function that queries taggerclient singleton
func SetGlobalTaggerClient ¶
func SetGlobalTaggerClient(t Component)
SetGlobalTaggerClient sets the global taggerClient instance
func SetNewCaptureTagger ¶
func SetNewCaptureTagger(newCaptureTagger Component)
SetNewCaptureTagger will set capture tagger in global tagger instance by using provided capture tagger
func StandardTags ¶
StandardTags is an interface function that queries taggerclient singleton
func Tag ¶
func Tag(entity string, cardinality types.TagCardinality) ([]string, error)
Tag is an interface function that queries taggerclient singleton
func UnlockGlobalTaggerClient ¶
func UnlockGlobalTaggerClient()
UnlockGlobalTaggerClient releases the initOnce lock on the global tagger. For testing only.
Types ¶
type AgentTypeForTagger ¶
type AgentTypeForTagger uint8
AgentTypeForTagger represents agent types that tagger is used for
const ( LocalTaggerAgent AgentTypeForTagger = 1 << iota NodeRemoteTaggerAgent CLCRunnerRemoteTaggerAgent FakeTagger )
Define agent type for tagger
type Component ¶
type Component interface { Start(ctx context.Context) error Stop() error ReplayTagger() ReplayTagger GetTaggerTelemetryStore() *telemetry.Store Tag(entityID string, cardinality types.TagCardinality) ([]string, error) AccumulateTagsFor(entityID string, cardinality types.TagCardinality, tb tagset.TagsAccumulator) error Standard(entityID string) ([]string, error) List() types.TaggerListResponse GetEntity(entityID string) (*types.Entity, error) Subscribe(cardinality types.TagCardinality) chan []types.EntityEvent Unsubscribe(ch chan []types.EntityEvent) GetEntityHash(entityID string, cardinality types.TagCardinality) string AgentTags(cardinality types.TagCardinality) ([]string, error) GlobalTags(cardinality types.TagCardinality) ([]string, error) SetNewCaptureTagger(newCaptureTagger Component) ResetCaptureTagger() EnrichTags(tb tagset.TagsAccumulator, originInfo taggertypes.OriginInfo) ChecksCardinality() types.TagCardinality DogstatsdCardinality() types.TagCardinality }
Component is the component type.
func GetTaggerInstance ¶
func GetTaggerInstance() Component
GetTaggerInstance returns the global Tagger instance
type Params ¶
type Params struct { AgentTypeForTagger AgentTypeForTagger FallBackToLocalIfRemoteTaggerFails bool }
Params provides the kind of agent we're instantiating workloadmeta for
func NewCLCRunnerRemoteTaggerParams ¶
func NewCLCRunnerRemoteTaggerParams() Params
NewCLCRunnerRemoteTaggerParams creates a Params struct with the CLCRunnerRemoteTagger type
func NewFakeTaggerParams ¶
func NewFakeTaggerParams() Params
NewFakeTaggerParams creates a Params struct with the FakeTagger type and for testing purposes
func NewNodeRemoteTaggerParams ¶
func NewNodeRemoteTaggerParams() Params
NewNodeRemoteTaggerParams creates a Params struct with the NodeRemoteTagger type
func NewNodeRemoteTaggerParamsWithFallback ¶
func NewNodeRemoteTaggerParamsWithFallback() Params
NewNodeRemoteTaggerParamsWithFallback creates a Params struct with the NodeRemoteTagger type and fallback to local tagger if remote tagger fails
func NewTaggerParams ¶
func NewTaggerParams() Params
NewTaggerParams creates a Params struct with the default LocalTagger type
func NewTaggerParamsForCoreAgent ¶
NewTaggerParamsForCoreAgent is a constructor function for creating core agent tagger params
type ReplayTagger ¶
type ReplayTagger interface { Component // LoadState loads the state of the replay tagger from a list of entities. LoadState(state []types.Entity) }
ReplayTagger interface represent the tagger use for replaying dogstatsd events.
Directories ¶
Path | Synopsis |
---|---|
Package common provides common utilities that are useful when interacting with the tagger.
|
Package common provides common utilities that are useful when interacting with the tagger. |
Package k8smetadata provides utilities to handle kubernetes metadata as tags
|
Package k8smetadata provides utilities to handle kubernetes metadata as tags |
Package kubetags provides utilities to handle tags related to Kubernetes.
|
Package kubetags provides utilities to handle tags related to Kubernetes. |
Package noopimpl provides a noop implementation for the tagger component
|
Package noopimpl provides a noop implementation for the tagger component |
Package proto provides conversions between Tagger types and protobuf.
|
Package proto provides conversions between Tagger types and protobuf. |
Package taggerimpl contains the implementation of the tagger component.
|
Package taggerimpl contains the implementation of the tagger component. |
api
Package api implements the Tagger API.
|
Package api implements the Tagger API. |
collectors
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 |
empty
Package empty implements empty functions for the tagger component interface.
|
Package empty implements empty functions for the tagger component interface. |
generic_store
Package genericstore defines a generic object store that satisfies a redundant use-case in the tagger component implementation.
|
Package genericstore defines a generic object store that satisfies a redundant use-case in the tagger component implementation. |
local
Package local implements a local Tagger.
|
Package local implements a local Tagger. |
remote
Package remote implements a remote Tagger.
|
Package remote implements a remote Tagger. |
replay
Package replay implements the Tagger replay.
|
Package replay implements the Tagger replay. |
server
Package server implements a gRPC server that streams Tagger entities.
|
Package server implements a gRPC server that streams Tagger entities. |
subscriber
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. |
tagstore
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 taglist provides helpers to interact with a tag list.
|
Package taglist provides helpers to interact with a tag list. |
Package tags contains the list of tags that are added by the tagger
|
Package tags contains the list of tags that are added by the tagger |
Package telemetry defines the telemetry for the Tagger component.
|
Package telemetry defines the telemetry for the Tagger component. |
types
module
|
|
utils
module
|