entitystore

package
v1.300050.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service              = "Service"
	InstanceIDKey        = "EC2.InstanceId"
	ASGKey               = "EC2.AutoScalingGroup"
	ServiceNameSourceKey = "AWS.ServiceNameSource"
	PlatformType         = "PlatformType"
	EC2PlatForm          = "AWS::EC2"
)
View Source
const (
	SERVICE     = "service"
	APPLICATION = "application"
	APP         = "app"

	// Matches the default value from OTel
	// https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_service_name
	ServiceNameUnknown = "unknown_service"

	ServiceNameSourceClientIamRole     = "ClientIamRole"
	ServiceNameSourceInstrumentation   = "Instrumentation"
	ServiceNameSourceResourceTags      = "ResourceTags"
	ServiceNameSourceUnknown           = "Unknown"
	ServiceNameSourceUserConfiguration = "UserConfiguration"
	ServiceNameSourceK8sWorkload       = "K8sWorkload"
)
View Source
const (
	RequestLimitExceeded = "RequestLimitExceeded"
)

Variables

View Source
var (
	TypeStr, _ = component.NewType("entitystore")
)

Functions

func NewFactory

func NewFactory() extension.Factory

Types

type Config

type Config struct {
	Mode           string `mapstructure:"mode"`
	KubernetesMode string `mapstructure:"kubernetes_mode,omitempty"`
	Region         string `mapstructure:"region"`
	Profile        string `mapstructure:"profile,omitempty"`
	RoleARN        string `mapstructure:"role_arn,omitempty"`
	Filename       string `mapstructure:"shared_credential_file,omitempty"`
}

type EC2Info added in v1.300049.0

type EC2Info struct {
	InstanceID       string
	AccountID        string
	AutoScalingGroup string

	// region is used while making call to describeTags Ec2 API for AutoScalingGroup
	Region string
	// contains filtered or unexported fields
}

func (*EC2Info) GetAccountID added in v1.300049.0

func (ei *EC2Info) GetAccountID() string

func (*EC2Info) GetAutoScalingGroup added in v1.300049.0

func (ei *EC2Info) GetAutoScalingGroup() string

func (*EC2Info) GetInstanceID added in v1.300049.0

func (ei *EC2Info) GetInstanceID() string

type EntityStore

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

func GetEntityStore

func GetEntityStore() *EntityStore

func (*EntityStore) AddPodServiceEnvironmentMapping added in v1.300049.0

func (e *EntityStore) AddPodServiceEnvironmentMapping(podName string, serviceName string, environmentName string, serviceNameSource string)

func (*EntityStore) AddServiceAttrEntryForLogFile

func (e *EntityStore) AddServiceAttrEntryForLogFile(fileGlob LogFileGlob, serviceName string, environmentName string)

AddServiceAttrEntryForLogFile adds an entry to the entity store for the provided file glob -> (serviceName, environmentName) key-value pair

func (*EntityStore) AddServiceAttrEntryForLogGroup

func (e *EntityStore) AddServiceAttrEntryForLogGroup(logGroupName LogGroupName, serviceName string, environmentName string)

AddServiceAttrEntryForLogGroup adds an entry to the entity store for the provided log group nme -> (serviceName, environmentName) key-value pair

func (*EntityStore) CreateLogFileEntity

func (e *EntityStore) CreateLogFileEntity(logFileGlob LogFileGlob, logGroupName LogGroupName) *cloudwatchlogs.Entity

CreateLogFileEntity creates the entity for log events that are being uploaded from a log file in the environment.

func (*EntityStore) EC2Info

func (e *EntityStore) EC2Info() EC2Info

func (*EntityStore) EKSInfo

func (e *EntityStore) EKSInfo() *eksInfo

func (*EntityStore) GetMetricServiceNameAndSource added in v1.300049.0

func (e *EntityStore) GetMetricServiceNameAndSource() (string, string)

GetMetricServiceNameAndSource gets the service name source for service metrics if not customer provided

func (*EntityStore) GetPodServiceEnvironmentMapping added in v1.300049.0

func (e *EntityStore) GetPodServiceEnvironmentMapping() *ttlcache.Cache[string, ServiceEnvironment]

func (*EntityStore) GetServiceMetricAttributesMap added in v1.300049.0

func (e *EntityStore) GetServiceMetricAttributesMap() map[string]*string

GetServiceMetricAttributesMap creates the attribute map for service metrics. This will be expanded upon in a later PR'S, but for now is just covering the EC2 attributes for service metrics.

func (*EntityStore) KubernetesMode added in v1.300049.0

func (e *EntityStore) KubernetesMode() string

func (*EntityStore) Mode

func (e *EntityStore) Mode() string

func (*EntityStore) NativeCredentialExists

func (e *EntityStore) NativeCredentialExists() bool

func (*EntityStore) SetNativeCredential

func (e *EntityStore) SetNativeCredential(client client.ConfigProvider)

func (*EntityStore) Shutdown

func (e *EntityStore) Shutdown(_ context.Context) error

func (*EntityStore) Start

func (e *EntityStore) Start(ctx context.Context, host component.Host) error

func (*EntityStore) StartPodToServiceEnvironmentMappingTtlCache added in v1.300049.0

func (e *EntityStore) StartPodToServiceEnvironmentMappingTtlCache()

type LogFileGlob

type LogFileGlob string

type LogGroupName

type LogGroupName string

type Retryer added in v1.300049.0

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

func NewRetryer added in v1.300049.0

func NewRetryer(onetime bool, retryAnyError bool, successRetryMin int, successRetryMax int, backoffArray []time.Duration, maxRetry int, done chan struct{}, logger *zap.Logger) *Retryer

type ServiceAttribute

type ServiceAttribute struct {
	ServiceName       string
	ServiceNameSource string
	Environment       string
}

type ServiceEnvironment added in v1.300049.0

type ServiceEnvironment struct {
	ServiceName       string
	Environment       string
	ServiceNameSource string
}

Jump to

Keyboard shortcuts

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