Documentation ¶
Index ¶
- Constants
- Variables
- func NewFactory() extension.Factory
- type Config
- type EC2Info
- type EntityStore
- func (e *EntityStore) AddPodServiceEnvironmentMapping(podName string, serviceName string, environmentName string, ...)
- func (e *EntityStore) AddServiceAttrEntryForLogFile(fileGlob LogFileGlob, serviceName string, environmentName string)
- func (e *EntityStore) AddServiceAttrEntryForLogGroup(logGroupName LogGroupName, serviceName string, environmentName string)
- func (e *EntityStore) CreateLogFileEntity(logFileGlob LogFileGlob, logGroupName LogGroupName) *cloudwatchlogs.Entity
- func (e *EntityStore) EC2Info() EC2Info
- func (e *EntityStore) EKSInfo() *eksInfo
- func (e *EntityStore) GetMetricServiceNameAndSource() (string, string)
- func (e *EntityStore) GetPodServiceEnvironmentMapping() *ttlcache.Cache[string, ServiceEnvironment]
- func (e *EntityStore) GetServiceMetricAttributesMap() map[string]*string
- func (e *EntityStore) KubernetesMode() string
- func (e *EntityStore) Mode() string
- func (e *EntityStore) NativeCredentialExists() bool
- func (e *EntityStore) SetNativeCredential(client client.ConfigProvider)
- func (e *EntityStore) Shutdown(_ context.Context) error
- func (e *EntityStore) Start(ctx context.Context, host component.Host) error
- func (e *EntityStore) StartPodToServiceEnvironmentMappingTtlCache()
- type LogFileGlob
- type LogGroupName
- type Retryer
- type ServiceAttribute
- type ServiceEnvironment
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 ¶
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 (*EC2Info) GetAutoScalingGroup ¶ added in v1.300049.0
func (*EC2Info) GetInstanceID ¶ added in v1.300049.0
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) 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
}
type ServiceAttribute ¶
type ServiceEnvironment ¶ added in v1.300049.0
Click to show internal directories.
Click to hide internal directories.