chqstatsprocessor

package module
v0.0.0-...-0a59696 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

README

chqstatsprocessor

This processor is a component of the Cardinal Ecosystem which computes various statistics on the data flowing through it. This is used to compute cost savings and other data flows for presenting in Cardinal's SaaS UI.

While this processor can be used outside of the Cardinal Ecosystem, it would require building an API and processing to receive the statistic data.

Various configuration details are obtained at run-time from the named chqconfig extension.

Configuration

processors:
  chqstats/f32d43b8-f7c4-47c1-846f-241a7516a095:
    configuration_extension: "chqconfig"
    statistics:
      auth:
        authenticator: "chqauth"
      endpoint: "https://stats-receiver.global.aws.cardinalhq.io"
      phase: "presample"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectorIdFromResource

func CollectorIdFromResource(resource pcommon.Map) string

func NewFactory

func NewFactory() processor.Factory

func OrgIdFromResource

func OrgIdFromResource(resource pcommon.Map) string

Types

type Config

type Config struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	Statistics              StatisticsConfig                `mapstructure:"statistics"`
	ConfigurationExtension  *component.ID                   `mapstructure:"configuration_extension"`
	IDSource                authenv.EnvironmentSourceString `mapstructure:"id_source"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ContextID

type ContextID = string

type Entry

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

type LRUCache

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

func NewLRUCache

func NewLRUCache(capacity int, expiry time.Duration) *LRUCache

func (*LRUCache) Close

func (l *LRUCache) Close()

func (*LRUCache) Contains

func (l *LRUCache) Contains(key int64) bool

func (*LRUCache) Get

func (l *LRUCache) Get(key int64) (any, bool)

func (*LRUCache) Put

func (l *LRUCache) Put(key int64, value any)

Put adds a value to the cache or updates it if it already exists.

func (*LRUCache) Remove

func (l *LRUCache) Remove(key int64)

type StatisticsConfig

type StatisticsConfig struct {
	Interval time.Duration        `mapstructure:"interval"`
	Phase    string               `mapstructure:"phase"`
	Metrics  StatisticsTypeConfig `mapstructure:"metrics"`
	Logs     StatisticsTypeConfig `mapstructure:"logs"`
	Traces   StatisticsTypeConfig `mapstructure:"traces"`
}

func (*StatisticsConfig) Validate

func (c *StatisticsConfig) Validate() error

type StatisticsTypeConfig

type StatisticsTypeConfig struct {
	StatisticsEnabled bool `mapstructure:"statistics_enabled"`
	ExemplarsEnabled  bool `mapstructure:"exemplars_enabled"`
}

type Tenant

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

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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