entitystore

package
v1.300046.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 26 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"
	Type                 = "Type"
	Name                 = "Name"
	Environment          = "Environment"
)
View Source
const (
	INSTANCE_PROFILE = "instance-profile/"
	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"

	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"`
	Region   string `mapstructure:"region"`
	Profile  string `mapstructure:"profile,omitempty"`
	RoleARN  string `mapstructure:"role_arn,omitempty"`
	Filename string `mapstructure:"shared_credential_file,omitempty"`
}

type EntityStore

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

func GetEntityStore

func GetEntityStore() *EntityStore

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) 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

type LogFileGlob

type LogFileGlob string

type LogGroupName

type LogGroupName string

type ServiceAttribute

type ServiceAttribute struct {
	ServiceName       string
	ServiceNameSource string
	Environment       string
}

Jump to

Keyboard shortcuts

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