chqtagcacheextension

package module
v0.0.0-...-5a455ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 1

README

chqtagcacheextension

This extension is used as a shared resource across collectors running as a group to share incoming Datadog host tags. It is used only by the chqdatadogreceiver.

When running a collector with more than one Kubernetes pod to receive Datadog agent telemetry, which pod a specific set of data goes to may be random. However, the Datadog agent allows setting always-present tags to decorate telemetry. This is done not by changing the data, but to send these tags to a Datadog endpoint, and their back-end applies these host level tags.

This extension serves that purpose, and when more than one pod is running as a deployment, these tags are shared and all collectors can correctly apply those tags.

Configuration

extensions:
  chqtagcache:
    auth:
      authenticator: "chqauth"
    endpoint: "https://api.us-east-2.aws.cardinalhq.io"

Any authentication method may be used. The back-end server uses this authentication context to segregate the host tags to that collector deployment.

The use of this extension outside of Cardinal's ecosystem is not possible by implementing the API defined in cache_http.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

Types

type CHQTagcacheExtension

type CHQTagcacheExtension struct {
	// contains filtered or unexported fields
}

func (*CHQTagcacheExtension) FetchCache

func (chq *CHQTagcacheExtension) FetchCache(key string) ([]Tag, error)

FetchCache fetches the tags from the cache. This is intended to be called by the users of the extension.

func (*CHQTagcacheExtension) PutCache

func (chq *CHQTagcacheExtension) PutCache(key string, tags []Tag) error

PutCache puts the tags in the cache. This is intended to be called by the users of the extension.

func (*CHQTagcacheExtension) Shutdown

func (chq *CHQTagcacheExtension) Shutdown(context.Context) error

func (*CHQTagcacheExtension) Start

func (chq *CHQTagcacheExtension) Start(ctx context.Context, host component.Host) error

type Config

type Config struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	TTL                     time.Duration `mapstructure:"ttl"`
	ErrorTTL                time.Duration `mapstructure:"error_ttl"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

type Tag

type Tag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type TagsMessage

type TagsMessage struct {
	Tags []Tag `json:"tags"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL