From 2348639577cfe71171497433ae3f11fadd9d93e4 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 12 Nov 2024 15:44:33 -0500 Subject: [PATCH 01/48] fixing issue --- extension/agenthealth/config.go | 5 +- extension/agenthealth/extension.go | 26 +++- .../agenthealth/handler/stats/agent/agent.go | 62 ++++++-- .../agenthealth/handler/stats/handler.go | 60 ++++++-- .../handler/stats/provider/statuscode.go | 132 ++++++++++++++++++ plugins/processors/ec2tagger/config.go | 2 + plugins/processors/ec2tagger/ec2tagger.go | 65 +++++++-- plugins/processors/ec2tagger/factory.go | 9 +- .../otel/extension/agenthealth/translator.go | 13 +- .../otel/pipeline/host/translator.go | 1 + 10 files changed, 325 insertions(+), 50 deletions(-) create mode 100644 extension/agenthealth/handler/stats/provider/statuscode.go diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index dd1f94c06c..aa8e642e76 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -10,8 +10,9 @@ import ( ) type Config struct { - IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` - Stats agent.StatsConfig `mapstructure:"stats"` + IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` + Stats agent.StatsConfig `mapstructure:"stats"` + StatusCode agent.StatusCodeConfig `mapstructure:"status_code"` //not sure if this supposed to be a different name?????? } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index 14ab08eb57..ea0216418b 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -22,13 +22,37 @@ type agentHealth struct { var _ awsmiddleware.Extension = (*agentHealth)(nil) func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { + // Initialize handlers var responseHandlers []awsmiddleware.ResponseHandler requestHandlers := []awsmiddleware.RequestHandler{useragent.NewHandler(ah.cfg.IsUsageDataEnabled)} + + // Log the initialization + ah.logger.Debug("Initialized default request handler with user agent handler") + if ah.cfg.IsUsageDataEnabled { - req, res := stats.NewHandlers(ah.logger, ah.cfg.Stats) + // Log usage data configuration + ah.logger.Debug("Usage data is enabled, creating stats handlers") + + // Create stats handlers + req, res := stats.NewHandlers(ah.logger, ah.cfg.Stats, true) + + // Add stats handlers + ah.logger.Debug("Appending request handlers", zap.Int("count", len(req))) requestHandlers = append(requestHandlers, req...) + + ah.logger.Debug("Appending response handlers", zap.Int("count", len(res))) responseHandlers = append(responseHandlers, res...) + } else { + // Log usage data configuration is disabled + ah.logger.Debug("Usage data is disabled, skipping stats handlers") } + + // Log final handlers + ah.logger.Debug("Handlers created", + zap.Int("requestHandlersCount", len(requestHandlers)), + zap.Int("responseHandlersCount", len(responseHandlers)), + ) + return requestHandlers, responseHandlers } diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 83237d54e6..1d1ecc7b87 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -15,21 +15,22 @@ const ( ) type Stats struct { - CpuPercent *float64 `json:"cpu,omitempty"` - MemoryBytes *uint64 `json:"mem,omitempty"` - FileDescriptorCount *int32 `json:"fd,omitempty"` - ThreadCount *int32 `json:"th,omitempty"` - LatencyMillis *int64 `json:"lat,omitempty"` - PayloadBytes *int `json:"load,omitempty"` - StatusCode *int `json:"code,omitempty"` - SharedConfigFallback *int `json:"scfb,omitempty"` - ImdsFallbackSucceed *int `json:"ifs,omitempty"` - AppSignals *int `json:"as,omitempty"` - EnhancedContainerInsights *int `json:"eci,omitempty"` - RunningInContainer *int `json:"ric,omitempty"` - RegionType *string `json:"rt,omitempty"` - Mode *string `json:"m,omitempty"` - EntityRejected *int `json:"ent,omitempty"` + CpuPercent *float64 `json:"cpu,omitempty"` + MemoryBytes *uint64 `json:"mem,omitempty"` + FileDescriptorCount *int32 `json:"fd,omitempty"` + ThreadCount *int32 `json:"th,omitempty"` + LatencyMillis *int64 `json:"lat,omitempty"` + PayloadBytes *int `json:"load,omitempty"` + StatusCode *int `json:"code,omitempty"` + SharedConfigFallback *int `json:"scfb,omitempty"` + ImdsFallbackSucceed *int `json:"ifs,omitempty"` + AppSignals *int `json:"as,omitempty"` + EnhancedContainerInsights *int `json:"eci,omitempty"` + RunningInContainer *int `json:"ric,omitempty"` + RegionType *string `json:"rt,omitempty"` + Mode *string `json:"m,omitempty"` + EntityRejected *int `json:"ent,omitempty"` + StatusCodes map[string][2]int `json:"codes,omitempty"` } // Merge the other Stats into the current. If the field is not nil, @@ -80,6 +81,20 @@ func (s *Stats) Merge(other Stats) { if other.EntityRejected != nil { s.EntityRejected = other.EntityRejected } + if other.StatusCodes != nil { + if s.StatusCodes == nil { + s.StatusCodes = make(map[string][2]int) + } + for key, value := range other.StatusCodes { + if existing, ok := s.StatusCodes[key]; ok { + // Merge the existing value with the new one + s.StatusCodes[key] = [2]int{existing[0] + value[0], existing[1] + value[1]} + } else { + // Add the new value if the key doesn't exist + s.StatusCodes[key] = value + } + } + } } func (s *Stats) Marshal() (string, error) { @@ -118,3 +133,20 @@ type StatsConfig struct { // UsageFlags are the usage flags to set on start up. UsageFlags map[Flag]any `mapstructure:"usage_flags,omitempty"` } + +type StatusCodeConfig struct { + // Operations are the allowed operation names to gather stats for. + Operations []string `json:"operations,omitempty"` + + // AllowedStatusCodes are the allowed status codes to gather stats for. + AllowedStatusCodes []int `json:"allowedStatusCodes,omitempty"` +} + +// NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. +func NewStatusCodeOperationsFilter(cfg StatusCodeConfig) OperationsFilter { + allowed := collections.NewSet[string](cfg.Operations...) + return OperationsFilter{ + operations: allowed, + allowAll: allowed.Contains(AllowAllOperations), + } +} diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 7e12f12b5c..bfcbe59772 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -21,12 +21,54 @@ const ( headerKeyAgentStats = "X-Amz-Agent-Stats" ) -func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { - filter := agent.NewOperationsFilter(cfg.Operations...) - clientStats := client.NewHandler(filter) - stats := newStatsHandler(logger, filter, []agent.StatsProvider{clientStats, provider.GetProcessStats(), provider.GetFlagsStats()}) - agent.UsageFlags().SetValues(cfg.UsageFlags) - return []awsmiddleware.RequestHandler{stats, clientStats}, []awsmiddleware.ResponseHandler{clientStats} +func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { + if statsB { + logger.Debug("Stats are enabled, creating handlers") + + // Create the operations filter + filter := agent.NewOperationsFilter(cfg.Operations...) + logger.Debug("Operations filter created", zap.Strings("operations", cfg.Operations)) + + // Create client stats handler + clientStats := client.NewHandler(filter) + logger.Debug("Client stats handler created") + + // Get status code stats + statusCodeStats := provider.GetStatusCodeStats() + logger.Debug("Status code stats handler retrieved") + + // Create stats handler + stats := newStatsHandler(logger, filter, []agent.StatsProvider{ + clientStats, + provider.GetProcessStats(), + provider.GetFlagsStats(), + statusCodeStats, + }) + logger.Debug("Stats handler created with providers") + + // Set usage flags + agent.UsageFlags().SetValues(cfg.UsageFlags) + + // Return handlers + logger.Debug("Returning request and response handlers", + zap.Int("requestHandlerCount", 2), + zap.Int("responseHandlerCount", 1), + ) + return []awsmiddleware.RequestHandler{stats, clientStats}, []awsmiddleware.ResponseHandler{statusCodeStats} + } else { + logger.Debug("Stats are disabled, creating only status code stats handler") + + // Get status code stats + statusCodeStats := provider.GetStatusCodeStats() + logger.Debug("Status code stats handler retrieved") + + // Return empty request handlers and response handlers with status code stats + logger.Debug("Returning handlers", + zap.Int("requestHandlerCount", 0), + zap.Int("responseHandlerCount", 1), + ) + return []awsmiddleware.RequestHandler{}, []awsmiddleware.ResponseHandler{statusCodeStats} + } } type statsHandler struct { @@ -58,9 +100,9 @@ func (sh *statsHandler) Position() awsmiddleware.HandlerPosition { func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { operation := awsmiddleware.GetOperationName(ctx) - if !sh.filter.IsAllowed(operation) { - return - } + //if !sh.filter.IsAllowed(operation) { + // return + //} header := sh.Header(operation) if header != "" { r.Header.Set(headerKeyAgentStats, header) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go new file mode 100644 index 0000000000..677471241f --- /dev/null +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -0,0 +1,132 @@ +package provider + +import ( + "context" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "log" + "net/http" + "sync" + "time" + + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" +) + +const ( + statusResetInterval = 5 * time.Minute + statusHandlerID = "cloudwatchagent.StatusCodeHandler" +) + +var ( + statusCodeSingleton *StatusCodeHandler + statusCodeStatsOnce sync.Once +) + +// StatusCodeHandler provides monitoring for status codes per operation. +type StatusCodeHandler struct { + statsByOperation sync.Map + mu sync.Mutex + resetTimer *time.Timer +} + +// GetStatusCodeStats retrieves or initializes the singleton StatusCodeHandler. +func GetStatusCodeStats() *StatusCodeHandler { + statusCodeStatsOnce.Do(func() { + handler := &StatusCodeHandler{} + handler.startResetTimer() + statusCodeSingleton = handler + }) + return statusCodeSingleton +} + +// startResetTimer initializes a reset timer to clear stats every 5 minutes. +func (h *StatusCodeHandler) startResetTimer() { + h.resetTimer = time.AfterFunc(statusResetInterval, func() { + h.mu.Lock() + defer h.mu.Unlock() + + h.statsByOperation.Range(func(key, _ interface{}) bool { + h.statsByOperation.Delete(key) + return true + }) + log.Println("Status code stats reset.") + h.startResetTimer() + }) +} + +// HandleRequest is a no-op for the StatusCodeHandler. +func (h *StatusCodeHandler) HandleRequest(ctx context.Context, _ *http.Request) {} + +// HandleResponse processes the HTTP response to update status code stats. +func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response) { + // Extract the operation name + operation := awsmiddleware.GetOperationName(ctx) + if operation == "" { + log.Println("No operation name found in the context") + } else { + log.Printf("Processing response for operation: %s", operation) + } + + // Extract the status code + statusCode := r.StatusCode + log.Printf("Received status code: %d for operation: %s", statusCode, operation) + + h.mu.Lock() + defer h.mu.Unlock() + + // Load or initialize stats for the operation + value, loaded := h.statsByOperation.LoadOrStore(operation, &[2]int{}) + if !loaded { + log.Printf("Initializing stats for operation: %s", operation) + } + stats := value.(*[2]int) + + // Update success or failure count + if statusCode >= 200 && statusCode < 300 { + stats[0]++ + log.Printf("Incremented success count for operation: %s. New Success=%d", operation, stats[0]) + } else { + stats[1]++ + log.Printf("Incremented failure count for operation: %s. New Failures=%d", operation, stats[1]) + } + + // Store updated stats back in the map + h.statsByOperation.Store(operation, stats) + log.Printf("Updated stats for operation '%s': Success=%d, Failures=%d", operation, stats[0], stats[1]) +} + +// GetStats retrieves the success and failure counts for a specific operation. +func (h *StatusCodeHandler) GetStats(operation string) (successCount, failureCount int) { + value, ok := h.statsByOperation.Load(operation) + if !ok { + return 0, 0 + } + stats := value.(*[2]int) + return stats[0], stats[1] +} + +// ID returns the unique identifier for the handler. +func (h *StatusCodeHandler) ID() string { + return statusHandlerID +} + +// Position specifies the handler's position in the middleware chain. +func (h *StatusCodeHandler) Position() awsmiddleware.HandlerPosition { + return awsmiddleware.After +} + +// Stats implements the `Stats` method required by the `agent.StatsProvider` interface. +func (h *StatusCodeHandler) Stats(operation string) agent.Stats { + value, ok := h.statsByOperation.Load(operation) + if !ok { + return agent.Stats{ + StatusCodes: map[string][2]int{}, + } + } + + stats := value.(*[2]int) + return agent.Stats{ + StatusCodes: map[string][2]int{ + operation: {stats[0], stats[1]}, + }, + } +} diff --git a/plugins/processors/ec2tagger/config.go b/plugins/processors/ec2tagger/config.go index 1b0549de6e..9119139567 100644 --- a/plugins/processors/ec2tagger/config.go +++ b/plugins/processors/ec2tagger/config.go @@ -38,6 +38,8 @@ type Config struct { Filename string `mapstructure:"shared_credential_file,omitempty"` Token string `mapstructure:"token,omitempty"` IMDSRetries int `mapstructure:"imds_retries,omitempty"` + + MiddlewareID *component.ID `mapstructure:"middleware,omitempty"` } // Verify Config implements Processor interface. diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 52e9423100..367a522e83 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -5,7 +5,10 @@ package ec2tagger import ( "context" + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/extension/agenthealth" "hash/fnv" + "log" "os" "sync" "time" @@ -19,7 +22,6 @@ import ( "go.uber.org/zap" configaws "github.com/aws/amazon-cloudwatch-agent/cfg/aws" - "github.com/aws/amazon-cloudwatch-agent/internal/ec2metadataprovider" "github.com/aws/amazon-cloudwatch-agent/plugins/processors/ec2tagger/internal/volume" translatorCtx "github.com/aws/amazon-cloudwatch-agent/translator/context" ) @@ -44,7 +46,7 @@ type Tagger struct { logger *zap.Logger cancelFunc context.CancelFunc - metadataProvider ec2metadataprovider.MetadataProvider + metadataProvider MetadataProvider ec2Provider ec2ProviderType shutdownC chan bool @@ -64,11 +66,13 @@ func newTagger(config *Config, logger *zap.Logger) *Tagger { _, cancel := context.WithCancel(context.Background()) mdCredentialConfig := &configaws.CredentialConfig{} + config.MiddlewareID = &agenthealth.StatusCodeID + p := &Tagger{ Config: config, logger: logger, cancelFunc: cancel, - metadataProvider: ec2metadataprovider.NewMetadataProvider(mdCredentialConfig.Credentials(), config.IMDSRetries), + metadataProvider: NewMetadataProvider(mdCredentialConfig.Credentials(), config.IMDSRetries), ec2Provider: func(ec2CredentialConfig *configaws.CredentialConfig) ec2iface.EC2API { return ec2.New( ec2CredentialConfig.Credentials(), @@ -173,7 +177,7 @@ func (t *Tagger) updateTags() error { } for _, tag := range result.Tags { key := *tag.Key - if Ec2InstanceTagKeyASG == key { + if ec2InstanceTagKeyASG == key { // rename to match CW dimension as applied by AutoScaling service, not the EC2 tag key = cwDimensionASG } @@ -247,7 +251,7 @@ func (t *Tagger) ec2TagsRetrieved() bool { defer t.RUnlock() if t.ec2TagCache != nil { for _, key := range t.EC2InstanceTagKeys { - if key == Ec2InstanceTagKeyASG { + if key == ec2InstanceTagKeyASG { key = cwDimensionASG } if key == "*" { @@ -280,14 +284,25 @@ func (t *Tagger) ebsVolumesRetrieved() bool { // Start acts as input validation and serves the purpose of updating ec2 tags and ebs volumes if necessary. // It will be called when OTel is enabling each processor -func (t *Tagger) Start(ctx context.Context, _ component.Host) error { +func (t *Tagger) Start(ctx context.Context, host component.Host) error { + t.logger.Debug("ec2tagger: Starting the EC2 tagger.") + log.Printf("start function called with host: %s\n", host) + t.shutdownC = make(chan bool) t.ec2TagCache = map[string]string{} + // Derive EC2 Metadata + t.logger.Debug("ec2tagger: Deriving EC2 metadata from IMDS.") if err := t.deriveEC2MetadataFromIMDS(ctx); err != nil { + t.logger.Error("ec2tagger: Failed to derive EC2 metadata from IMDS.", zap.Error(err)) return err } + t.logger.Debug("ec2tagger: Successfully derived EC2 metadata from IMDS.", + zap.String("instanceId", t.ec2MetadataRespond.instanceId), + zap.String("region", t.ec2MetadataRespond.region)) + // Set up tag filters + t.logger.Debug("ec2tagger: Setting up tag filters.") t.tagFilters = []*ec2.Filter{ { Name: aws.String("resource-type"), @@ -300,13 +315,14 @@ func (t *Tagger) Start(ctx context.Context, _ component.Host) error { } useAllTags := len(t.EC2InstanceTagKeys) == 1 && t.EC2InstanceTagKeys[0] == "*" - if !useAllTags && len(t.EC2InstanceTagKeys) > 0 { - // if the customer said 'AutoScalingGroupName' (the CW dimension), do what they mean not what they said - // and filter for the EC2 tag name called 'aws:autoscaling:groupName' + t.logger.Debug("ec2tagger: Processing specified EC2InstanceTagKeys.", + zap.Strings("keys", t.EC2InstanceTagKeys)) + for i, key := range t.EC2InstanceTagKeys { if cwDimensionASG == key { - t.EC2InstanceTagKeys[i] = Ec2InstanceTagKeyASG + t.logger.Debug("ec2tagger: Replacing 'AutoScalingGroupName' with the correct EC2 tag name.") + t.EC2InstanceTagKeys[i] = ec2InstanceTagKeyASG } } @@ -317,6 +333,10 @@ func (t *Tagger) Start(ctx context.Context, _ component.Host) error { } if len(t.EC2InstanceTagKeys) > 0 || len(t.EBSDeviceKeys) > 0 { + t.logger.Debug("ec2tagger: Configuring EC2 API client.", + zap.String("region", t.ec2MetadataRespond.region), + zap.String("roleARN", t.RoleARN)) + ec2CredentialConfig := &configaws.CredentialConfig{ AccessKey: t.AccessKey, SecretKey: t.SecretKey, @@ -327,16 +347,33 @@ func (t *Tagger) Start(ctx context.Context, _ component.Host) error { Region: t.ec2MetadataRespond.region, } t.ec2API = t.ec2Provider(ec2CredentialConfig) - go func() { //Async start of initial retrieval to prevent block of agent start + + if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { + if t.Config.MiddlewareID == nil { + TypeStr, _ = component.NewType("agenthealth") + defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) + t.Config.MiddlewareID = &defaultMiddlewareID + t.logger.Debug("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + } + + t.logger.Debug("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) + } + + go func() { + t.logger.Info("ec2tagger: Starting initial retrieval of tags and volumes.") t.initialRetrievalOfTagsAndVolumes() + t.logger.Info("ec2tagger: Starting refresh loop to update tags and volumes.") t.refreshLoopToUpdateTagsAndVolumes() }() t.logger.Info("ec2tagger: EC2 tagger has started initialization.") } else { + t.logger.Info("ec2tagger: No EC2 instance or EBS device keys specified. Skipping tagger initialization.") t.setStarted() } + t.logger.Debug("ec2tagger: EC2 tagger has started successfully.") return nil } @@ -443,10 +480,10 @@ func (t *Tagger) initialRetrievalOfTagsAndVolumes() { retry := 0 for { var waitDuration time.Duration - if retry < len(BackoffSleepArray) { - waitDuration = BackoffSleepArray[retry] + if retry < len(backoffSleepArray) { + waitDuration = backoffSleepArray[retry] } else { - waitDuration = BackoffSleepArray[len(BackoffSleepArray)-1] + waitDuration = backoffSleepArray[len(backoffSleepArray)-1] } wait := time.NewTimer(waitDuration) diff --git a/plugins/processors/ec2tagger/factory.go b/plugins/processors/ec2tagger/factory.go index 72b5576b9d..1bfa955de7 100644 --- a/plugins/processors/ec2tagger/factory.go +++ b/plugins/processors/ec2tagger/factory.go @@ -44,11 +44,14 @@ func createMetricsProcessor( return nil, fmt.Errorf("configuration parsing error") } + // Now passing host to newTagger metricsProcessor := newTagger(processorConfig, set.Logger) - return processorhelper.NewMetricsProcessor(ctx, set, cfg, nextConsumer, + return processorhelper.NewMetricsProcessor( + ctx, set, cfg, nextConsumer, metricsProcessor.processMetrics, processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithStart(metricsProcessor.Start), - processorhelper.WithShutdown(metricsProcessor.Shutdown)) + processorhelper.WithStart(metricsProcessor.Start), // Use the Start method of metricsProcessor + processorhelper.WithShutdown(metricsProcessor.Shutdown), + ) } diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index ef39f9390c..65ac3dc71c 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -25,9 +25,10 @@ const ( ) var ( - MetricsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeMetrics.String()) - LogsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeLogs.String()) - TracesID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeTraces.String()) + MetricsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeMetrics.String()) + LogsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeLogs.String()) + TracesID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeTraces.String()) + StatusCodeID = component.NewIDWithName(agenthealth.TypeStr, "StatusCode") ) type translator struct { @@ -56,9 +57,9 @@ func (t *translator) ID() component.ID { func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { cfg := t.factory.CreateDefaultConfig().(*agenthealth.Config) cfg.IsUsageDataEnabled = t.isUsageDataEnabled - if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { - cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData - } + //if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { + // cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData + //} // for now we will comment this ??????? cfg.Stats = agent.StatsConfig{ Operations: t.operations, UsageFlags: map[agent.Flag]any{ diff --git a/translator/translate/otel/pipeline/host/translator.go b/translator/translate/otel/pipeline/host/translator.go index 641ed43e93..17793b23da 100644 --- a/translator/translate/otel/pipeline/host/translator.go +++ b/translator/translate/otel/pipeline/host/translator.go @@ -90,6 +90,7 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, if t.Destination() != common.CloudWatchLogsKey { if conf.IsSet(common.ConfigKey(common.MetricsKey, common.AppendDimensionsKey)) { log.Printf("D! ec2tagger processor required because append_dimensions is set") + translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{"*"})) //not sure if we need to change this?????? translators.Processors.Set(ec2taggerprocessor.NewTranslator()) } From b7fac5ed1514c1ef63f125b0d61ccca0cb8dfcd1 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 12 Nov 2024 16:01:55 -0500 Subject: [PATCH 02/48] trying to fix logs --- extension/agenthealth/handler/stats/handler.go | 4 ++-- translator/translate/otel/extension/agenthealth/translator.go | 2 +- translator/translate/otel/pipeline/host/translator.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index bfcbe59772..3b1e606ac6 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -54,7 +54,7 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm zap.Int("requestHandlerCount", 2), zap.Int("responseHandlerCount", 1), ) - return []awsmiddleware.RequestHandler{stats, clientStats}, []awsmiddleware.ResponseHandler{statusCodeStats} + return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } else { logger.Debug("Stats are disabled, creating only status code stats handler") @@ -67,7 +67,7 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm zap.Int("requestHandlerCount", 0), zap.Int("responseHandlerCount", 1), ) - return []awsmiddleware.RequestHandler{}, []awsmiddleware.ResponseHandler{statusCodeStats} + return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } } diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 65ac3dc71c..7720a8c54a 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -59,7 +59,7 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { cfg.IsUsageDataEnabled = t.isUsageDataEnabled //if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { // cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData - //} // for now we will comment this ??????? + //} // for now we will comment this ???????c cfg.Stats = agent.StatsConfig{ Operations: t.operations, UsageFlags: map[agent.Flag]any{ diff --git a/translator/translate/otel/pipeline/host/translator.go b/translator/translate/otel/pipeline/host/translator.go index 17793b23da..796662806a 100644 --- a/translator/translate/otel/pipeline/host/translator.go +++ b/translator/translate/otel/pipeline/host/translator.go @@ -104,7 +104,7 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, switch t.Destination() { case common.DefaultDestination, common.CloudWatchKey: translators.Exporters.Set(awscloudwatch.NewTranslator()) - translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{agenthealth.OperationPutMetricData})) + translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{"*"})) case common.AMPKey: if conf.IsSet(common.MetricsAggregationDimensionsKey) { translators.Processors.Set(rollupprocessor.NewTranslator()) @@ -115,7 +115,7 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, case common.CloudWatchLogsKey: translators.Processors.Set(batchprocessor.NewTranslatorWithNameAndSection(t.name, common.LogsKey)) translators.Exporters.Set(awsemf.NewTranslator()) - translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeLogs, []string{agenthealth.OperationPutLogEvents})) + translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeLogs, []string{"*"})) default: return nil, fmt.Errorf("pipeline (%s) does not support destination (%s) in configuration", t.name, t.Destination()) } From 45536b804df279343fd6464bcf447cea5b2ddf62 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 12 Nov 2024 17:38:58 -0500 Subject: [PATCH 03/48] fixing issue --- plugins/processors/ec2tagger/ec2tagger.go | 20 ++++----- .../sampleConfig/advanced_config_linux.json | 45 ++++++++++++------- .../sampleConfig/complete_linux_config.json | 10 ++--- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 367a522e83..87051537d9 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -6,7 +6,6 @@ package ec2tagger import ( "context" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/extension/agenthealth" "hash/fnv" "log" "os" @@ -22,6 +21,7 @@ import ( "go.uber.org/zap" configaws "github.com/aws/amazon-cloudwatch-agent/cfg/aws" + "github.com/aws/amazon-cloudwatch-agent/internal/ec2metadataprovider" "github.com/aws/amazon-cloudwatch-agent/plugins/processors/ec2tagger/internal/volume" translatorCtx "github.com/aws/amazon-cloudwatch-agent/translator/context" ) @@ -46,7 +46,7 @@ type Tagger struct { logger *zap.Logger cancelFunc context.CancelFunc - metadataProvider MetadataProvider + metadataProvider ec2metadataprovider.MetadataProvider ec2Provider ec2ProviderType shutdownC chan bool @@ -66,13 +66,11 @@ func newTagger(config *Config, logger *zap.Logger) *Tagger { _, cancel := context.WithCancel(context.Background()) mdCredentialConfig := &configaws.CredentialConfig{} - config.MiddlewareID = &agenthealth.StatusCodeID - p := &Tagger{ Config: config, logger: logger, cancelFunc: cancel, - metadataProvider: NewMetadataProvider(mdCredentialConfig.Credentials(), config.IMDSRetries), + metadataProvider: ec2metadataprovider.NewMetadataProvider(mdCredentialConfig.Credentials(), config.IMDSRetries), ec2Provider: func(ec2CredentialConfig *configaws.CredentialConfig) ec2iface.EC2API { return ec2.New( ec2CredentialConfig.Credentials(), @@ -177,7 +175,7 @@ func (t *Tagger) updateTags() error { } for _, tag := range result.Tags { key := *tag.Key - if ec2InstanceTagKeyASG == key { + if Ec2InstanceTagKeyASG == key { // rename to match CW dimension as applied by AutoScaling service, not the EC2 tag key = cwDimensionASG } @@ -251,7 +249,7 @@ func (t *Tagger) ec2TagsRetrieved() bool { defer t.RUnlock() if t.ec2TagCache != nil { for _, key := range t.EC2InstanceTagKeys { - if key == ec2InstanceTagKeyASG { + if key == Ec2InstanceTagKeyASG { key = cwDimensionASG } if key == "*" { @@ -322,7 +320,7 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { for i, key := range t.EC2InstanceTagKeys { if cwDimensionASG == key { t.logger.Debug("ec2tagger: Replacing 'AutoScalingGroupName' with the correct EC2 tag name.") - t.EC2InstanceTagKeys[i] = ec2InstanceTagKeyASG + t.EC2InstanceTagKeys[i] = Ec2InstanceTagKeyASG } } @@ -480,10 +478,10 @@ func (t *Tagger) initialRetrievalOfTagsAndVolumes() { retry := 0 for { var waitDuration time.Duration - if retry < len(backoffSleepArray) { - waitDuration = backoffSleepArray[retry] + if retry < len(BackoffSleepArray) { + waitDuration = BackoffSleepArray[retry] } else { - waitDuration = backoffSleepArray[len(backoffSleepArray)-1] + waitDuration = BackoffSleepArray[len(BackoffSleepArray)-1] } wait := time.NewTimer(waitDuration) diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.json b/translator/tocwconfig/sampleConfig/advanced_config_linux.json index 87d7d3003c..bb70dd5c72 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.json +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.json @@ -1,4 +1,9 @@ { + "agent": { + "debug": true, + "aws_sdk_log_level": "LogDebugWithHTTPBody", + "region": "us-west-2" + }, "metrics": { "append_dimensions": { "AutoScalingGroupName": "${aws:AutoScalingGroupName}", @@ -14,7 +19,8 @@ "cpu_usage_user", "cpu_usage_system" ], - "totalcpu": false + "totalcpu": false, + "metrics_collection_interval": 10 }, "disk": { "resources": [ @@ -23,7 +29,8 @@ "measurement": [ "used_percent", "inodes_free" - ] + ], + "metrics_collection_interval": 60 }, "diskio": { "resources": [ @@ -35,23 +42,27 @@ "read_bytes", "writes", "reads" - ] + ], + "metrics_collection_interval": 60 }, "mem": { "measurement": [ "mem_used_percent" - ] + ], + "metrics_collection_interval": 10 }, "netstat": { "measurement": [ "tcp_established", "tcp_time_wait" - ] + ], + "metrics_collection_interval": 60 }, "swap": { "measurement": [ "swap_used_percent" - ] + ], + "metrics_collection_interval": 10 }, "ethtool": { "interface_include": [ @@ -65,15 +76,19 @@ "conntrack_allowance_exceeded", "linklocal_allowance_exceeded" ] - }, - "nvidia_gpu": { - "measurement": [ - "utilization_gpu", - "utilization_memory", - "power_draw", - "temperature_gpu" - ], - "metrics_collection_interval": 60 + } + } + }, + "logs": { + "logs_collected": { + "files": { + "collect_list": [ + { + "file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log", + "log_group_name": "StatusCode", + "log_stream_name": "agent-1" + } + ] } } } diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.json b/translator/tocwconfig/sampleConfig/complete_linux_config.json index c2fb70e151..39130d073a 100755 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.json +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.json @@ -5,7 +5,7 @@ "internal": true, "debug": true, "quiet": true, - "aws_sdk_log_level": "LogDebug", + "aws_sdk_log_level": "LogDebugWithHTTPBody", "user_agent": "CUSTOM USER AGENT VALUE", "credentials": { "role_arn": "global_role_arn_value" @@ -14,10 +14,6 @@ "omit_hostname": true }, "metrics": { - "metrics_destinations": { - "cloudwatch": { - } - }, "metrics_collected": { "jmx": [ { @@ -255,8 +251,8 @@ "collect_list": [ { "file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log", - "log_group_name": "amazon-cloudwatch-agent.log", - "log_stream_name": "amazon-cloudwatch-agent.log", + "log_group_name": "/aws/amazon-cloudwatch-agent", + "log_stream_name": "agent-1", "timezone": "UTC", "retention_in_days": 5 }, From 75b024a813e0e788a5819a32d60a77affdea3144 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 11:52:28 -0500 Subject: [PATCH 04/48] adding debug statements (swapping logger with log.print) --- .../agenthealth/handler/stats/handler.go | 25 ++++++--------- plugins/processors/ec2tagger/ec2tagger.go | 32 +++++++++++++------ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 3b1e606ac6..f27cafff48 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -5,6 +5,7 @@ package stats import ( "context" + "log" "net/http" "sync" @@ -23,19 +24,19 @@ const ( func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { if statsB { - logger.Debug("Stats are enabled, creating handlers") + log.Println("Stats are enabled, creating handlers") // Create the operations filter filter := agent.NewOperationsFilter(cfg.Operations...) - logger.Debug("Operations filter created", zap.Strings("operations", cfg.Operations)) + log.Println("Operations filter created, operations:", cfg.Operations) // Create client stats handler clientStats := client.NewHandler(filter) - logger.Debug("Client stats handler created") + log.Println("Client stats handler created") // Get status code stats statusCodeStats := provider.GetStatusCodeStats() - logger.Debug("Status code stats handler retrieved") + log.Println("Status code stats handler retrieved") // Create stats handler stats := newStatsHandler(logger, filter, []agent.StatsProvider{ @@ -44,29 +45,23 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm provider.GetFlagsStats(), statusCodeStats, }) - logger.Debug("Stats handler created with providers") + log.Println("Stats handler created with providers") // Set usage flags agent.UsageFlags().SetValues(cfg.UsageFlags) // Return handlers - logger.Debug("Returning request and response handlers", - zap.Int("requestHandlerCount", 2), - zap.Int("responseHandlerCount", 1), - ) + log.Println("Returning request and response handlers, requestHandlerCount: 2, responseHandlerCount: 1") return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } else { - logger.Debug("Stats are disabled, creating only status code stats handler") + log.Println("Stats are disabled, creating only status code stats handler") // Get status code stats statusCodeStats := provider.GetStatusCodeStats() - logger.Debug("Status code stats handler retrieved") + log.Println("Status code stats handler retrieved") // Return empty request handlers and response handlers with status code stats - logger.Debug("Returning handlers", - zap.Int("requestHandlerCount", 0), - zap.Int("responseHandlerCount", 1), - ) + log.Println("Returning handlers, requestHandlerCount: 0, responseHandlerCount: 1") return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } } diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 87051537d9..0618c027cd 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -283,24 +283,24 @@ func (t *Tagger) ebsVolumesRetrieved() bool { // Start acts as input validation and serves the purpose of updating ec2 tags and ebs volumes if necessary. // It will be called when OTel is enabling each processor func (t *Tagger) Start(ctx context.Context, host component.Host) error { - t.logger.Debug("ec2tagger: Starting the EC2 tagger.") + t.logger.Info("ec2tagger: Starting the EC2 tagger.") log.Printf("start function called with host: %s\n", host) t.shutdownC = make(chan bool) t.ec2TagCache = map[string]string{} // Derive EC2 Metadata - t.logger.Debug("ec2tagger: Deriving EC2 metadata from IMDS.") + t.logger.Info("ec2tagger: Deriving EC2 metadata from IMDS.") if err := t.deriveEC2MetadataFromIMDS(ctx); err != nil { t.logger.Error("ec2tagger: Failed to derive EC2 metadata from IMDS.", zap.Error(err)) return err } - t.logger.Debug("ec2tagger: Successfully derived EC2 metadata from IMDS.", + t.logger.Info("ec2tagger: Successfully derived EC2 metadata from IMDS.", zap.String("instanceId", t.ec2MetadataRespond.instanceId), zap.String("region", t.ec2MetadataRespond.region)) // Set up tag filters - t.logger.Debug("ec2tagger: Setting up tag filters.") + t.logger.Info("ec2tagger: Setting up tag filters.") t.tagFilters = []*ec2.Filter{ { Name: aws.String("resource-type"), @@ -314,12 +314,12 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { useAllTags := len(t.EC2InstanceTagKeys) == 1 && t.EC2InstanceTagKeys[0] == "*" if !useAllTags && len(t.EC2InstanceTagKeys) > 0 { - t.logger.Debug("ec2tagger: Processing specified EC2InstanceTagKeys.", + t.logger.Info("ec2tagger: Processing specified EC2InstanceTagKeys.", zap.Strings("keys", t.EC2InstanceTagKeys)) for i, key := range t.EC2InstanceTagKeys { if cwDimensionASG == key { - t.logger.Debug("ec2tagger: Replacing 'AutoScalingGroupName' with the correct EC2 tag name.") + t.logger.Info("ec2tagger: Replacing 'AutoScalingGroupName' with the correct EC2 tag name.") t.EC2InstanceTagKeys[i] = Ec2InstanceTagKeyASG } } @@ -329,9 +329,13 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { Values: aws.StringSlice(t.EC2InstanceTagKeys), }) } + log.Print("Outside ec2tagger instance key") + t.logger.Info("Outside ec2tagger instance key - t.logger statement ") if len(t.EC2InstanceTagKeys) > 0 || len(t.EBSDeviceKeys) > 0 { - t.logger.Debug("ec2tagger: Configuring EC2 API client.", + log.Print("Inside ec2tagger instance key") + + t.logger.Info("ec2tagger: Configuring EC2 API client.", zap.String("region", t.ec2MetadataRespond.region), zap.String("roleARN", t.RoleARN)) @@ -347,14 +351,22 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { t.ec2API = t.ec2Provider(ec2CredentialConfig) if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { + t.logger.Info("Inside ec2tagger ec2api logger statement") + log.Print("Inside ec2tagger ec2api - log printf statement") + if t.Config.MiddlewareID == nil { + t.logger.Info("Inside ec2tagger middleware default") + log.Print("Inside ec2tagger ec2api - log printf statement") + TypeStr, _ = component.NewType("agenthealth") defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) t.Config.MiddlewareID = &defaultMiddlewareID - t.logger.Debug("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + t.logger.Info("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) } - t.logger.Debug("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + log.Print("Inside ec2tagger ec2api - log printf statement") + log.Print(*t.Config.MiddlewareID) awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) } @@ -371,7 +383,7 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { t.setStarted() } - t.logger.Debug("ec2tagger: EC2 tagger has started successfully.") + t.logger.Info("ec2tagger: EC2 tagger has started successfully.") return nil } From b41de0902068217f460e65f4d9aba6f94cf360df Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 12:06:43 -0500 Subject: [PATCH 05/48] adding more log statments --- .../agenthealth/handler/stats/provider/statuscode.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 677471241f..ef3590793b 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -92,6 +92,17 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response // Store updated stats back in the map h.statsByOperation.Store(operation, stats) log.Printf("Updated stats for operation '%s': Success=%d, Failures=%d", operation, stats[0], stats[1]) + + // Log the entire status code map + log.Println("Complete status code map:") + h.statsByOperation.Range(func(key, value interface{}) bool { + log.Print("Printing all stats by operations map") + + operation := key.(string) + stats := value.(*[2]int) + log.Printf("Operation: %s, Success=%d, Failures=%d", operation, stats[0], stats[1]) + return true + }) } // GetStats retrieves the success and failure counts for a specific operation. From 90a22a3e1c836f2ec8045b30652a90ec9716fa38 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 13:46:10 -0500 Subject: [PATCH 06/48] fixing tags --- .../agenthealth/handler/stats/agent/agent.go | 18 ++++++++++++++++ .../agenthealth/handler/stats/handler.go | 21 ++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 1d1ecc7b87..4835239010 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -5,6 +5,7 @@ package agent import ( "encoding/json" + "log" "strings" "github.com/aws/amazon-cloudwatch-agent/internal/util/collections" @@ -82,19 +83,36 @@ func (s *Stats) Merge(other Stats) { s.EntityRejected = other.EntityRejected } if other.StatusCodes != nil { + log.Println("Merging status codes from another source.") + if s.StatusCodes == nil { + log.Println("Initializing status codes map as it was nil.") s.StatusCodes = make(map[string][2]int) } + for key, value := range other.StatusCodes { + log.Printf("Processing key: %s with value: Success=%d, Failures=%d", key, value[0], value[1]) + if existing, ok := s.StatusCodes[key]; ok { + log.Printf( + "Key %s already exists. Existing: Success=%d, Failures=%d. Merging with: Success=%d, Failures=%d", + key, existing[0], existing[1], value[0], value[1], + ) // Merge the existing value with the new one s.StatusCodes[key] = [2]int{existing[0] + value[0], existing[1] + value[1]} + log.Printf( + "Updated key %s: Success=%d, Failures=%d", + key, s.StatusCodes[key][0], s.StatusCodes[key][1], + ) } else { // Add the new value if the key doesn't exist + log.Printf("Key %s does not exist. Adding it with: Success=%d, Failures=%d", key, value[0], value[1]) s.StatusCodes[key] = value } } + log.Println("Merging of status codes completed.") } + } func (s *Stats) Marshal() (string, error) { diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index f27cafff48..7f869f0fb3 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -5,6 +5,7 @@ package stats import ( "context" + "fmt" "log" "net/http" "sync" @@ -30,15 +31,12 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm filter := agent.NewOperationsFilter(cfg.Operations...) log.Println("Operations filter created, operations:", cfg.Operations) - // Create client stats handler clientStats := client.NewHandler(filter) log.Println("Client stats handler created") - // Get status code stats statusCodeStats := provider.GetStatusCodeStats() log.Println("Status code stats handler retrieved") - // Create stats handler stats := newStatsHandler(logger, filter, []agent.StatsProvider{ clientStats, provider.GetProcessStats(), @@ -56,11 +54,9 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm } else { log.Println("Stats are disabled, creating only status code stats handler") - // Get status code stats statusCodeStats := provider.GetStatusCodeStats() log.Println("Status code stats handler retrieved") - // Return empty request handlers and response handlers with status code stats log.Println("Returning handlers, requestHandlerCount: 0, responseHandlerCount: 1") return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } @@ -105,13 +101,24 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { } func (sh *statsHandler) Header(operation string) string { + log.Println("Generating header for operation:", operation) + stats := &agent.Stats{} for _, p := range sh.providers { - stats.Merge(p.Stats(operation)) + log.Println("Merging stats from provider:", fmt.Sprintf("%T", p)) + stats.Merge(p.Stats("PutMetricData")) + stats.Merge(p.Stats("DescribeTags")) + } + + log.Println("Stats after merging all providers:", stats) + header, err := stats.Marshal() if err != nil { - sh.logger.Warn("Failed to serialize agent stats", zap.Error(err)) + log.Println("Failed to serialize agent stats:", err) + return "" } + + log.Println("Successfully generated header for operation:", operation) return header } From 8c6d037cfd27edcc6ce0cde4a4b8da04e9996ce9 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 13:53:55 -0500 Subject: [PATCH 07/48] fixing logs --- .../agenthealth/handler/stats/handler.go | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 7f869f0fb3..72c94b8356 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -90,13 +90,27 @@ func (sh *statsHandler) Position() awsmiddleware.HandlerPosition { } func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { + // Extract the operation name from the context operation := awsmiddleware.GetOperationName(ctx) - //if !sh.filter.IsAllowed(operation) { - // return - //} + log.Println("Handling request for operation:", operation) + + // If filtering is enabled, check if the operation is allowed (commented out for now) + // if !sh.filter.IsAllowed(operation) { + // log.Println("Operation not allowed:", operation) + // return + // } + + // Generate the header for the operation + log.Println("Generating header for operation:", operation) header := sh.Header(operation) + + // If a valid header is generated, set it in the request if header != "" { + log.Println("Setting header for operation:", operation) r.Header.Set(headerKeyAgentStats, header) + log.Println("Header set successfully for operation:", operation) + } else { + log.Println("No header generated for operation:", operation) } } From 6ff99f88bfc95977068ff8f6d7a1b1528caf1110 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 14:02:34 -0500 Subject: [PATCH 08/48] fixing logs --- extension/agenthealth/handler/stats/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 72c94b8356..85e432dde6 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -104,6 +104,7 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { log.Println("Generating header for operation:", operation) header := sh.Header(operation) + fmt.Println("This is the header", header) // If a valid header is generated, set it in the request if header != "" { log.Println("Setting header for operation:", operation) From 667f608979c7d63b184fe40f0d43acd854f67f36 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 14:27:03 -0500 Subject: [PATCH 09/48] adding a log --- extension/agenthealth/handler/stats/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 85e432dde6..de7592e0f9 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -104,7 +104,7 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { log.Println("Generating header for operation:", operation) header := sh.Header(operation) - fmt.Println("This is the header", header) + log.Println("This is the header", header) // If a valid header is generated, set it in the request if header != "" { log.Println("Setting header for operation:", operation) From 9de94489f2a9ec31c2fa130ba6adc00aac58d1bb Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 14:35:36 -0500 Subject: [PATCH 10/48] fixing stats function for statuscodehandler --- .../agenthealth/handler/stats/handler.go | 3 +-- .../handler/stats/provider/statuscode.go | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index de7592e0f9..e49e182670 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -121,8 +121,7 @@ func (sh *statsHandler) Header(operation string) string { stats := &agent.Stats{} for _, p := range sh.providers { log.Println("Merging stats from provider:", fmt.Sprintf("%T", p)) - stats.Merge(p.Stats("PutMetricData")) - stats.Merge(p.Stats("DescribeTags")) + stats.Merge(p.Stats(operation)) } diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index ef3590793b..6e257c82cd 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -127,17 +127,21 @@ func (h *StatusCodeHandler) Position() awsmiddleware.HandlerPosition { // Stats implements the `Stats` method required by the `agent.StatsProvider` interface. func (h *StatusCodeHandler) Stats(operation string) agent.Stats { - value, ok := h.statsByOperation.Load(operation) - if !ok { - return agent.Stats{ - StatusCodes: map[string][2]int{}, - } - } + h.mu.Lock() + defer h.mu.Unlock() + + // Initialize the map to store status codes for all operations + statusCodeMap := make(map[string][2]int) + + // Iterate over all operations and collect their status codes + h.statsByOperation.Range(func(key, value interface{}) bool { + operation := key.(string) + stats := value.(*[2]int) + statusCodeMap[operation] = [2]int{stats[0], stats[1]} + return true + }) - stats := value.(*[2]int) return agent.Stats{ - StatusCodes: map[string][2]int{ - operation: {stats[0], stats[1]}, - }, + StatusCodes: statusCodeMap, } } From 1e690e3243c46de9bf7d60b33b83072d6f873469 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 15:35:24 -0500 Subject: [PATCH 11/48] fixing issue --- .../agenthealth/handler/stats/agent/agent.go | 30 +++++++---- .../handler/stats/provider/statuscode.go | 51 ++++++++++++------- plugins/processors/ec2tagger/ec2tagger.go | 2 +- 3 files changed, 53 insertions(+), 30 deletions(-) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 4835239010..c3f53cabf2 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -31,7 +31,7 @@ type Stats struct { RegionType *string `json:"rt,omitempty"` Mode *string `json:"m,omitempty"` EntityRejected *int `json:"ent,omitempty"` - StatusCodes map[string][2]int `json:"codes,omitempty"` + StatusCodes map[string][5]int `json:"codes,omitempty"` } // Merge the other Stats into the current. If the field is not nil, @@ -87,26 +87,34 @@ func (s *Stats) Merge(other Stats) { if s.StatusCodes == nil { log.Println("Initializing status codes map as it was nil.") - s.StatusCodes = make(map[string][2]int) + s.StatusCodes = make(map[string][5]int) } for key, value := range other.StatusCodes { - log.Printf("Processing key: %s with value: Success=%d, Failures=%d", key, value[0], value[1]) + log.Printf("Processing key: %s with value: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", key, value[0], value[1], value[2], value[3], value[4]) if existing, ok := s.StatusCodes[key]; ok { log.Printf( - "Key %s already exists. Existing: Success=%d, Failures=%d. Merging with: Success=%d, Failures=%d", - key, existing[0], existing[1], value[0], value[1], + "Key %s already exists. Existing: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d. Merging with: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", + key, existing[0], existing[1], existing[2], existing[3], existing[4], + value[0], value[1], value[2], value[3], value[4], ) - // Merge the existing value with the new one - s.StatusCodes[key] = [2]int{existing[0] + value[0], existing[1] + value[1]} + + //Merge the values for each status code + s.StatusCodes[key] = [5]int{ + existing[0] + value[0], // 200 + existing[1] + value[1], // 400 + existing[2] + value[2], // 408 + existing[3] + value[3], // 413 + existing[4] + value[4], // 429 + } + log.Printf( - "Updated key %s: Success=%d, Failures=%d", - key, s.StatusCodes[key][0], s.StatusCodes[key][1], + "Updated key %s: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", + key, s.StatusCodes[key][0], s.StatusCodes[key][1], s.StatusCodes[key][2], s.StatusCodes[key][3], s.StatusCodes[key][4], ) } else { - // Add the new value if the key doesn't exist - log.Printf("Key %s does not exist. Adding it with: Success=%d, Failures=%d", key, value[0], value[1]) + log.Printf("Key %s does not exist. Adding it with: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", key, value[0], value[1], value[2], value[3], value[4]) s.StatusCodes[key] = value } } diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 6e257c82cd..36c450ac5b 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -74,24 +74,18 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response defer h.mu.Unlock() // Load or initialize stats for the operation - value, loaded := h.statsByOperation.LoadOrStore(operation, &[2]int{}) + value, loaded := h.statsByOperation.LoadOrStore(operation, &[5]int{}) // Adjusted to hold counts for multiple status codes if !loaded { log.Printf("Initializing stats for operation: %s", operation) } - stats := value.(*[2]int) + stats := value.(*[5]int) - // Update success or failure count - if statusCode >= 200 && statusCode < 300 { - stats[0]++ - log.Printf("Incremented success count for operation: %s. New Success=%d", operation, stats[0]) - } else { - stats[1]++ - log.Printf("Incremented failure count for operation: %s. New Failures=%d", operation, stats[1]) - } + // Update counts based on specific status codes + h.updateStatusCodeCount(stats, statusCode, operation) // Store updated stats back in the map h.statsByOperation.Store(operation, stats) - log.Printf("Updated stats for operation '%s': Success=%d, Failures=%d", operation, stats[0], stats[1]) + log.Printf("Updated stats for operation '%s': 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) // Log the entire status code map log.Println("Complete status code map:") @@ -99,12 +93,35 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response log.Print("Printing all stats by operations map") operation := key.(string) - stats := value.(*[2]int) - log.Printf("Operation: %s, Success=%d, Failures=%d", operation, stats[0], stats[1]) + stats := value.(*[5]int) + log.Printf("Operation: %s, 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) return true }) } +// Helper function to update the status code counts +func (h *StatusCodeHandler) updateStatusCodeCount(stats *[5]int, statusCode int, operation string) { + switch statusCode { + case 200: + stats[0]++ + log.Printf("Incremented 200 count for operation: %s. New 200=%d", operation, stats[0]) + case 400: + stats[1]++ + log.Printf("Incremented 400 count for operation: %s. New 400=%d", operation, stats[1]) + case 408: + stats[2]++ + log.Printf("Incremented 408 count for operation: %s. New 408=%d", operation, stats[2]) + case 413: + stats[3]++ + log.Printf("Incremented 413 count for operation: %s. New 413=%d", operation, stats[3]) + case 429: + stats[4]++ + log.Printf("Incremented 429 count for operation: %s. New 429=%d", operation, stats[4]) + default: + log.Printf("Received an untracked status code %d for operation: %s", statusCode, operation) + } +} + // GetStats retrieves the success and failure counts for a specific operation. func (h *StatusCodeHandler) GetStats(operation string) (successCount, failureCount int) { value, ok := h.statsByOperation.Load(operation) @@ -130,14 +147,12 @@ func (h *StatusCodeHandler) Stats(operation string) agent.Stats { h.mu.Lock() defer h.mu.Unlock() - // Initialize the map to store status codes for all operations - statusCodeMap := make(map[string][2]int) + statusCodeMap := make(map[string][5]int) - // Iterate over all operations and collect their status codes h.statsByOperation.Range(func(key, value interface{}) bool { operation := key.(string) - stats := value.(*[2]int) - statusCodeMap[operation] = [2]int{stats[0], stats[1]} + stats := value.(*[5]int) + statusCodeMap[operation] = [5]int{stats[0], stats[1], stats[2], stats[3], stats[4]} return true }) diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 0618c027cd..9a34c6ac15 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -367,7 +367,7 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) log.Print("Inside ec2tagger ec2api - log printf statement") log.Print(*t.Config.MiddlewareID) - awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) + awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? } go func() { From 4c6adcf0aebc6dd3d8ff8977dad6004dc9853713 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 15:45:50 -0500 Subject: [PATCH 12/48] making operation names shorter --- .../handler/stats/provider/statuscode.go | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 36c450ac5b..32897eb4c6 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -66,28 +66,24 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response log.Printf("Processing response for operation: %s", operation) } - // Extract the status code + operation = GetShortOperationName(operation) statusCode := r.StatusCode log.Printf("Received status code: %d for operation: %s", statusCode, operation) h.mu.Lock() defer h.mu.Unlock() - // Load or initialize stats for the operation - value, loaded := h.statsByOperation.LoadOrStore(operation, &[5]int{}) // Adjusted to hold counts for multiple status codes + value, loaded := h.statsByOperation.LoadOrStore(operation, &[5]int{}) if !loaded { log.Printf("Initializing stats for operation: %s", operation) } stats := value.(*[5]int) - // Update counts based on specific status codes h.updateStatusCodeCount(stats, statusCode, operation) - // Store updated stats back in the map h.statsByOperation.Store(operation, stats) log.Printf("Updated stats for operation '%s': 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) - // Log the entire status code map log.Println("Complete status code map:") h.statsByOperation.Range(func(key, value interface{}) bool { log.Print("Printing all stats by operations map") @@ -122,6 +118,37 @@ func (h *StatusCodeHandler) updateStatusCodeCount(stats *[5]int, statusCode int, } } +func GetShortOperationName(operation string) string { + switch operation { + case "PutMetricData": + return "pmd" + case "DescribeInstances": + return "di" + case "DescribeTags": + return "dt" + case "DescribeVolumes": + return "dv" + case "DescribeContainerInstances": + return "dci" + case "DescribeServices": + return "ds" + case "DescribeTaskDefinition": + return "dtd" + case "ListServices": + return "ls" + case "ListTasks": + return "lt" + case "CreateLogGroup": + return "clg" + case "CreateLogStream": + return "cls" + case "AssumeRole": + return "sts" + default: + return operation + } +} + // GetStats retrieves the success and failure counts for a specific operation. func (h *StatusCodeHandler) GetStats(operation string) (successCount, failureCount int) { value, ok := h.statsByOperation.Load(operation) From dc129c9734a910cffd0e805e65fb2b1c8c5a2680 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 17:07:01 -0500 Subject: [PATCH 13/48] Last commit works to reduce name- this one is for filtering operations from status codes --- extension/agenthealth/config.go | 1 + extension/agenthealth/extension.go | 14 +------- .../agenthealth/handler/stats/agent/agent.go | 21 ++++++++--- .../agenthealth/handler/stats/handler.go | 19 +++++----- .../handler/stats/provider/statuscode.go | 6 +++- .../otel/extension/agenthealth/translator.go | 35 +++++++++++++++---- 6 files changed, 62 insertions(+), 34 deletions(-) diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index aa8e642e76..368596fec4 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -13,6 +13,7 @@ type Config struct { IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` Stats agent.StatsConfig `mapstructure:"stats"` StatusCode agent.StatusCodeConfig `mapstructure:"status_code"` //not sure if this supposed to be a different name?????? + StatusCodeOnly bool `mapstructure:"is_status_code_only"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index ea0216418b..385524f2a4 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -26,21 +26,9 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa var responseHandlers []awsmiddleware.ResponseHandler requestHandlers := []awsmiddleware.RequestHandler{useragent.NewHandler(ah.cfg.IsUsageDataEnabled)} - // Log the initialization - ah.logger.Debug("Initialized default request handler with user agent handler") - if ah.cfg.IsUsageDataEnabled { - // Log usage data configuration - ah.logger.Debug("Usage data is enabled, creating stats handlers") - - // Create stats handlers - req, res := stats.NewHandlers(ah.logger, ah.cfg.Stats, true) - - // Add stats handlers - ah.logger.Debug("Appending request handlers", zap.Int("count", len(req))) + req, res := stats.NewHandlers(ah.logger, ah.cfg) requestHandlers = append(requestHandlers, req...) - - ah.logger.Debug("Appending response handlers", zap.Int("count", len(res))) responseHandlers = append(responseHandlers, res...) } else { // Log usage data configuration is disabled diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index c3f53cabf2..217d8541f7 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -163,14 +163,27 @@ type StatsConfig struct { type StatusCodeConfig struct { // Operations are the allowed operation names to gather stats for. Operations []string `json:"operations,omitempty"` +} - // AllowedStatusCodes are the allowed status codes to gather stats for. - AllowedStatusCodes []int `json:"allowedStatusCodes,omitempty"` +var StatusCodeOperations = []string{ + "DescribeInstances", + "DescribeTags", + "DescribeVolumes", + "DescribeContainerInstances", + "DescribeServices", + "DescribeTaskDefinition", + "ListServices", + "ListTasks", + "CreateLogGroup", + "CreateLogStream", } // NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. -func NewStatusCodeOperationsFilter(cfg StatusCodeConfig) OperationsFilter { - allowed := collections.NewSet[string](cfg.Operations...) +func NewStatusCodeOperationsFilter() OperationsFilter { + //Need to add more operations !!!!!!!?????? + + allowed := collections.NewSet[string](StatusCodeOperations...) + return OperationsFilter{ operations: allowed, allowAll: allowed.Contains(AllowAllOperations), diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index e49e182670..26b4d0b2f7 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -6,6 +6,7 @@ package stats import ( "context" "fmt" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" "log" "net/http" "sync" @@ -23,18 +24,17 @@ const ( headerKeyAgentStats = "X-Amz-Agent-Stats" ) -func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { - if statsB { +func NewHandlers(logger *zap.Logger, cfg agenthealth.Config) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { + statusCodeFilter := agent.NewStatusCodeOperationsFilter() + if !cfg.StatusCodeOnly { log.Println("Stats are enabled, creating handlers") - - // Create the operations filter - filter := agent.NewOperationsFilter(cfg.Operations...) - log.Println("Operations filter created, operations:", cfg.Operations) + filter := agent.NewOperationsFilter(cfg.Stats.Operations...) + log.Println("Operations filter created, operations:", cfg.Stats.Operations) clientStats := client.NewHandler(filter) log.Println("Client stats handler created") - statusCodeStats := provider.GetStatusCodeStats() + statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) log.Println("Status code stats handler retrieved") stats := newStatsHandler(logger, filter, []agent.StatsProvider{ @@ -46,15 +46,14 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statsB bool) ([]awsm log.Println("Stats handler created with providers") // Set usage flags - agent.UsageFlags().SetValues(cfg.UsageFlags) + agent.UsageFlags().SetValues(cfg.Stats.UsageFlags) // Return handlers log.Println("Returning request and response handlers, requestHandlerCount: 2, responseHandlerCount: 1") return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } else { log.Println("Stats are disabled, creating only status code stats handler") - - statusCodeStats := provider.GetStatusCodeStats() + statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) log.Println("Status code stats handler retrieved") log.Println("Returning handlers, requestHandlerCount: 0, responseHandlerCount: 1") diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 32897eb4c6..1c9d3e9db2 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -26,12 +26,14 @@ type StatusCodeHandler struct { statsByOperation sync.Map mu sync.Mutex resetTimer *time.Timer + filter agent.OperationsFilter } // GetStatusCodeStats retrieves or initializes the singleton StatusCodeHandler. -func GetStatusCodeStats() *StatusCodeHandler { +func GetStatusCodeStats(filter agent.OperationsFilter) *StatusCodeHandler { statusCodeStatsOnce.Do(func() { handler := &StatusCodeHandler{} + handler.filter = filter handler.startResetTimer() statusCodeSingleton = handler }) @@ -62,6 +64,8 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response operation := awsmiddleware.GetOperationName(ctx) if operation == "" { log.Println("No operation name found in the context") + } else if !h.filter.IsAllowed(operation) { + log.Printf("Operation %s is not allowed", operation) } else { log.Printf("Processing response for operation: %s", operation) } diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 7720a8c54a..d385666fdf 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -4,15 +4,15 @@ package agenthealth import ( + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "github.com/aws/amazon-cloudwatch-agent/translator/context" + translateagent "github.com/aws/amazon-cloudwatch-agent/translator/translate/agent" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/extension" "github.com/aws/amazon-cloudwatch-agent/cfg/envconfig" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" - "github.com/aws/amazon-cloudwatch-agent/translator/context" - translateagent "github.com/aws/amazon-cloudwatch-agent/translator/translate/agent" "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/common" ) @@ -36,16 +36,28 @@ type translator struct { operations []string isUsageDataEnabled bool factory extension.Factory + statuscodeonly bool } var _ common.Translator[component.Config] = (*translator)(nil) +func NewTranslatorWithStatusCode(name component.DataType, operations []string, statuscodeonly bool) common.Translator[component.Config] { + return &translator{ + name: name.String(), + operations: operations, + factory: agenthealth.NewFactory(), + isUsageDataEnabled: envconfig.IsUsageDataEnabled(), + statuscodeonly: statuscodeonly, + } +} + func NewTranslator(name component.DataType, operations []string) common.Translator[component.Config] { return &translator{ name: name.String(), operations: operations, factory: agenthealth.NewFactory(), isUsageDataEnabled: envconfig.IsUsageDataEnabled(), + statuscodeonly: false, } } @@ -57,9 +69,16 @@ func (t *translator) ID() component.ID { func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { cfg := t.factory.CreateDefaultConfig().(*agenthealth.Config) cfg.IsUsageDataEnabled = t.isUsageDataEnabled - //if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { - // cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData - //} // for now we will comment this ???????c + if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { + cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData + } + cfg.StatusCodeOnly = t.statuscodeonly + if t.statuscodeonly { + cfg.StatusCode = agent.StatusCodeConfig{ + Operations: agent.StatusCodeOperations, + } + return cfg, nil + } cfg.Stats = agent.StatsConfig{ Operations: t.operations, UsageFlags: map[agent.Flag]any{ @@ -67,5 +86,9 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { agent.FlagRegionType: translateagent.Global_Config.RegionType, }, } + cfg.StatusCode = agent.StatusCodeConfig{ + Operations: agent.StatusCodeOperations, + } + return cfg, nil } From 07a06fa667b5d985ad51c2b9819222dbb15f8dbc Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 17:28:16 -0500 Subject: [PATCH 14/48] adding status code only filter --- extension/agenthealth/extension.go | 2 +- extension/agenthealth/handler/stats/handler.go | 11 +++++------ .../agenthealth/handler/stats/provider/statuscode.go | 6 +++++- plugins/processors/ec2tagger/ec2tagger.go | 3 ++- .../otel/extension/agenthealth/translator.go | 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index 385524f2a4..60ad8974e9 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -27,7 +27,7 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa requestHandlers := []awsmiddleware.RequestHandler{useragent.NewHandler(ah.cfg.IsUsageDataEnabled)} if ah.cfg.IsUsageDataEnabled { - req, res := stats.NewHandlers(ah.logger, ah.cfg) + req, res := stats.NewHandlers(ah.logger, ah.cfg.Stats, ah.cfg.StatusCodeOnly) requestHandlers = append(requestHandlers, req...) responseHandlers = append(responseHandlers, res...) } else { diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 26b4d0b2f7..37948efad0 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -6,7 +6,6 @@ package stats import ( "context" "fmt" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" "log" "net/http" "sync" @@ -24,12 +23,12 @@ const ( headerKeyAgentStats = "X-Amz-Agent-Stats" ) -func NewHandlers(logger *zap.Logger, cfg agenthealth.Config) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { +func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { statusCodeFilter := agent.NewStatusCodeOperationsFilter() - if !cfg.StatusCodeOnly { + if !statuscodeonly { log.Println("Stats are enabled, creating handlers") - filter := agent.NewOperationsFilter(cfg.Stats.Operations...) - log.Println("Operations filter created, operations:", cfg.Stats.Operations) + filter := agent.NewOperationsFilter(cfg.Operations...) + log.Println("Operations filter created, operations:", cfg.Operations) clientStats := client.NewHandler(filter) log.Println("Client stats handler created") @@ -46,7 +45,7 @@ func NewHandlers(logger *zap.Logger, cfg agenthealth.Config) ([]awsmiddleware.Re log.Println("Stats handler created with providers") // Set usage flags - agent.UsageFlags().SetValues(cfg.Stats.UsageFlags) + agent.UsageFlags().SetValues(cfg.UsageFlags) // Return handlers log.Println("Returning request and response handlers, requestHandlerCount: 2, responseHandlerCount: 1") diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 1c9d3e9db2..58d8ab6b92 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -1,14 +1,18 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + package provider import ( "context" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "log" "net/http" "sync" "time" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) const ( diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 9a34c6ac15..9c01df455f 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -5,13 +5,14 @@ package ec2tagger import ( "context" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" "hash/fnv" "log" "os" "sync" "time" + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index d385666fdf..62c7629ff7 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -4,15 +4,15 @@ package agenthealth import ( - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" - "github.com/aws/amazon-cloudwatch-agent/translator/context" - translateagent "github.com/aws/amazon-cloudwatch-agent/translator/translate/agent" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/extension" "github.com/aws/amazon-cloudwatch-agent/cfg/envconfig" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "github.com/aws/amazon-cloudwatch-agent/translator/context" + translateagent "github.com/aws/amazon-cloudwatch-agent/translator/translate/agent" "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/common" ) From 0f76726364c2b0c52ac6e2b3c0ebc1b5caf1c0aa Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 17:32:31 -0500 Subject: [PATCH 15/48] removing status code from otel config --- .../otel/extension/agenthealth/translator.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 62c7629ff7..107126ec46 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -74,9 +74,9 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { } cfg.StatusCodeOnly = t.statuscodeonly if t.statuscodeonly { - cfg.StatusCode = agent.StatusCodeConfig{ - Operations: agent.StatusCodeOperations, - } + //cfg.StatusCode = agent.StatusCodeConfig{ + // Operations: agent.StatusCodeOperations, + //} return cfg, nil } cfg.Stats = agent.StatsConfig{ @@ -86,9 +86,9 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { agent.FlagRegionType: translateagent.Global_Config.RegionType, }, } - cfg.StatusCode = agent.StatusCodeConfig{ - Operations: agent.StatusCodeOperations, - } + //cfg.StatusCode = agent.StatusCodeConfig{ + // Operations: agent.StatusCodeOperations, + //} //Do we need to add anything to otel config? return cfg, nil } From 965ccdb93e64f32aa94b3a62a3261c79bd5d5952 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 17:38:20 -0500 Subject: [PATCH 16/48] had to add return statments to filter --- extension/agenthealth/handler/stats/provider/statuscode.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 58d8ab6b92..1449cc57fa 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -68,8 +68,10 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response operation := awsmiddleware.GetOperationName(ctx) if operation == "" { log.Println("No operation name found in the context") + return } else if !h.filter.IsAllowed(operation) { log.Printf("Operation %s is not allowed", operation) + return } else { log.Printf("Processing response for operation: %s", operation) } From a8268fd07a49b00c002d895a2196fdcf0ea6145b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 17:46:44 -0500 Subject: [PATCH 17/48] commenting out try configure for ec2tagger --- plugins/processors/ec2tagger/ec2tagger.go | 40 +++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 9c01df455f..5f0122174f 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -11,8 +11,6 @@ import ( "sync" "time" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" @@ -351,25 +349,25 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { } t.ec2API = t.ec2Provider(ec2CredentialConfig) - if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { - t.logger.Info("Inside ec2tagger ec2api logger statement") - log.Print("Inside ec2tagger ec2api - log printf statement") - - if t.Config.MiddlewareID == nil { - t.logger.Info("Inside ec2tagger middleware default") - log.Print("Inside ec2tagger ec2api - log printf statement") - - TypeStr, _ = component.NewType("agenthealth") - defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) - t.Config.MiddlewareID = &defaultMiddlewareID - t.logger.Info("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) - } - - t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) - log.Print("Inside ec2tagger ec2api - log printf statement") - log.Print(*t.Config.MiddlewareID) - awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? - } + //if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { + // t.logger.Info("Inside ec2tagger ec2api logger statement") + // log.Print("Inside ec2tagger ec2api - log printf statement") + // + // if t.Config.MiddlewareID == nil { + // t.logger.Info("Inside ec2tagger middleware default") + // log.Print("Inside ec2tagger ec2api - log printf statement") + // + // TypeStr, _ = component.NewType("agenthealth") + // defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) + // t.Config.MiddlewareID = &defaultMiddlewareID + // t.logger.Info("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + // } + // + // t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + // log.Print("Inside ec2tagger ec2api - log printf statement") + // log.Print(*t.Config.MiddlewareID) + //awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? + //} go func() { t.logger.Info("ec2tagger: Starting initial retrieval of tags and volumes.") From 8ddb463c108caa769dcbf83dd2529bdcca4448f7 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 18:05:12 -0500 Subject: [PATCH 18/48] adding ecw client for ec2 tagger --- plugins/processors/ec2tagger/ec2tagger.go | 44 ++++++++++++----------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 5f0122174f..6c458e1c16 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -5,12 +5,16 @@ package ec2tagger import ( "context" + "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/extension/agenthealth" + "hash/fnv" "log" "os" "sync" "time" + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" @@ -64,7 +68,7 @@ type Tagger struct { func newTagger(config *Config, logger *zap.Logger) *Tagger { _, cancel := context.WithCancel(context.Background()) mdCredentialConfig := &configaws.CredentialConfig{} - + config.MiddlewareID = &agenthealth.StatusCodeID p := &Tagger{ Config: config, logger: logger, @@ -349,25 +353,25 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { } t.ec2API = t.ec2Provider(ec2CredentialConfig) - //if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { - // t.logger.Info("Inside ec2tagger ec2api logger statement") - // log.Print("Inside ec2tagger ec2api - log printf statement") - // - // if t.Config.MiddlewareID == nil { - // t.logger.Info("Inside ec2tagger middleware default") - // log.Print("Inside ec2tagger ec2api - log printf statement") - // - // TypeStr, _ = component.NewType("agenthealth") - // defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) - // t.Config.MiddlewareID = &defaultMiddlewareID - // t.logger.Info("ec2tagger: MiddlewareID was nil, initialized to default value.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) - // } - // - // t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) - // log.Print("Inside ec2tagger ec2api - log printf statement") - // log.Print(*t.Config.MiddlewareID) - //awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? - //} + if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { + t.logger.Info("Inside ec2tagger ec2api logger statement") + log.Print("Inside ec2tagger ec2api - log printf statement") + + if t.Config.MiddlewareID == nil { + t.logger.Info("Inside ec2tagger middleware default") + log.Print("Inside ec2tagger ec2api - log printf statement") + + TypeStr, _ = component.NewType("agenthealth") + defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) + t.Config.MiddlewareID = &defaultMiddlewareID + log.Println("ec2tagger: MiddlewareID was nil, initialized to default value.", t.Config.MiddlewareID.Name()) + } + + t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) + log.Print("Inside ec2tagger ec2api - log printf statement") + log.Print(*t.Config.MiddlewareID) + awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? + } go func() { t.logger.Info("ec2tagger: Starting initial retrieval of tags and volumes.") From 3c15e8147cda820a6a9cf75c322845eb4e757c0e Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 18:13:41 -0500 Subject: [PATCH 19/48] changing the middleware to metricID --- plugins/processors/ec2tagger/ec2tagger.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 6c458e1c16..55b6866bff 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -5,8 +5,6 @@ package ec2tagger import ( "context" - "github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/extension/agenthealth" - "hash/fnv" "log" "os" @@ -68,7 +66,6 @@ type Tagger struct { func newTagger(config *Config, logger *zap.Logger) *Tagger { _, cancel := context.WithCancel(context.Background()) mdCredentialConfig := &configaws.CredentialConfig{} - config.MiddlewareID = &agenthealth.StatusCodeID p := &Tagger{ Config: config, logger: logger, From 947b8f31c702e97d7a597a0bf0ec71e25c31f86c Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 13 Nov 2024 19:04:40 -0500 Subject: [PATCH 20/48] trying to get stat --- extension/agenthealth/handler/stats/handler.go | 10 +++++----- .../agenthealth/handler/stats/provider/statuscode.go | 10 ---------- .../translate/otel/extension/agenthealth/translator.go | 7 +++---- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 37948efad0..a26b98c67d 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -36,7 +36,7 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) log.Println("Status code stats handler retrieved") - stats := newStatsHandler(logger, filter, []agent.StatsProvider{ + stats := newStatsHandler(logger, statusCodeFilter, []agent.StatsProvider{ clientStats, provider.GetProcessStats(), provider.GetFlagsStats(), @@ -93,10 +93,10 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { log.Println("Handling request for operation:", operation) // If filtering is enabled, check if the operation is allowed (commented out for now) - // if !sh.filter.IsAllowed(operation) { - // log.Println("Operation not allowed:", operation) - // return - // } + //if !sh.filter.IsAllowed(operation) { + // log.Println("Operation not allowed:", operation) + // return + //} // Generate the header for the operation log.Println("Generating header for operation:", operation) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 1449cc57fa..d000f62889 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -159,16 +159,6 @@ func GetShortOperationName(operation string) string { } } -// GetStats retrieves the success and failure counts for a specific operation. -func (h *StatusCodeHandler) GetStats(operation string) (successCount, failureCount int) { - value, ok := h.statsByOperation.Load(operation) - if !ok { - return 0, 0 - } - stats := value.(*[2]int) - return stats[0], stats[1] -} - // ID returns the unique identifier for the handler. func (h *StatusCodeHandler) ID() string { return statusHandlerID diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 107126ec46..1a43a1d0a4 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -25,10 +25,9 @@ const ( ) var ( - MetricsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeMetrics.String()) - LogsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeLogs.String()) - TracesID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeTraces.String()) - StatusCodeID = component.NewIDWithName(agenthealth.TypeStr, "StatusCode") + MetricsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeMetrics.String()) + LogsID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeLogs.String()) + TracesID = component.NewIDWithName(agenthealth.TypeStr, component.DataTypeTraces.String()) ) type translator struct { From a76ef499a7bc613252002156493519a170f90e6b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 15 Nov 2024 15:44:52 -0500 Subject: [PATCH 21/48] everything works just removing some debug statement and filter from handler --- extension/agenthealth/extension.go | 7 --- .../agenthealth/handler/stats/agent/agent.go | 6 +-- .../agenthealth/handler/stats/handler.go | 54 +++++++------------ 3 files changed, 20 insertions(+), 47 deletions(-) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index 60ad8974e9..d129fe02c8 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -31,16 +31,9 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa requestHandlers = append(requestHandlers, req...) responseHandlers = append(responseHandlers, res...) } else { - // Log usage data configuration is disabled ah.logger.Debug("Usage data is disabled, skipping stats handlers") } - // Log final handlers - ah.logger.Debug("Handlers created", - zap.Int("requestHandlersCount", len(requestHandlers)), - zap.Int("responseHandlersCount", len(responseHandlers)), - ) - return requestHandlers, responseHandlers } diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 217d8541f7..0a5cdae335 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -31,7 +31,7 @@ type Stats struct { RegionType *string `json:"rt,omitempty"` Mode *string `json:"m,omitempty"` EntityRejected *int `json:"ent,omitempty"` - StatusCodes map[string][5]int `json:"codes,omitempty"` + StatusCodes map[string][5]int `json:"codes,omitempty"` //represents status codes 200,400,408,413,429, } // Merge the other Stats into the current. If the field is not nil, @@ -165,7 +165,7 @@ type StatusCodeConfig struct { Operations []string `json:"operations,omitempty"` } -var StatusCodeOperations = []string{ +var StatusCodeOperations = []string{ // all the operations that are allowed "DescribeInstances", "DescribeTags", "DescribeVolumes", @@ -180,8 +180,6 @@ var StatusCodeOperations = []string{ // NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. func NewStatusCodeOperationsFilter() OperationsFilter { - //Need to add more operations !!!!!!!?????? - allowed := collections.NewSet[string](StatusCodeOperations...) return OperationsFilter{ diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index a26b98c67d..51d61b6641 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -25,39 +25,23 @@ const ( func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { statusCodeFilter := agent.NewStatusCodeOperationsFilter() - if !statuscodeonly { - log.Println("Stats are enabled, creating handlers") - filter := agent.NewOperationsFilter(cfg.Operations...) - log.Println("Operations filter created, operations:", cfg.Operations) - - clientStats := client.NewHandler(filter) - log.Println("Client stats handler created") - - statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) - log.Println("Status code stats handler retrieved") - - stats := newStatsHandler(logger, statusCodeFilter, []agent.StatsProvider{ - clientStats, - provider.GetProcessStats(), - provider.GetFlagsStats(), - statusCodeStats, - }) - log.Println("Stats handler created with providers") - - // Set usage flags - agent.UsageFlags().SetValues(cfg.UsageFlags) - - // Return handlers - log.Println("Returning request and response handlers, requestHandlerCount: 2, responseHandlerCount: 1") - return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} - } else { - log.Println("Stats are disabled, creating only status code stats handler") + if statuscodeonly { statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) - log.Println("Status code stats handler retrieved") - - log.Println("Returning handlers, requestHandlerCount: 0, responseHandlerCount: 1") return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } + filter := agent.NewOperationsFilter(cfg.Operations...) + clientStats := client.NewHandler(filter) + statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) + + stats := newStatsHandler(logger, statusCodeFilter, []agent.StatsProvider{ + clientStats, + provider.GetProcessStats(), + provider.GetFlagsStats(), + statusCodeStats, + }) + agent.UsageFlags().SetValues(cfg.UsageFlags) + + return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } type statsHandler struct { @@ -88,15 +72,13 @@ func (sh *statsHandler) Position() awsmiddleware.HandlerPosition { } func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { - // Extract the operation name from the context operation := awsmiddleware.GetOperationName(ctx) log.Println("Handling request for operation:", operation) - // If filtering is enabled, check if the operation is allowed (commented out for now) - //if !sh.filter.IsAllowed(operation) { - // log.Println("Operation not allowed:", operation) - // return - //} + if !sh.filter.IsAllowed(operation) { + log.Println("Operation not allowed:", operation) + return + } // Generate the header for the operation log.Println("Generating header for operation:", operation) From abf484b907d0dbfcda35aec3db6d958a746d2e35 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 15 Nov 2024 16:22:21 -0500 Subject: [PATCH 22/48] fixing filter issue --- .../agenthealth/handler/stats/agent/agent.go | 25 ++++++++++ .../agenthealth/handler/stats/handler.go | 6 +-- .../sampleConfig/advanced_config_linux.json | 47 +++++++------------ .../sampleConfig/complete_linux_config.json | 10 ++-- 4 files changed, 50 insertions(+), 38 deletions(-) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 0a5cdae335..ce234ef94b 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -178,6 +178,22 @@ var StatusCodeOperations = []string{ // all the operations that are allowed "CreateLogStream", } +var StatusCodeAndOtherOperations = []string{ // all the operations that are allowed + "PutMetricData", + "PutLogEvents", + "PutTraceSegments", + "DescribeInstances", + "DescribeTags", + "DescribeVolumes", + "DescribeContainerInstances", + "DescribeServices", + "DescribeTaskDefinition", + "ListServices", + "ListTasks", + "CreateLogGroup", + "CreateLogStream", +} + // NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. func NewStatusCodeOperationsFilter() OperationsFilter { allowed := collections.NewSet[string](StatusCodeOperations...) @@ -187,3 +203,12 @@ func NewStatusCodeOperationsFilter() OperationsFilter { allowAll: allowed.Contains(AllowAllOperations), } } + +func NewStatusCodeAndOtherOperationsFilter() OperationsFilter { + allowed := collections.NewSet[string](StatusCodeAndOtherOperations...) + + return OperationsFilter{ + operations: allowed, + allowAll: allowed.Contains(AllowAllOperations), + } +} diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 51d61b6641..b4d9d32caa 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -29,11 +29,11 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } - filter := agent.NewOperationsFilter(cfg.Operations...) + filter := agent.NewStatusCodeAndOtherOperationsFilter() clientStats := client.NewHandler(filter) statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) - stats := newStatsHandler(logger, statusCodeFilter, []agent.StatsProvider{ + stats := newStatsHandler(logger, filter, []agent.StatsProvider{ clientStats, provider.GetProcessStats(), provider.GetFlagsStats(), @@ -80,12 +80,10 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { return } - // Generate the header for the operation log.Println("Generating header for operation:", operation) header := sh.Header(operation) log.Println("This is the header", header) - // If a valid header is generated, set it in the request if header != "" { log.Println("Setting header for operation:", operation) r.Header.Set(headerKeyAgentStats, header) diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.json b/translator/tocwconfig/sampleConfig/advanced_config_linux.json index bb70dd5c72..ae8b1cef02 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.json +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.json @@ -1,9 +1,4 @@ { - "agent": { - "debug": true, - "aws_sdk_log_level": "LogDebugWithHTTPBody", - "region": "us-west-2" - }, "metrics": { "append_dimensions": { "AutoScalingGroupName": "${aws:AutoScalingGroupName}", @@ -19,8 +14,7 @@ "cpu_usage_user", "cpu_usage_system" ], - "totalcpu": false, - "metrics_collection_interval": 10 + "totalcpu": false }, "disk": { "resources": [ @@ -29,8 +23,7 @@ "measurement": [ "used_percent", "inodes_free" - ], - "metrics_collection_interval": 60 + ] }, "diskio": { "resources": [ @@ -42,27 +35,23 @@ "read_bytes", "writes", "reads" - ], - "metrics_collection_interval": 60 + ] }, "mem": { "measurement": [ "mem_used_percent" - ], - "metrics_collection_interval": 10 + ] }, "netstat": { "measurement": [ "tcp_established", "tcp_time_wait" - ], - "metrics_collection_interval": 60 + ] }, "swap": { "measurement": [ "swap_used_percent" - ], - "metrics_collection_interval": 10 + ] }, "ethtool": { "interface_include": [ @@ -76,20 +65,16 @@ "conntrack_allowance_exceeded", "linklocal_allowance_exceeded" ] - } - } - }, - "logs": { - "logs_collected": { - "files": { - "collect_list": [ - { - "file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log", - "log_group_name": "StatusCode", - "log_stream_name": "agent-1" - } - ] + }, + "nvidia_gpu": { + "measurement": [ + "utilization_gpu", + "utilization_memory", + "power_draw", + "temperature_gpu" + ], + "metrics_collection_interval": 60 } } } -} +} \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.json b/translator/tocwconfig/sampleConfig/complete_linux_config.json index 39130d073a..c2fb70e151 100755 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.json +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.json @@ -5,7 +5,7 @@ "internal": true, "debug": true, "quiet": true, - "aws_sdk_log_level": "LogDebugWithHTTPBody", + "aws_sdk_log_level": "LogDebug", "user_agent": "CUSTOM USER AGENT VALUE", "credentials": { "role_arn": "global_role_arn_value" @@ -14,6 +14,10 @@ "omit_hostname": true }, "metrics": { + "metrics_destinations": { + "cloudwatch": { + } + }, "metrics_collected": { "jmx": [ { @@ -251,8 +255,8 @@ "collect_list": [ { "file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log", - "log_group_name": "/aws/amazon-cloudwatch-agent", - "log_stream_name": "agent-1", + "log_group_name": "amazon-cloudwatch-agent.log", + "log_stream_name": "amazon-cloudwatch-agent.log", "timezone": "UTC", "retention_in_days": 5 }, From c849f6182a7b6007f5d4095d1693df3edc305007 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 15 Nov 2024 16:43:30 -0500 Subject: [PATCH 23/48] previous commit works, just cleaning up debug statemtns --- .../agenthealth/handler/stats/handler.go | 13 ------- .../handler/stats/provider/statuscode.go | 9 ----- plugins/processors/ec2tagger/ec2tagger.go | 39 ------------------- plugins/processors/ec2tagger/factory.go | 9 ++--- .../sampleConfig/advanced_config_linux.json | 2 +- 5 files changed, 4 insertions(+), 68 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index b4d9d32caa..e6d00ece83 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -5,7 +5,6 @@ package stats import ( "context" - "fmt" "log" "net/http" "sync" @@ -73,44 +72,32 @@ func (sh *statsHandler) Position() awsmiddleware.HandlerPosition { func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { operation := awsmiddleware.GetOperationName(ctx) - log.Println("Handling request for operation:", operation) if !sh.filter.IsAllowed(operation) { - log.Println("Operation not allowed:", operation) return } - log.Println("Generating header for operation:", operation) header := sh.Header(operation) - log.Println("This is the header", header) if header != "" { - log.Println("Setting header for operation:", operation) r.Header.Set(headerKeyAgentStats, header) - log.Println("Header set successfully for operation:", operation) } else { log.Println("No header generated for operation:", operation) } } func (sh *statsHandler) Header(operation string) string { - log.Println("Generating header for operation:", operation) stats := &agent.Stats{} for _, p := range sh.providers { - log.Println("Merging stats from provider:", fmt.Sprintf("%T", p)) stats.Merge(p.Stats(operation)) } - log.Println("Stats after merging all providers:", stats) - header, err := stats.Marshal() if err != nil { - log.Println("Failed to serialize agent stats:", err) return "" } - log.Println("Successfully generated header for operation:", operation) return header } diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index d000f62889..0e49e4bb81 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -78,7 +78,6 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response operation = GetShortOperationName(operation) statusCode := r.StatusCode - log.Printf("Received status code: %d for operation: %s", statusCode, operation) h.mu.Lock() defer h.mu.Unlock() @@ -92,11 +91,8 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response h.updateStatusCodeCount(stats, statusCode, operation) h.statsByOperation.Store(operation, stats) - log.Printf("Updated stats for operation '%s': 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) - log.Println("Complete status code map:") h.statsByOperation.Range(func(key, value interface{}) bool { - log.Print("Printing all stats by operations map") operation := key.(string) stats := value.(*[5]int) @@ -110,19 +106,14 @@ func (h *StatusCodeHandler) updateStatusCodeCount(stats *[5]int, statusCode int, switch statusCode { case 200: stats[0]++ - log.Printf("Incremented 200 count for operation: %s. New 200=%d", operation, stats[0]) case 400: stats[1]++ - log.Printf("Incremented 400 count for operation: %s. New 400=%d", operation, stats[1]) case 408: stats[2]++ - log.Printf("Incremented 408 count for operation: %s. New 408=%d", operation, stats[2]) case 413: stats[3]++ - log.Printf("Incremented 413 count for operation: %s. New 413=%d", operation, stats[3]) case 429: stats[4]++ - log.Printf("Incremented 429 count for operation: %s. New 429=%d", operation, stats[4]) default: log.Printf("Received an untracked status code %d for operation: %s", statusCode, operation) } diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 55b6866bff..a6f6e967f7 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -6,7 +6,6 @@ package ec2tagger import ( "context" "hash/fnv" - "log" "os" "sync" "time" @@ -283,24 +282,13 @@ func (t *Tagger) ebsVolumesRetrieved() bool { // Start acts as input validation and serves the purpose of updating ec2 tags and ebs volumes if necessary. // It will be called when OTel is enabling each processor func (t *Tagger) Start(ctx context.Context, host component.Host) error { - t.logger.Info("ec2tagger: Starting the EC2 tagger.") - log.Printf("start function called with host: %s\n", host) - t.shutdownC = make(chan bool) t.ec2TagCache = map[string]string{} - // Derive EC2 Metadata - t.logger.Info("ec2tagger: Deriving EC2 metadata from IMDS.") if err := t.deriveEC2MetadataFromIMDS(ctx); err != nil { - t.logger.Error("ec2tagger: Failed to derive EC2 metadata from IMDS.", zap.Error(err)) return err } - t.logger.Info("ec2tagger: Successfully derived EC2 metadata from IMDS.", - zap.String("instanceId", t.ec2MetadataRespond.instanceId), - zap.String("region", t.ec2MetadataRespond.region)) - // Set up tag filters - t.logger.Info("ec2tagger: Setting up tag filters.") t.tagFilters = []*ec2.Filter{ { Name: aws.String("resource-type"), @@ -314,12 +302,9 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { useAllTags := len(t.EC2InstanceTagKeys) == 1 && t.EC2InstanceTagKeys[0] == "*" if !useAllTags && len(t.EC2InstanceTagKeys) > 0 { - t.logger.Info("ec2tagger: Processing specified EC2InstanceTagKeys.", - zap.Strings("keys", t.EC2InstanceTagKeys)) for i, key := range t.EC2InstanceTagKeys { if cwDimensionASG == key { - t.logger.Info("ec2tagger: Replacing 'AutoScalingGroupName' with the correct EC2 tag name.") t.EC2InstanceTagKeys[i] = Ec2InstanceTagKeyASG } } @@ -329,16 +314,8 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { Values: aws.StringSlice(t.EC2InstanceTagKeys), }) } - log.Print("Outside ec2tagger instance key") - t.logger.Info("Outside ec2tagger instance key - t.logger statement ") if len(t.EC2InstanceTagKeys) > 0 || len(t.EBSDeviceKeys) > 0 { - log.Print("Inside ec2tagger instance key") - - t.logger.Info("ec2tagger: Configuring EC2 API client.", - zap.String("region", t.ec2MetadataRespond.region), - zap.String("roleARN", t.RoleARN)) - ec2CredentialConfig := &configaws.CredentialConfig{ AccessKey: t.AccessKey, SecretKey: t.SecretKey, @@ -351,39 +328,23 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { t.ec2API = t.ec2Provider(ec2CredentialConfig) if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { - t.logger.Info("Inside ec2tagger ec2api logger statement") - log.Print("Inside ec2tagger ec2api - log printf statement") - if t.Config.MiddlewareID == nil { - t.logger.Info("Inside ec2tagger middleware default") - log.Print("Inside ec2tagger ec2api - log printf statement") - TypeStr, _ = component.NewType("agenthealth") defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) t.Config.MiddlewareID = &defaultMiddlewareID - log.Println("ec2tagger: MiddlewareID was nil, initialized to default value.", t.Config.MiddlewareID.Name()) } - - t.logger.Info("ec2tagger: Configuring middleware for EC2 client.", zap.Any("MiddlewareID", t.Config.MiddlewareID)) - log.Print("Inside ec2tagger ec2api - log printf statement") - log.Print(*t.Config.MiddlewareID) awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? } go func() { - t.logger.Info("ec2tagger: Starting initial retrieval of tags and volumes.") t.initialRetrievalOfTagsAndVolumes() - t.logger.Info("ec2tagger: Starting refresh loop to update tags and volumes.") t.refreshLoopToUpdateTagsAndVolumes() }() - t.logger.Info("ec2tagger: EC2 tagger has started initialization.") } else { - t.logger.Info("ec2tagger: No EC2 instance or EBS device keys specified. Skipping tagger initialization.") t.setStarted() } - t.logger.Info("ec2tagger: EC2 tagger has started successfully.") return nil } diff --git a/plugins/processors/ec2tagger/factory.go b/plugins/processors/ec2tagger/factory.go index 1bfa955de7..72b5576b9d 100644 --- a/plugins/processors/ec2tagger/factory.go +++ b/plugins/processors/ec2tagger/factory.go @@ -44,14 +44,11 @@ func createMetricsProcessor( return nil, fmt.Errorf("configuration parsing error") } - // Now passing host to newTagger metricsProcessor := newTagger(processorConfig, set.Logger) - return processorhelper.NewMetricsProcessor( - ctx, set, cfg, nextConsumer, + return processorhelper.NewMetricsProcessor(ctx, set, cfg, nextConsumer, metricsProcessor.processMetrics, processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithStart(metricsProcessor.Start), // Use the Start method of metricsProcessor - processorhelper.WithShutdown(metricsProcessor.Shutdown), - ) + processorhelper.WithStart(metricsProcessor.Start), + processorhelper.WithShutdown(metricsProcessor.Shutdown)) } diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.json b/translator/tocwconfig/sampleConfig/advanced_config_linux.json index ae8b1cef02..87d7d3003c 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.json +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.json @@ -77,4 +77,4 @@ } } } -} \ No newline at end of file +} From bd33dbcca5ad4990fcbab7939e2fb2234e535cd3 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 15 Nov 2024 17:33:12 -0500 Subject: [PATCH 24/48] adding unit tests --- extension/agenthealth/config.go | 7 +- extension/agenthealth/extension_test.go | 2 +- .../agenthealth/handler/stats/agent/agent.go | 5 - .../handler/stats/agent/agent_test.go | 122 ++--- .../agenthealth/handler/stats/handler_test.go | 15 +- .../handler/stats/provider/interval.go | 17 +- .../handler/stats/provider/process_test.go | 5 +- .../handler/stats/provider/statuscode_test.go | 30 ++ internal/tls/testdata/server.crt | 42 +- internal/tls/testdata/server.key | 52 +- internal/tls/testdata/tls-ca.crt | 50 +- .../base_container_insights_config.yaml | 501 +++++++++--------- 12 files changed, 428 insertions(+), 420 deletions(-) create mode 100644 extension/agenthealth/handler/stats/provider/statuscode_test.go diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index 368596fec4..ad326129be 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -10,10 +10,9 @@ import ( ) type Config struct { - IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` - Stats agent.StatsConfig `mapstructure:"stats"` - StatusCode agent.StatusCodeConfig `mapstructure:"status_code"` //not sure if this supposed to be a different name?????? - StatusCodeOnly bool `mapstructure:"is_status_code_only"` + IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` + Stats agent.StatsConfig `mapstructure:"stats"` + StatusCodeOnly bool `mapstructure:"is_status_code_only"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index 504dc8c50e..fa9e42f605 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -20,7 +20,7 @@ func TestExtension(t *testing.T) { assert.NoError(t, extension.Start(ctx, componenttest.NewNopHost())) requestHandlers, responseHandlers := extension.Handlers() // user agent, client stats, stats - assert.Len(t, requestHandlers, 3) + assert.Len(t, requestHandlers, 4) // client stats assert.Len(t, responseHandlers, 1) cfg.IsUsageDataEnabled = false diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index ce234ef94b..85e4d252aa 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -160,11 +160,6 @@ type StatsConfig struct { UsageFlags map[Flag]any `mapstructure:"usage_flags,omitempty"` } -type StatusCodeConfig struct { - // Operations are the allowed operation names to gather stats for. - Operations []string `json:"operations,omitempty"` -} - var StatusCodeOperations = []string{ // all the operations that are allowed "DescribeInstances", "DescribeTags", diff --git a/extension/agenthealth/handler/stats/agent/agent_test.go b/extension/agenthealth/handler/stats/agent/agent_test.go index c379facc19..9ec8177156 100644 --- a/extension/agenthealth/handler/stats/agent/agent_test.go +++ b/extension/agenthealth/handler/stats/agent/agent_test.go @@ -10,105 +10,77 @@ import ( "github.com/stretchr/testify/assert" ) -func TestMerge(t *testing.T) { - stats := &Stats{CpuPercent: aws.Float64(1.2)} - assert.EqualValues(t, 1.2, *stats.CpuPercent) - assert.Nil(t, stats.MemoryBytes) +func TestMergeWithStatusCodes(t *testing.T) { + // Initial stats with some status codes + stats := &Stats{ + StatusCodes: map[string][5]int{ + "operation1": {1, 2, 3, 4, 5}, + }, + } + + // Merge with new stats containing additional status codes stats.Merge(Stats{ - CpuPercent: aws.Float64(1.3), - MemoryBytes: aws.Uint64(123), + StatusCodes: map[string][5]int{ + "operation1": {2, 3, 4, 5, 6}, // Existing operation with new values + "operation2": {0, 1, 2, 3, 4}, // New operation + }, }) - assert.EqualValues(t, 1.3, *stats.CpuPercent) - assert.EqualValues(t, 123, *stats.MemoryBytes) + + // Assert merged values + assert.Equal(t, [5]int{3, 5, 7, 9, 11}, stats.StatusCodes["operation1"]) // Values should sum + assert.Equal(t, [5]int{0, 1, 2, 3, 4}, stats.StatusCodes["operation2"]) // New operation added + + // Merge with empty StatusCodes map stats.Merge(Stats{ - CpuPercent: aws.Float64(1.5), - MemoryBytes: aws.Uint64(133), - FileDescriptorCount: aws.Int32(456), - ThreadCount: aws.Int32(789), - LatencyMillis: aws.Int64(1234), - PayloadBytes: aws.Int(5678), - StatusCode: aws.Int(200), - SharedConfigFallback: aws.Int(1), - ImdsFallbackSucceed: aws.Int(1), - AppSignals: aws.Int(1), - EnhancedContainerInsights: aws.Int(1), - RunningInContainer: aws.Int(0), - RegionType: aws.String("RegionType"), - Mode: aws.String("Mode"), + StatusCodes: nil, }) - assert.EqualValues(t, 1.5, *stats.CpuPercent) - assert.EqualValues(t, 133, *stats.MemoryBytes) - assert.EqualValues(t, 456, *stats.FileDescriptorCount) - assert.EqualValues(t, 789, *stats.ThreadCount) - assert.EqualValues(t, 1234, *stats.LatencyMillis) - assert.EqualValues(t, 5678, *stats.PayloadBytes) - assert.EqualValues(t, 200, *stats.StatusCode) - assert.EqualValues(t, 1, *stats.ImdsFallbackSucceed) - assert.EqualValues(t, 1, *stats.SharedConfigFallback) - assert.EqualValues(t, 1, *stats.AppSignals) - assert.EqualValues(t, 1, *stats.EnhancedContainerInsights) - assert.EqualValues(t, 0, *stats.RunningInContainer) - assert.EqualValues(t, "RegionType", *stats.RegionType) - assert.EqualValues(t, "Mode", *stats.Mode) + + // Assert that StatusCodes remains unchanged + assert.Equal(t, [5]int{3, 5, 7, 9, 11}, stats.StatusCodes["operation1"]) + assert.Equal(t, [5]int{0, 1, 2, 3, 4}, stats.StatusCodes["operation2"]) } -func TestMarshal(t *testing.T) { +func TestMarshalWithStatusCodes(t *testing.T) { testCases := map[string]struct { stats *Stats want string }{ - "WithEmpty": { - stats: &Stats{}, - want: "", - }, - "WithPartial": { + "WithEmptyStatusCodes": { stats: &Stats{ - CpuPercent: aws.Float64(1.2), - MemoryBytes: aws.Uint64(123), - ThreadCount: aws.Int32(789), - PayloadBytes: aws.Int(5678), + StatusCodes: map[string][5]int{}, }, - want: `"cpu":1.2,"mem":123,"th":789,"load":5678`, + want: "", }, - "WithFull": { + "WithStatusCodes": { stats: &Stats{ - CpuPercent: aws.Float64(1.2), - MemoryBytes: aws.Uint64(123), - FileDescriptorCount: aws.Int32(456), - ThreadCount: aws.Int32(789), - LatencyMillis: aws.Int64(1234), - PayloadBytes: aws.Int(5678), - StatusCode: aws.Int(200), - ImdsFallbackSucceed: aws.Int(1), + StatusCodes: map[string][5]int{ + "operation1": {1, 2, 3, 4, 5}, + "operation2": {0, 1, 2, 3, 4}, + }, }, - want: `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"code":200,"ifs":1`, + want: `"codes":{"operation1":[1,2,3,4,5],"operation2":[0,1,2,3,4]}`, }, } for name, testCase := range testCases { t.Run(name, func(t *testing.T) { got, err := testCase.stats.Marshal() assert.NoError(t, err) - assert.Equal(t, testCase.want, got) + assert.Contains(t, got, testCase.want) }) } } -func TestOperationFilter(t *testing.T) { - testCases := map[string]struct { - allowedOperations []string - testOperations []string - want []bool - }{ - "WithNoneAllowed": {allowedOperations: nil, testOperations: []string{"nothing", "is", "allowed"}, want: []bool{false, false, false}}, - "WithSomeAllowed": {allowedOperations: []string{"are"}, testOperations: []string{"some", "are", "allowed"}, want: []bool{false, true, false}}, - "WithAllAllowed": {allowedOperations: []string{"*"}, testOperations: []string{"all", "are", "allowed"}, want: []bool{true, true, true}}, - } - for name, testCase := range testCases { - t.Run(name, func(t *testing.T) { - filter := NewOperationsFilter(testCase.allowedOperations...) - for index, testOperation := range testCase.testOperations { - assert.Equal(t, testCase.want[index], filter.IsAllowed(testOperation)) - } - }) +func TestMergeFullWithStatusCodes(t *testing.T) { + stats := &Stats{ + CpuPercent: aws.Float64(1.0), + StatusCodes: map[string][5]int{"operation1": {1, 0, 0, 0, 0}}, } + stats.Merge(Stats{ + CpuPercent: aws.Float64(2.0), + StatusCodes: map[string][5]int{"operation1": {0, 1, 0, 0, 0}, "operation2": {1, 1, 1, 1, 1}}, + }) + + assert.Equal(t, 2.0, *stats.CpuPercent) + assert.Equal(t, [5]int{1, 1, 0, 0, 0}, stats.StatusCodes["operation1"]) + assert.Equal(t, [5]int{1, 1, 1, 1, 1}, stats.StatusCodes["operation2"]) } diff --git a/extension/agenthealth/handler/stats/handler_test.go b/extension/agenthealth/handler/stats/handler_test.go index f40bebd481..ae0612a10a 100644 --- a/extension/agenthealth/handler/stats/handler_test.go +++ b/extension/agenthealth/handler/stats/handler_test.go @@ -37,9 +37,12 @@ func TestStatsHandler(t *testing.T) { ThreadCount: aws.Int32(789), LatencyMillis: aws.Int64(1234), PayloadBytes: aws.Int(5678), - StatusCode: aws.Int(200), ImdsFallbackSucceed: aws.Int(1), SharedConfigFallback: aws.Int(1), + StatusCodes: map[string][5]int{ + "pmd": {1, 0, 0, 0, 0}, + "di": {0, 1, 0, 0, 0}, + }, } handler := newStatsHandler( zap.NewNop(), @@ -59,15 +62,9 @@ func TestStatsHandler(t *testing.T) { assert.Equal(t, "", req.Header.Get(headerKeyAgentStats)) handler.filter = agent.NewOperationsFilter(agent.AllowAllOperations) handler.HandleRequest(ctx, req) - assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"code":200,"scfb":1,"ifs":1`, req.Header.Get(headerKeyAgentStats)) + assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"scfb":1,"ifs":1,"codes":{"di":[0,1,0,0,0],"pmd":[1,0,0,0,0]}`, req.Header.Get(headerKeyAgentStats)) stats.StatusCode = aws.Int(404) stats.LatencyMillis = nil handler.HandleRequest(ctx, req) - assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"load":5678,"code":404,"scfb":1,"ifs":1`, req.Header.Get(headerKeyAgentStats)) -} - -func TestNewHandlers(t *testing.T) { - requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}) - assert.Len(t, requestHandlers, 2) - assert.Len(t, responseHandlers, 1) + assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"load":5678,"code":404,"scfb":1,"ifs":1,"codes":{"di":[0,1,0,0,0],"pmd":[1,0,0,0,0]}`, req.Header.Get(headerKeyAgentStats)) } diff --git a/extension/agenthealth/handler/stats/provider/interval.go b/extension/agenthealth/handler/stats/provider/interval.go index bc5dc8e24e..d2ac2e57ab 100644 --- a/extension/agenthealth/handler/stats/provider/interval.go +++ b/extension/agenthealth/handler/stats/provider/interval.go @@ -4,6 +4,7 @@ package provider import ( + "log" "sync" "sync/atomic" "time" @@ -39,9 +40,23 @@ func (p *intervalStats) Stats(string) agent.Stats { func (p *intervalStats) getStats() agent.Stats { var stats agent.Stats + + // Load the value from the stats field if value := p.stats.Load(); value != nil { - stats = value.(agent.Stats) + // Perform type assertion safely + if s, ok := value.(agent.Stats); ok { + stats = s + } else { + // Handle the case where the value is not of the expected type + log.Println("Error: Loaded value is not of type agent.Stats") + } + } + + // Ensure that the map is not nil + if stats.StatusCodes == nil { + stats.StatusCodes = make(map[string][5]int) } + return stats } diff --git a/extension/agenthealth/handler/stats/provider/process_test.go b/extension/agenthealth/handler/stats/provider/process_test.go index 19fac625fb..ee31bbb2f8 100644 --- a/extension/agenthealth/handler/stats/provider/process_test.go +++ b/extension/agenthealth/handler/stats/provider/process_test.go @@ -11,8 +11,6 @@ import ( "github.com/shirou/gopsutil/v3/process" "github.com/stretchr/testify/assert" - - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) type mockProcessMetrics struct { @@ -77,6 +75,7 @@ func TestProcessStats(t *testing.T) { mock.mu.Unlock() provider.refresh() assert.Eventually(t, func() bool { - return provider.getStats() == agent.Stats{} + stats := provider.getStats() + return len(stats.StatusCodes) == 0 //map isn't comparable so we can just do this }, 5*time.Millisecond, time.Millisecond) } diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go new file mode 100644 index 0000000000..b5b99c0eaa --- /dev/null +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -0,0 +1,30 @@ +package provider + +import ( + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestStatusCodeHandler(t *testing.T) { + // Create a mock OperationsFilter + filter := agent.NewStatusCodeOperationsFilter() + + // Retrieve the handler with the mock filter + handler := GetStatusCodeStats(filter) + require.NotNil(t, handler) + + handler.statsByOperation.Store("pmd", &[5]int{1, 2, 0, 1, 0}) + + stats := handler.Stats("pmd") + + expected := [5]int{1, 2, 0, 1, 0} + + actualStats := stats.StatusCodes["pmd"] + assert.Equal(t, expected, actualStats, "Unexpected stats values for operation 'pmd'") + + assert.Contains(t, stats.StatusCodes, "pmd", "Status code map should contain 'pmd'") + assert.Equal(t, expected, stats.StatusCodes["pmd"], "Stats for 'pmd' do not match") +} diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..78085fe975 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwd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grqS5LCW4BbUuSULHDTvrN5R/sR4LoQ95kVfQ +ht1M+E+Nl/jT1jt2EpWzIrkoXJ2DIx7kYroKjQ5Xr2JSBe7R67DBsy1M+NMCzg9O +OPsj/SeVysH6o98IRGVB8v9LZ15Co+ztp2tAKn8sY9Wo4mNsbYHIW62jNzn0oOee +eYVg/mBRFD/0pH6fvFzWU4VTMonC1oRNiOJCiZnni/ZeR3QIFuHYoj6GEuCaPEtu +k9/oWm3L7otVvvoU11YxIZuCgX8yYjXonAF+XBDaT7dUza07tn9Luh9+MOOkbB5w +OOtoR1o4Q2BvxVyroNeT2/mbKex7AQwXGfoSAnY7KkBZOQbxQX7hnhR/76904ZNL +q6DGI9HBeN7KwwrObil0RhEJH9/JJ1ugA31ObvtIJxkUAdpJ5oytN9Tmf00rXp5/ +fwX4De9DlqKyaKa+0PglzObv8EaczMrjv2A2/TS7EZblZ2WBqQ3Hpevy2oBKH+4J +WeG8aZep3pTWgwq7D/Z+zgP5ur7ZC7DoRP3rJ2HqRXh7Mrgk3WccAzqFaXE= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..9184b71478 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7XF0qlprVhAS4hz4UlNBzeSVrH0GdlZAfKxUrU -PAsBRtA1vYuhklbDdc5psy0HVTwMj+FM8vPOOP3HmbJpZCHurpNwYkUTU4VHCSpR -SSa6AgSfMuwCQPLN7Xi1rJES4pPtMYp7ZHn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gckOSncwZaz81aOB+JptOouTuR3DtI/xEKgPjhLVGTj24mW2qRJy8/5wdETXk +Dlp2eeWjYBxb0u3gcTOV0lCBSdMCgYEA71d7BmPQr1MKyHoZFTMfRSnqGonfruWr +ALaMDz3pX62Qwsh0rkEI0bCg60I/oXbnz/QUjr1ukJ//GN3ZRDlo2pK52WuyVFLZ +U0Br1PDR7kAA6SjJEnSl4Nq+0vW85BNz/drnXMbWPUGWDKP3NwxTBe3+Oh9IffGW +Puvif3pdEu0CgYEAt8KACs2bn885BuAD66aaSCYc3xUQuvGlQ54balu8bsOXDjHh +zl9vQbMrL0H4WHF7xGQLNX3FlvBuNERdl1K+E0GiIT6v2jTUHKVZqduTqDsv930Y +AUuiCFaralKiEr59TI99AejSkFMy4TwYuLVafvfDE5Ciy3/OgFwrSWQNIEkCgYBS +BT2wy+YJH0EzwLv1yuYtcpa6b4NLUYOPo/9Nfd8LHdTdG4r46GqYSZpr5PEfaTs5 +xaCB5iMMxvfJ0sURH0dymBO+kay0Pwwg/pO1jq2yoxZs0MBPZdAuxWfdrb8EvjHi +zfC5l551sZM1U791ivCsuImF65CRMIhXmcit/QYGZQKBgQDnCTp/M0bq7WQvsE5B +SEuHqNAOLzeE8I83/KxzRiraacioaKYFVzPiEabVhOBARi432Pe+hgl1ysR9qAJd +74N80fg9vQ58920GZ3pbTDmo9xHZ2pouoWhR+OjIYnKcdvjkDsY5K0UzMTYdcLER +g8yfaFM5NveYWl7HPOKpYB+cmA== -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..a81899d32a 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTAyMjIyMzYzOFoXDTM0MTAyMjIyMzYzOFowEj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j2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso -kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto -onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g -XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g -qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= +BBQJ8MOtObDAQTqAg/456ZAkQE0cDjANBgkqhkiG9w0BAQsFAAOCAgEAZxHDqHNZ +9Dq6jJ8lNPRCMyhNk+m6y8p8xdrGey0GJXKecMHzcBARVFCtBViavC67mUxIU6lb +Y+3MISAMBQVTKA/dVaYN6ZZMFzWWulujP+GQLdON+ILNqbNT1ktoCKBtWoJm3HGj +NbqoWtFKZDfzcZwyHek8Wl43doX1d+bj1s8DDR/15tsFTt4j8ux4kBTfyBAZ6a/k +t04WPg97nPOJY3FvULAY2q5IoQuZ/9bJoScPiR4oxi/RuzsL5caZrcXnp6MwFwIh ++0w2G8THFFI84527a9buRXwWoXWFMv2097VBXez1U2v10anXMDcgOq0vbi78f4mH +S/fRc3MPBJ1XRa25Miu/yaG1SJq4FeIZeFZhjRW2G2o8jg0pP//+By1vB6O1aA1F +R40d+CzUKG5pmg7m4KlMhpRe+VKBfaMK0XfU1ToXUiqOanq6pIc1wfxYqyXdhKCF +j5v9QnuB1WD1e0gcvjCq806tT+yGo6DkHeuGE6WlY0F8MxeClrbZyeTCAk+5sJ43 +vE3FsGt+DbqJeLBKLK4qIgK1E9G+eaqe3qFAo18L9gsc+k8u88Kqcw0J829WoZ3q +qfIqjX60oaYE5rkECJLyS8FOkaO9I0eejcaZlNigI2cLn1EYAbDFW93gCOto992b +XadrKpgssBTm6pfgeMzKS+eH8bq5zfotx9s= -----END CERTIFICATE----- diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index 618e81c072..d928ab262d 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -1,255 +1,256 @@ exporters: - awscloudwatchlogs/emf_logs: - certificate_file_path: /etc/test/ca_bundle.pem - emf_only: true - endpoint: https://fake_endpoint - imds_retries: 1 - local_mode: false - log_group_name: emf/logs/default - log_retention: 0 - log_stream_name: host_name_from_env - max_retries: 2 - middleware: agenthealth/logs - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - raw_log: true - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - retry_on_failure: - enabled: true - initial_interval: 5s - max_elapsed_time: 5m0s - max_interval: 30s - multiplier: 1.5 - randomization_factor: 0.5 - role_arn: "" - sending_queue: - enabled: true - num_consumers: 1 - queue_size: 1000 - awsemf/containerinsights: - certificate_file_path: /etc/test/ca_bundle.pem - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" + awscloudwatchlogs/emf_logs: + certificate_file_path: /etc/test/ca_bundle.pem + emf_only: true + endpoint: https://fake_endpoint + imds_retries: 1 + local_mode: false + log_group_name: emf/logs/default + log_retention: 0 + log_stream_name: host_name_from_env + max_retries: 2 + middleware: agenthealth/logs + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + raw_log: true + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + retry_on_failure: + enabled: true + initial_interval: 5s + max_elapsed_time: 5m0s + max_interval: 30s + multiplier: 1.5 + randomization_factor: 0.5 + role_arn: "" + sending_queue: + enabled: true + num_consumers: 1 + queue_size: 1000 + awsemf/containerinsights: + certificate_file_path: /etc/test/ca_bundle.pem + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-east-1 + agenthealth/logs: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-east-1 processors: - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - batch/emf_logs: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + batch/emf_logs: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: true - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - tcplog/emf_logs: - encoding: utf-8 - id: tcp_input - listen_address: 0.0.0.0:25888 - operators: [] - retry_on_failure: - enabled: false - initial_interval: 0s - max_elapsed_time: 0s - max_interval: 0s - type: tcp_input - udplog/emf_logs: - encoding: utf-8 - id: udp_input - listen_address: 0.0.0.0:25888 - multiline: - line_end_pattern: .^ - line_start_pattern: "" - omit_pattern: false - operators: [] - retry_on_failure: - enabled: false - initial_interval: 0s - max_elapsed_time: 0s - max_interval: 0s - type: udp_input + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: true + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + tcplog/emf_logs: + encoding: utf-8 + id: tcp_input + listen_address: 0.0.0.0:25888 + operators: [] + retry_on_failure: + enabled: false + initial_interval: 0s + max_elapsed_time: 0s + max_interval: 0s + type: tcp_input + udplog/emf_logs: + encoding: utf-8 + id: udp_input + listen_address: 0.0.0.0:25888 + multiline: + line_end_pattern: .^ + line_start_pattern: "" + omit_pattern: false + operators: [] + retry_on_failure: + enabled: false + initial_interval: 0s + max_elapsed_time: 0s + max_interval: 0s + type: udp_input service: - extensions: - - agenthealth/logs - - entitystore - pipelines: - logs/emf_logs: - exporters: - - awscloudwatchlogs/emf_logs - processors: - - batch/emf_logs - receivers: - - tcplog/emf_logs - - udplog/emf_logs - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/logs + - entitystore + pipelines: + logs/emf_logs: + exporters: + - awscloudwatchlogs/emf_logs + processors: + - batch/emf_logs + receivers: + - tcplog/emf_logs + - udplog/emf_logs + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} From 822680faa182506e96c18c292dde95e697f9cc4b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 15:48:51 -0500 Subject: [PATCH 25/48] fixing test --- internal/tls/testdata/server.crt | 42 +- internal/tls/testdata/server.key | 52 +- internal/tls/testdata/tls-ca.crt | 50 +- .../sampleConfig/base_appsignals_config.yaml | 1163 +++++++++-------- .../base_container_insights_config.yaml | 501 ++++--- .../otel/pipeline/host/translator.go | 4 +- 6 files changed, 913 insertions(+), 899 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 78085fe975..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQddgi32E7oVLwIASrhGtTLzANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTExNTIyMjE1M1oXDTI0MTExNTIzMjE1 -M1owFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBANtYQZdKnNhTKWrtEhJDGzmsKsC06haQGEBRXg+BOENj7OVK9PLr -cSwhwmCfGNGkB1vVKZ0SkeNiiMCtqWJme4hDgKPWeRA6CeoI1TsKPt/9HRnZWV+8 -rONt/1SMCTnBE/ZZgJkJVtj4m+trNlEWoz2gdgqvqhIPqi1ex1RlKrXHa/Iqk+WR -yRYcazEpLiFOm4PbGB1FaEH/gPTg67z9bgps9u1Kco07o3j92F/Aoy+1ecJsJnYF -43R3u1zMMTpPnSVriG14mgMcduQKbwVX+IbPJkgiFQv01nu403WIt1RyOUq9NSLh -CvbYkyZKtatLX9J+mhSoLc98BxA/MP6JLlcCAwEAAaNnMGUwDgYDVR0PAQH/BAQD +MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS +MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTAyMjIyMzYzNloXDTI0MTAyMjIzMzYz +NlowFTETMBEGA1UEChMKS3ViZXJ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ZNL -q6DGI9HBeN7KwwrObil0RhEJH9/JJ1ugA31ObvtIJxkUAdpJ5oytN9Tmf00rXp5/ -fwX4De9DlqKyaKa+0PglzObv8EaczMrjv2A2/TS7EZblZ2WBqQ3Hpevy2oBKH+4J -WeG8aZep3pTWgwq7D/Z+zgP5ur7ZC7DoRP3rJ2HqRXh7Mrgk3WccAzqFaXE= +FoAUhscCtqKglSlRCx9YNN1D/Xz5MpMwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG +9w0BAQsFAAOCAgEAcxCGmWNtuM9V2yi0SOSLfxlSK7F1OS5qQuLWkZSDB1f+XG82 +PNDwSrV4J42qZcFfKrEt1HtS/Ws6VRlLrSnYArNSyQvNTeNf0q/rX9yO8wRcCM5K +sb8uv27xdawjN6F3z59rpJOf9ldX4ASrRZHzX/ttvvNcUdbCZsF5+h2EhcwNVVUa +Q6vlAW8u4Ik9HXxJ+W2HEdlSYWcCdTK4hDCtJhwqEBua1VdKwSdrlDZJPswAdCzv +CR3Fj4NsmPRDw8uCPIL4hwk5fbffcn3rZrsOXSMTKxvdyP+XBPKWEoIs6cxvdE3o +sG65EZeGpj0vLN+rLEbumkvgCAHACgVxvyDeJnajoA6lPNxfzby+9CmhLZfgaVbE +nVQTj8hkUW1gtvnAP3v1Zbe3QMhlqWqwfwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 9184b71478..0efcb40bb3 100644 --- a/internal/tls/testdata/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NSLdKkR9G2WEI4OsEw0qGm9pZXzS6lKOSXxW6fOzwI0/vhnmT4O +hBxeR+PriPFqD80ASXeVeVOEjMXQEjZ8Po+FfUvVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index a81899d32a..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTExNTIyMjE1NloXDTM0MTExNTIyMjE1NlowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKE02JUhofLV -qg7y+e9SHvXJE3VJZPGlOQb/bdwpA9IThlillTH1GRQW6xyohNBARBVPr+u6d2TQ -yIyl54he8iLppNR/DKMJH6ufqnl8scKbRAxYWgEC0/LJBgXrTxtewpPaH9lZrSae -VUOmzdDCRWmvGqfymBwsziUqPFuyhxXXM38SBPwZzf9vq0ma3fbg/k0iU7chF9Zy -Cyw4r0iQUiAqvMEcwZw3l3JYywk38GJfpLplqSDaf3/2GawRgFdL7VNNwXita+je -UL29di1OfkMspAcE4ANPeglvKHPStjcCHDK/+Hpqj+hq4tQLMyUYm4lDN9R4gzGt -cnEGaVjVhD2auaCHzilOlh9hb0bQoY0v3htjwRtiGwJFt6aWPMq57eTAfHuVdNyv -mOq3Pib7d+e6Q6jZKjXeFVn7IR5f4Sb8t3sBSbBqhZAJON+98WBVyUzav8/yurkw -8JlGxPiOoszmaB4t73gr4A3b0JROoUCeDD8NItf+ULSnF9+a2CIMphlRye8XrOKW -gIaX38vYryTnxTV3Vj/VzIN8X8iSG0SgC7yQ3IWqSSa0pMRvxn70yTcOuokUJF3+ -1RGy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/+w5zKpOD +nXPKVf9mOPNdIDUBpzWxRXwkE1GI8kFjQsuiBD0RGNj1Db/m9lnxOX2B1vKOHRtg +Q3LQURMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml index 24afc038e6..36f817297d 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml @@ -15,73 +15,74 @@ exporters: max_retries: 2 metric_declarations: - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service + - - Environment + - Operation + - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - [ Environment, Service ] + - - Environment + - Service label_matchers: - label_names: - Telemetry.Source - regex: '^RuntimeMetric$' + regex: ^RuntimeMetric$ separator: ; metric_name_selectors: - - '^.*$' + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -135,6 +136,7 @@ exporters: verbosity: Detailed extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -143,6 +145,7 @@ extensions: mode: OP region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -175,857 +178,869 @@ processors: resolvers: - name: "" platform: generic - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - write_buffer_size: 0 metricstransform/application_signals: transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization + - action: update aggregation_type: "" - submatch_case: "" + include: jvm.cpu.recent_utilization match_type: "" + new_name: JVMCpuRecentUtilization operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time match_type: "" + new_name: JVMCpuTime operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded match_type: "" + new_name: JVMClassLoaded operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count match_type: "" + new_name: JVMThreadCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used match_type: "" + new_name: JVMMemoryNonHeapUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc match_type: "" + new_name: JVMMemoryUsedAfterLastGC operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used match_type: "" + new_name: JVMMemoryHeapUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: { "name": '.*Old\\sGen$' } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Survivor\\sSpace$' } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Eden\\sSpace$' } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: { "type": "vms" } - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: { "type": "rss" } - match_type: regexp - aggregation_type: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed operations: - action: aggregate_labels - label_set: [ ] aggregation_type: sum experimental_scale: 0 label: "" - new_label: "" + label_set: [] label_value: "" + new_label: "" new_value: "" - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric aggregation_type: "" experimental_scale: 0 label: "" label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + write_buffer_size: 0 receivers: otlp/application_signals: protocols: @@ -1089,4 +1104,4 @@ service: metrics: address: "" level: None - traces: {} + traces: {} \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index d928ab262d..618e81c072 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -1,256 +1,255 @@ exporters: - awscloudwatchlogs/emf_logs: - certificate_file_path: /etc/test/ca_bundle.pem - emf_only: true - endpoint: https://fake_endpoint - imds_retries: 1 - local_mode: false - log_group_name: emf/logs/default - log_retention: 0 - log_stream_name: host_name_from_env - max_retries: 2 - middleware: agenthealth/logs - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - raw_log: true - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - retry_on_failure: - enabled: true - initial_interval: 5s - max_elapsed_time: 5m0s - max_interval: 30s - multiplier: 1.5 - randomization_factor: 0.5 - role_arn: "" - sending_queue: - enabled: true - num_consumers: 1 - queue_size: 1000 - awsemf/containerinsights: - certificate_file_path: /etc/test/ca_bundle.pem - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" + awscloudwatchlogs/emf_logs: + certificate_file_path: /etc/test/ca_bundle.pem + emf_only: true + endpoint: https://fake_endpoint + imds_retries: 1 + local_mode: false + log_group_name: emf/logs/default + log_retention: 0 + log_stream_name: host_name_from_env + max_retries: 2 + middleware: agenthealth/logs + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + raw_log: true + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + retry_on_failure: + enabled: true + initial_interval: 5s + max_elapsed_time: 5m0s + max_interval: 30s + multiplier: 1.5 + randomization_factor: 0.5 + role_arn: "" + sending_queue: + enabled: true + num_consumers: 1 + queue_size: 1000 + awsemf/containerinsights: + certificate_file_path: /etc/test/ca_bundle.pem + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" extensions: - agenthealth/logs: - is_status_code_only: false - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-east-1 + agenthealth/logs: + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-east-1 processors: - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - batch/emf_logs: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + batch/emf_logs: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: true - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - tcplog/emf_logs: - encoding: utf-8 - id: tcp_input - listen_address: 0.0.0.0:25888 - operators: [] - retry_on_failure: - enabled: false - initial_interval: 0s - max_elapsed_time: 0s - max_interval: 0s - type: tcp_input - udplog/emf_logs: - encoding: utf-8 - id: udp_input - listen_address: 0.0.0.0:25888 - multiline: - line_end_pattern: .^ - line_start_pattern: "" - omit_pattern: false - operators: [] - retry_on_failure: - enabled: false - initial_interval: 0s - max_elapsed_time: 0s - max_interval: 0s - type: udp_input + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: true + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + tcplog/emf_logs: + encoding: utf-8 + id: tcp_input + listen_address: 0.0.0.0:25888 + operators: [] + retry_on_failure: + enabled: false + initial_interval: 0s + max_elapsed_time: 0s + max_interval: 0s + type: tcp_input + udplog/emf_logs: + encoding: utf-8 + id: udp_input + listen_address: 0.0.0.0:25888 + multiline: + line_end_pattern: .^ + line_start_pattern: "" + omit_pattern: false + operators: [] + retry_on_failure: + enabled: false + initial_interval: 0s + max_elapsed_time: 0s + max_interval: 0s + type: udp_input service: - extensions: - - agenthealth/logs - - entitystore - pipelines: - logs/emf_logs: - exporters: - - awscloudwatchlogs/emf_logs - processors: - - batch/emf_logs - receivers: - - tcplog/emf_logs - - udplog/emf_logs - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/logs + - entitystore + pipelines: + logs/emf_logs: + exporters: + - awscloudwatchlogs/emf_logs + processors: + - batch/emf_logs + receivers: + - tcplog/emf_logs + - udplog/emf_logs + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/translate/otel/pipeline/host/translator.go b/translator/translate/otel/pipeline/host/translator.go index 796662806a..17793b23da 100644 --- a/translator/translate/otel/pipeline/host/translator.go +++ b/translator/translate/otel/pipeline/host/translator.go @@ -104,7 +104,7 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, switch t.Destination() { case common.DefaultDestination, common.CloudWatchKey: translators.Exporters.Set(awscloudwatch.NewTranslator()) - translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{"*"})) + translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{agenthealth.OperationPutMetricData})) case common.AMPKey: if conf.IsSet(common.MetricsAggregationDimensionsKey) { translators.Processors.Set(rollupprocessor.NewTranslator()) @@ -115,7 +115,7 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, case common.CloudWatchLogsKey: translators.Processors.Set(batchprocessor.NewTranslatorWithNameAndSection(t.name, common.LogsKey)) translators.Exporters.Set(awsemf.NewTranslator()) - translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeLogs, []string{"*"})) + translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeLogs, []string{agenthealth.OperationPutLogEvents})) default: return nil, fmt.Errorf("pipeline (%s) does not support destination (%s) in configuration", t.name, t.Destination()) } From d547e1cbd8bf85ef85605fc56b9da1f1ac26bb51 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 16:37:36 -0500 Subject: [PATCH 26/48] fixing unit tests --- internal/tls/testdata/server.crt | 44 +- internal/tls/testdata/server.key | 52 +- internal/tls/testdata/tls-ca.crt | 50 +- .../sampleConfig/advanced_config_darwin.yaml | 5 +- .../sampleConfig/advanced_config_linux.yaml | 9 +- .../sampleConfig/advanced_config_windows.yaml | 5 +- .../sampleConfig/amp_config_linux.yaml | 327 +-- .../appsignals_and_ecs_config.yaml | 1394 ++++----- .../appsignals_and_eks_config.yaml | 1163 ++++---- .../appsignals_and_k8s_config.yaml | 1167 ++++---- .../appsignals_fallback_and_eks_config.yaml | 2591 +++++++++-------- .../appsignals_over_fallback_config.yaml | 2591 +++++++++-------- .../sampleConfig/base_appsignals_config.yaml | 896 +++--- .../base_appsignals_fallback_config.yaml | 2177 +++++++------- .../base_container_insights_config.yaml | 5 +- .../sampleConfig/basic_config_linux.yaml | 3 +- .../sampleConfig/basic_config_windows.yaml | 5 +- .../sampleConfig/collectd_config_linux.yaml | 3 +- .../sampleConfig/compass_linux_config.yaml | 5 +- .../sampleConfig/complete_darwin_config.yaml | 27 +- .../sampleConfig/complete_linux_config.yaml | 39 +- .../sampleConfig/config_with_env.yaml | 1 + .../sampleConfig/container_insights_jmx.yaml | 5 +- .../sampleConfig/delta_config_linux.yaml | 15 +- .../sampleConfig/delta_net_config_linux.yaml | 5 +- .../sampleConfig/drop_origin_linux.yaml | 11 +- .../emf_and_kubernetes_config.yaml | 3 +- .../emf_and_kubernetes_with_gpu_config.yaml | 187 +- .../ignore_append_dimensions.yaml | 3 +- .../sampleConfig/invalid_input_linux.yaml | 1 + .../sampleConfig/jmx_config_linux.yaml | 13 +- .../sampleConfig/jmx_eks_config_linux.yaml | 7 +- .../kubernetes_on_prem_config.yaml | 5 +- .../sampleConfig/log_ecs_metric_only.yaml | 1 + .../tocwconfig/sampleConfig/log_filter.yaml | 64 +- .../sampleConfig/log_only_config_windows.yaml | 64 +- .../logs_and_kubernetes_config.yaml | 6 +- .../sampleConfig/no_skip_log_timestamp.yaml | 64 +- .../no_skip_log_timestamp_windows.yaml | 64 +- .../otlp_metrics_cloudwatchlogs_config.yaml | 243 +- .../sampleConfig/otlp_metrics_config.yaml | 211 +- .../procstat_memory_swap_config.yaml | 115 +- .../sampleConfig/prometheus_config_linux.yaml | 1 + .../prometheus_config_windows.yaml | 1 + .../sampleConfig/skip_log_timestamp.yaml | 64 +- .../skip_log_timestamp_default.yaml | 64 +- .../skip_log_timestamp_default_windows.yaml | 64 +- .../skip_log_timestamp_windows.yaml | 64 +- .../sampleConfig/standard_config_linux.yaml | 5 +- ...ndard_config_linux_with_common_config.yaml | 5 +- .../sampleConfig/standard_config_windows.yaml | 3 +- ...ard_config_windows_with_common_config.yaml | 7 +- .../sampleConfig/statsd_config_linux.yaml | 3 +- .../sampleConfig/statsd_config_windows.yaml | 3 +- .../sampleConfig/statsd_ecs_config.yaml | 93 +- .../sampleConfig/statsd_eks_config.yaml | 115 +- .../sampleConfig/trace_config_linux.yaml | 1 + .../sampleConfig/trace_config_windows.yaml | 1 + .../windows_eventlog_only_config.yaml | 18 +- translator/tocwconfig/tocwconfig_test.go | 3 +- 60 files changed, 7141 insertions(+), 7020 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..ea76fdfd7b 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCg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I +hvcNAQELBQADggIBAALYTNCcFEJnSIUL81+Fxb0U9KgdNwhJfou5WTgRSFqLwuJf +hYfzSHCZYQbANb93o7jsa0cj2Wqj8jL+UEhGLLXg6jLUGdG93WoVCtO2FchwWoay +6trRPJ0aHzfhKLZzU4cVp649iygbs5RFNbjMz+ehpC2FOizjA+2zysPchJ9xYCUl +0vYnm6XlzPegIQPNpdZNYHsOWVgeNgWjAcMVoenpBbqhYIEypZ3WnNqRxxrUwCLF +zB+TopgTnhmvMs3AtGzpZiqOdWxOQE7YMH6WDZFGGZ0B/I8dcDJiVhcd9EA+09F4 +ubX4CW0BCA92m9P7XgeE3oZouZztHSp64oaeasskucV8yOl2LhlofCoMKgMo2cgp +XscMQL15+I+RNtTRNB/eoGiIfjHJgTxWkYmfHT1zJrKAPUrVYLzybrTuquKNkpOm +m+1+x5hux/CXXXFxkr0QIl8IeL4Ca1ibTuHrTYNunMq1d0gL5WsRerg2MMXdY2MW ++Yubjna8tpNeFjaxmdb9+p9rVDdPfyttrLXq3ZTbams+43O00l3NDiVGZFRQzLF7 +GoqyHDOuUPY/0vGQAveDA0MsPlgp0vSehl2WnwNFoYiLJpF/Ls7Kfki1FGNsWCBL +lNkxboFTrq7LmvUHUD7ohYhtVC6/kyy/9+lb+KrzPOWKtvI5qckAwqX6Z7uK -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..3673072582 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7X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XAy1nUryFvjA3ASSgzxPFSull8Wlmi7tbS8iAnqyoQKBgQDj8U9gfzkOsSoQN4fe +FU4Ei4uk93KGQe32w1mEa674y128LUHeqrPwUotrNsuppbbM1mArc3GiKJEfww2H +xvR4bOGVBcOm/P+rtJMqlyZhGAd1i5HsMsuCHlovq47Pg/wdtTEnfnkNhe925JTr +3IpR69cymS+Q3OkJCrMLxxS+sQKBgQD+wcG/RbmGa1hUkLKPLL3jpDgZoSTvkajm +YXK8xLAwmU62pVnOuVNtPET3QwOg/YgeVx1h8lVV6ASRscdZpS4IcTIlxD6/MfQq +tv448kzET5CKRAEbv4nufc6Gs1Hdlb6V9PwG70gGdenKpc04lFIIFtie5S+MIdXO +D3jR3VrrgwKBgQDV/fd9KjMQvfY1X0yoi+vAjJk++CeGL2MN5PunO8j6PUH0pbBP +MIbZOUU2FC1DSRXCXAfRAwJNMDR+UwnizD86x01IMC8sGByWwGHg/CHFyV9HVQ5b +ZpxzvbcBRdg+rTQFV9ObtjpDHdhgD9xXSaZ5niVblUB4iUwlduv8RJwPIQKBgDow +FUnT6ik6sYU3O6GaLZEmPC4WcXJKydI9JdDZ+AhRq/np0JZ4HAcSQgpcAyMtZX7Q +lQR/LmCdyxVgDtF5+gaxnCumJFLVXRi4jV6CcWhRaAk8uSgWWrHfiGGZ6bP79PkZ +aMtIsiHPouPHdRVcQ1RXq4i3fmG6hLQ5MnZ04cRzAoGAJfOfYNOvI0LGZmjd5VtZ +S7ptY0NOeDSD9w9qvtCewstRaSMZCW+L4FcuNMJ/o9aa5qcNewq4NwT0RTXGjCzD +W5z8A3L5WNp7TR2wXrFy8+xU6fiIFYOFKY86eixHC7+PyueDT7140wRKBU5+7Uti +T8X9YtJowPDgRhh/SHWvkq8= -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..1c22e4a6c1 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @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5aisr +YWRaXIXWgSe1aNDlV+nLo9t/Hv6tcGUSnpdRSy4X8lBMw1DDLp4NwCcrDmNAE6hX +cIo7pbgTZEBHHpzcKB+3sKb5Q0J4f7SqPyk= -----END CERTIFICATE----- diff --git a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml index 64d81aaa17..d5fa199e7c 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -80,11 +81,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_disk + - telegraf_mem - telegraf_netstat - telegraf_swap - telegraf_cpu - - telegraf_mem + - telegraf_disk metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml index b202e49fd9..addecabd25 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict @@ -88,13 +89,13 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_cpu - - telegraf_disk - - telegraf_mem - telegraf_netstat - telegraf_swap - telegraf_ethtool - telegraf_nvidia_smi + - telegraf_cpu + - telegraf_disk + - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml index 0b7068462e..35ccae8ff9 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -28,9 +29,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -81,13 +82,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/2073218482 - telegraf_win_perf_counters/2039663244 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - - telegraf_win_perf_counters/2073218482 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml index d32905f7ca..f17a3e72cc 100644 --- a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml @@ -1,168 +1,169 @@ exporters: - awscloudwatch: - drop_original_metrics: - CPU_USAGE_IDLE: true - cpu_time_active: true - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true - rollup_dimensions: - - - ImageId - - - InstanceId - - InstanceType - - - d1 - - [ ] - prometheusremotewrite/amp: - add_metric_suffixes: true - auth: - authenticator: sigv4auth - compression: "" - disable_keep_alives: false - endpoint: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-12345/api/v1/remote_write - export_created_metric: - enabled: false - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - max_batch_size_bytes: 3000000 - namespace: "" - proxy_url: "" - read_buffer_size: 0 - remote_write_queue: - enabled: true - num_consumers: 5 - queue_size: 10000 - resource_to_telemetry_conversion: - clear_after_copy: true - enabled: true - retry_on_failure: - enabled: true - initial_interval: 50ms - randomization_factor: 0.5 - multiplier: 1.5 - max_interval: 30s - max_elapsed_time: 5m0s - send_metadata: false - target_info: - enabled: true - timeout: 5s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - write_buffer_size: 524288 + awscloudwatch: + drop_original_metrics: + CPU_USAGE_IDLE: true + cpu_time_active: true + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true + rollup_dimensions: + - - ImageId + - - InstanceId + - InstanceType + - - d1 + - [] + prometheusremotewrite/amp: + add_metric_suffixes: true + auth: + authenticator: sigv4auth + compression: "" + disable_keep_alives: false + endpoint: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-12345/api/v1/remote_write + export_created_metric: + enabled: false + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + max_batch_size_bytes: 3000000 + namespace: "" + proxy_url: "" + read_buffer_size: 0 + remote_write_queue: + enabled: true + num_consumers: 5 + queue_size: 10000 + resource_to_telemetry_conversion: + clear_after_copy: true + enabled: true + retry_on_failure: + enabled: true + initial_interval: 50ms + max_elapsed_time: 5m0s + max_interval: 30s + multiplier: 1.5 + randomization_factor: 0.5 + send_metadata: false + target_info: + enabled: true + timeout: 5s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + write_buffer_size: 524288 extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 - sigv4auth: - assume_role: - sts_region: us-west-2 - region: us-west-2 + agenthealth/metrics: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - '*' + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 + sigv4auth: + assume_role: + sts_region: us-west-2 + region: us-west-2 processors: - awsentity/resource: - entity_type: Resource - platform: ec2 - batch/host/amp: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 1m0s - ec2tagger: - ec2_instance_tag_keys: - - AutoScalingGroupName - ec2_metadata_tags: - - InstanceType - - ImageId - - InstanceId - imds_retries: 1 - refresh_interval_seconds: 0s - rollup: - attribute_groups: - - - ImageId - - - InstanceId - - InstanceType - - - d1 - - [ ] - cache_size: 1000 - drop_original: - - CPU_USAGE_IDLE - - cpu_time_active - transform: - error_mode: propagate - flatten_data: false - log_statements: [ ] - metric_statements: - - context: metric - statements: - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" - trace_statements: [ ] + awsentity/resource: + entity_type: Resource + platform: ec2 + batch/host/amp: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 1m0s + ec2tagger: + ec2_instance_tag_keys: + - AutoScalingGroupName + ec2_metadata_tags: + - InstanceId + - InstanceType + - ImageId + imds_retries: 1 + refresh_interval_seconds: 0s + rollup: + attribute_groups: + - - ImageId + - - InstanceId + - InstanceType + - - d1 + - [] + cache_size: 1000 + drop_original: + - CPU_USAGE_IDLE + - cpu_time_active + transform: + error_mode: propagate + flatten_data: false + log_statements: [] + metric_statements: + - context: metric + statements: + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" + trace_statements: [] receivers: - telegraf_cpu: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_cpu: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - sigv4auth - - entitystore - pipelines: - metrics/host/cloudwatch: - exporters: - - awscloudwatch - processors: - - awsentity/resource - - ec2tagger - - transform - receivers: - - telegraf_cpu - metrics/host/amp: - exporters: - - prometheusremotewrite/amp - processors: - - ec2tagger - - transform - - rollup - - batch/host/amp - receivers: - - telegraf_cpu - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } + extensions: + - agenthealth/metrics + - sigv4auth + - entitystore + pipelines: + metrics/host/amp: + exporters: + - prometheusremotewrite/amp + processors: + - ec2tagger + - transform + - rollup + - batch/host/amp + receivers: + - telegraf_cpu + metrics/host/cloudwatch: + exporters: + - awscloudwatch + processors: + - awsentity/resource + - ec2tagger + - transform + receivers: + - telegraf_cpu + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml index a97027c87f..8e083a6072 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml @@ -1,106 +1,106 @@ exporters: awsemf/application_signals: - certificate_file_path: '' + certificate_file_path: "" detailed_metrics: false dimension_rollup_option: NoDimensionRollup disable_metric_extraction: false eks_fargate_container_insights_enabled: false - endpoint: 'https://fake_endpoint' + endpoint: https://fake_endpoint enhanced_container_insights: false imds_retries: 1 local_mode: false log_group_name: /aws/application-signals/data log_retention: 0 - log_stream_name: '' + log_stream_name: "" max_retries: 2 metric_declarations: - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service + - - Environment + - Operation + - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; metric_name_selectors: - - ^.*$ + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false num_workers: 8 output_destination: cloudwatch - profile: '' - proxy_address: '' + profile: "" + proxy_address: "" region: us-east-1 request_timeout_seconds: 30 - resource_arn: '' + resource_arn: "" resource_to_telemetry_conversion: enabled: false retain_initial_value_of_delta_metric: false - role_arn: '' - version: '1' + role_arn: "" + version: "1" awsxray/application_signals: - certificate_file_path: '' - endpoint: '' + certificate_file_path: "" + endpoint: "" imds_retries: 1 index_all_attributes: false indexed_attributes: @@ -117,17 +117,18 @@ exporters: middleware: agenthealth/traces no_verify_ssl: false num_workers: 8 - profile: '' - proxy_address: '' + profile: "" + proxy_address: "" region: us-east-1 request_timeout_seconds: 30 - resource_arn: '' - role_arn: '' + resource_arn: "" + role_arn: "" telemetry: enabled: true include_metadata: true extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -136,6 +137,7 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -144,18 +146,18 @@ extensions: mode: EC2 region_type: ACJ awsproxy/application_signals: - aws_endpoint: '' + aws_endpoint: "" + certificate_file_path: "" dialer: timeout: 0s - certificate_file_path: '' - endpoint: '0.0.0.0:2000' + endpoint: 0.0.0.0:2000 imds_retries: 1 local_mode: false - profile: '' - proxy_address: '' + profile: "" + proxy_address: "" region: us-east-1 - service_name: '' - role_arn: '' + role_arn: "" + service_name: "" processors: awsapplicationsignals: limiter: @@ -165,8 +167,584 @@ processors: log_dropped_metrics: true rotation_interval: 10m0s resolvers: - - name: '' + - name: "" platform: ecs + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" resourcedetection: aks: resource_attributes: @@ -199,11 +777,11 @@ processors: host.name: enabled: true tags: [] - compression: '' + compression: "" consul: - address: '' - datacenter: '' - namespace: '' + address: "" + datacenter: "" + namespace: "" resource_attributes: cloud.region: enabled: true @@ -211,7 +789,7 @@ processors: enabled: true host.name: enabled: true - token_file: '' + token_file: "" detectors: - env - ecs @@ -244,7 +822,7 @@ processors: host.type: enabled: true tags: - - '^aws:autoscaling:groupName' + - ^aws:autoscaling:groupName ecs: resource_attributes: aws.ecs.cluster.arn: @@ -255,10 +833,10 @@ processors: enabled: false aws.ecs.task.family: enabled: false - aws.ecs.task.revision: - enabled: false aws.ecs.task.id: enabled: false + aws.ecs.task.revision: + enabled: false aws.log.group.arns: enabled: false aws.log.group.names: @@ -297,7 +875,7 @@ processors: enabled: true service.version: enabled: true - endpoint: '' + endpoint: "" gcp: resource_attributes: cloud.account.id: @@ -357,9 +935,9 @@ processors: idle_conn_timeout: 1m30s k8snode: auth_type: serviceAccount - context: '' - kube_config_path: '' - node_from_env_var: '' + context: "" + kube_config_path: "" + node_from_env_var: "" resource_attributes: k8s.node.name: enabled: true @@ -387,7 +965,7 @@ processors: enabled: true max_idle_conns: 100 openshift: - address: '' + address: "" resource_attributes: cloud.platform: enabled: true @@ -398,19 +976,19 @@ processors: k8s.cluster.name: enabled: true tls: - ca_file: '' - cert_file: '' + ca_file: "" + cert_file: "" include_system_ca_certs_pool: false insecure: false insecure_skip_verify: false - key_file: '' - max_version: '' - min_version: '' + key_file: "" + max_version: "" + min_version: "" reload_interval: 0s - server_name_override: '' - token: '' + server_name_override: "" + token: "" override: true - proxy_url: '' + proxy_url: "" read_buffer_size: 0 system: resource_attributes: @@ -442,631 +1020,55 @@ processors: enabled: true timeout: 2s tls: - ca_file: '' - cert_file: '' + ca_file: "" + cert_file: "" include_system_ca_certs_pool: false insecure: false insecure_skip_verify: false - key_file: '' - max_version: '' - min_version: '' + key_file: "" + max_version: "" + min_version: "" reload_interval: 0s - server_name_override: '' + server_name_override: "" write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: '' - submatch_case: '' - match_type: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: - name: .*Old\\sGen$ - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: - name: .*Survivor\\sSpace$ - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: - name: .*Eden\\sSpace$ - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: '' - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: '' - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: - name: G1 Old Generation - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: - name: G1 Young Generation - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: - name: G1 Old Generation - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: - name: G1 Young Generation - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: - count: '0' - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: - count: '1' - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: - count: '2' - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: - type: vms - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: - type: rss - match_type: regexp - aggregation_type: '' - submatch_case: '' - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: '' - new_label: '' - label_value: '' - new_value: '' - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: '' - experimental_scale: 0 - label: '' - label_value: '' receivers: otlp/application_signals: protocols: grpc: - endpoint: '0.0.0.0:4315' dialer: timeout: 0s + endpoint: 0.0.0.0:4315 include_metadata: false max_concurrent_streams: 0 max_recv_msg_size_mib: 0 read_buffer_size: 524288 tls: - ca_file: '' + ca_file: "" cert_file: path/to/cert.crt - client_ca_file: '' + client_ca_file: "" client_ca_file_reload: false include_system_ca_certs_pool: false key_file: path/to/key.key - max_version: '' - min_version: '' + max_version: "" + min_version: "" reload_interval: 0s transport: tcp write_buffer_size: 0 http: - endpoint: '0.0.0.0:4316' + endpoint: 0.0.0.0:4316 include_metadata: false logs_url_path: /v1/logs max_request_body_size: 0 metrics_url_path: /v1/metrics tls: - ca_file: '' + ca_file: "" cert_file: path/to/cert.crt - client_ca_file: '' + client_ca_file: "" client_ca_file_reload: false include_system_ca_certs_pool: false key_file: path/to/key.key - max_version: '' - min_version: '' + max_version: "" + min_version: "" reload_interval: 0s traces_url_path: /v1/traces service: @@ -1105,6 +1107,6 @@ service: thereafter: 500 tick: 10s metrics: - address: '' + address: "" level: None traces: {} diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml index 1d71ffb03b..609149736b 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml @@ -104,14 +104,15 @@ exporters: - Fault - Error - dimensions: - - [ Environment, Service ] + - - Environment + - Service label_matchers: - label_names: - Telemetry.Source - regex: '^RuntimeMetric$' + regex: ^RuntimeMetric$ separator: ; metric_name_selectors: - - '^.*$' + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -266,6 +267,7 @@ exporters: include_metadata: true extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -274,6 +276,7 @@ extensions: mode: EKS region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -295,14 +298,14 @@ extensions: role_arn: "" service_name: "" entitystore: - mode: ec2 - region: us-east-1 - kubernetes_mode: EKS + kubernetes_mode: EKS + mode: ec2 + region: us-east-1 server: - listen_addr: :4311 - tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" - tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" - tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" + listen_addr: :4311 + tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt + tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt + tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key processors: awsapplicationsignals: limiter: @@ -324,6 +327,582 @@ processors: send_batch_max_size: 0 send_batch_size: 8192 timeout: 5s + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" resourcedetection: aks: resource_attributes: @@ -611,570 +1190,6 @@ processors: reload_interval: 0s server_name_override: "" write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: {"name": '.*Old\\sGen$'} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: {"name": '.*Survivor\\sSpace$'} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: {"name": '.*Eden\\sSpace$'} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: {"name": "G1 Old Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: {"name": "G1 Young Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: {"name": "G1 Old Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: {"name": "G1 Young Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: {"type": "vms"} - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: {"type": "rss"} - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" receivers: awscontainerinsightreceiver: accelerated_compute_metrics: false diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml index 5b099d0315..e82573525c 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml @@ -104,14 +104,15 @@ exporters: - Fault - Error - dimensions: - - [ Environment, Service ] + - - Environment + - Service label_matchers: - label_names: - Telemetry.Source - regex: '^RuntimeMetric$' + regex: ^RuntimeMetric$ separator: ; metric_name_selectors: - - '^.*$' + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -267,6 +268,7 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -275,6 +277,7 @@ extensions: mode: K8E region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -296,14 +299,14 @@ extensions: role_arn: "" service_name: "" entitystore: - mode: ec2 - region: us-east-1 - kubernetes_mode: K8sEC2 + kubernetes_mode: K8sEC2 + mode: ec2 + region: us-east-1 server: - listen_addr: :4311 - tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" - tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" - tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" + listen_addr: :4311 + tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt + tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt + tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key processors: awsapplicationsignals: limiter: @@ -313,8 +316,8 @@ processors: log_dropped_metrics: true rotation_interval: 10m0s resolvers: - - name: TestCluster - platform: k8s + - name: TestCluster + platform: k8s awsentity/service/application_signals: cluster_name: TestCluster entity_type: Service @@ -325,6 +328,582 @@ processors: send_batch_max_size: 0 send_batch_size: 8192 timeout: 5s + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" resourcedetection: aks: resource_attributes: @@ -612,570 +1191,6 @@ processors: reload_interval: 0s server_name_override: "" write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: { "name": '.*Old\\sGen$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Survivor\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Eden\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: { "type": "vms" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: { "type": "rss" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" receivers: awscontainerinsightreceiver: accelerated_compute_metrics: false diff --git a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml index bfcea74610..609149736b 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml @@ -1,1294 +1,1309 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - [ Environment, Service ] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^RuntimeMetric$' - separator: ; - metric_name_selectors: - - '^.*$' - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "1" - awsemf/containerinsights: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" - awsxray/application_signals: - certificate_file_path: "" - endpoint: "" - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: false - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; + metric_name_selectors: + - ^.*$ + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "1" + awsemf/containerinsights: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" + awsxray/application_signals: + certificate_file_path: "" + endpoint: "" + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: false + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EKS - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: EKS - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: "" - certificate_file_path: "" - dialer: - timeout: "0s" - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: false - profile: "" - proxy_address: "" - region: us-east-1 - service_name: "" - role_arn: "" - entitystore: - mode: ec2 - region: us-east-1 - kubernetes_mode: EKS - server: - listen_addr: :4311 - tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" - tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" - tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" -processors: - awsapplicationsignals: - limiter: - disabled: false - drop_threshold: 500 - garbage_collection_interval: 10m0s - log_dropped_metrics: true - rotation_interval: 10m0s - resolvers: - - name: TestCluster - platform: eks - awsentity/service/application_signals: - cluster_name: TestCluster - entity_type: Service - kubernetes_mode: EKS - platform: ec2 - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: "0s" - http2_read_idle_timeout: "0s" - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: { "name": '.*Old\\sGen$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Survivor\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Eden\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: { "type": "vms" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: { "type": "rss" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" -receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: false - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - otlp/application_signals: - protocols: - grpc: - endpoint: 0.0.0.0:4315 + agenthealth/logs: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EKS + region_type: ACJ + agenthealth/traces: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: EKS + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: "" + certificate_file_path: "" dialer: - timeout: "0s" - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 + timeout: 0s + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: false + profile: "" + proxy_address: "" + region: us-east-1 + role_arn: "" + service_name: "" + entitystore: + kubernetes_mode: EKS + mode: ec2 + region: us-east-1 + server: + listen_addr: :4311 + tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt + tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt + tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key +processors: + awsapplicationsignals: + limiter: + disabled: false + drop_threshold: 500 + garbage_collection_interval: 10m0s + log_dropped_metrics: true + rotation_interval: 10m0s + resolvers: + - name: TestCluster + platform: eks + awsentity/service/application_signals: + cluster_name: TestCluster + entity_type: Service + kubernetes_mode: EKS + platform: ec2 + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - include_system_ca_certs_pool: false - traces_url_path: /v1/traces +receivers: + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: false + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + otlp/application_signals: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:4315 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - - server - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - awsentity/service/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + - server + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - awsentity/service/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml index 454a1bfa23..609149736b 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml @@ -1,1294 +1,1309 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - [ Environment, Service ] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^RuntimeMetric$' - separator: ; - metric_name_selectors: - - '^.*$' - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "1" - awsemf/containerinsights: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" - awsxray/application_signals: - certificate_file_path: "" - endpoint: "" - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: false - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; + metric_name_selectors: + - ^.*$ + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "1" + awsemf/containerinsights: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" + awsxray/application_signals: + certificate_file_path: "" + endpoint: "" + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: false + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EKS - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: EKS - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: "" - dialer: - timeout: "0s" - certificate_file_path: "" - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: false - profile: "" - proxy_address: "" - region: us-east-1 - service_name: "" - role_arn: "" - entitystore: - mode: ec2 - region: us-east-1 - kubernetes_mode: EKS - server: - listen_addr: :4311 - tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" - tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" - tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" -processors: - awsapplicationsignals: - limiter: - disabled: false - drop_threshold: 500 - garbage_collection_interval: 10m0s - log_dropped_metrics: true - rotation_interval: 10m0s - resolvers: - - name: TestCluster - platform: eks - awsentity/service/application_signals: - cluster_name: TestCluster - entity_type: Service - kubernetes_mode: EKS - platform: ec2 - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.ecs.task.id: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: "0s" - http2_read_idle_timeout: "0s" - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: { "name": '.*Old\\sGen$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Survivor\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Eden\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: { "type": "vms" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: { "type": "rss" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" -receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: false - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - otlp/application_signals: - protocols: - grpc: - endpoint: 0.0.0.0:4315 + agenthealth/logs: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EKS + region_type: ACJ + agenthealth/traces: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: EKS + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: "" + certificate_file_path: "" dialer: - timeout: "0s" - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 + timeout: 0s + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: false + profile: "" + proxy_address: "" + region: us-east-1 + role_arn: "" + service_name: "" + entitystore: + kubernetes_mode: EKS + mode: ec2 + region: us-east-1 + server: + listen_addr: :4311 + tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt + tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt + tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key +processors: + awsapplicationsignals: + limiter: + disabled: false + drop_threshold: 500 + garbage_collection_interval: 10m0s + log_dropped_metrics: true + rotation_interval: 10m0s + resolvers: + - name: TestCluster + platform: eks + awsentity/service/application_signals: + cluster_name: TestCluster + entity_type: Service + kubernetes_mode: EKS + platform: ec2 + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - traces_url_path: /v1/traces +receivers: + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: false + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + otlp/application_signals: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:4315 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - - server - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - awsentity/service/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + - server + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - awsentity/service/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml index 36f817297d..23b90150be 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml @@ -15,74 +15,74 @@ exporters: max_retries: 2 metric_declarations: - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service + - - Environment + - Operation + - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; metric_name_selectors: - - ^.*$ + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -186,21 +186,21 @@ processors: match_type: "" new_name: JVMCpuRecentUtilization operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -208,21 +208,21 @@ processors: match_type: "" new_name: JVMCpuTime operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -230,21 +230,21 @@ processors: match_type: "" new_name: JVMClassLoaded operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -252,21 +252,21 @@ processors: match_type: "" new_name: JVMThreadCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -274,21 +274,21 @@ processors: match_type: "" new_name: JVMMemoryNonHeapUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -296,21 +296,21 @@ processors: match_type: "" new_name: JVMMemoryUsedAfterLastGC operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -318,93 +318,93 @@ processors: match_type: "" new_name: JVMMemoryHeapUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: .*Old\sGen$ + name: .*Old\sGen$ include: jvm.memory.pool.used match_type: regexp new_name: JVMMemoryOldGenUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: .*Survivor\sSpace$ + name: .*Survivor\sSpace$ include: jvm.memory.pool.used match_type: regexp new_name: JVMMemorySurvivorSpaceUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: .*Eden\sSpace$ + name: .*Eden\sSpace$ include: jvm.memory.pool.used match_type: regexp new_name: JVMMemoryEdenSpaceUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" @@ -412,21 +412,21 @@ processors: match_type: "" new_name: JVMGCDuration operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" @@ -434,117 +434,117 @@ processors: match_type: "" new_name: JVMGCCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: G1 Old Generation + name: G1 Old Generation include: jvm.gc.collections.elapsed match_type: strict new_name: JVMGCOldGenDuration operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: G1 Young Generation + name: G1 Young Generation include: jvm.gc.collections.elapsed match_type: strict new_name: JVMGCYoungGenDuration operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: G1 Old Generation + name: G1 Old Generation include: jvm.gc.collections.count match_type: strict new_name: JVMGCOldGenCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - name: G1 Young Generation + name: G1 Young Generation include: jvm.gc.collections.count match_type: strict new_name: JVMGCYoungGenCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" @@ -552,93 +552,93 @@ processors: match_type: regexp new_name: PythonProcessGCCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - count: "0" + count: "0" include: ^process\.runtime\.(.*)\.gc_count$$ match_type: regexp new_name: PythonProcessGCGen0Count operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - count: "1" + count: "1" include: ^process\.runtime\.(.*)\.gc_count$$ match_type: regexp new_name: PythonProcessGCGen1Count operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - count: "2" + count: "2" include: ^process\.runtime\.(.*)\.gc_count$$ match_type: regexp new_name: PythonProcessGCGen2Count operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -646,21 +646,21 @@ processors: match_type: regexp new_name: PythonProcessThreadCount operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -668,21 +668,21 @@ processors: match_type: regexp new_name: PythonProcessCpuTime operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: update aggregation_type: "" @@ -690,69 +690,69 @@ processors: match_type: regexp new_name: PythonProcessCpuUtilization operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - type: vms + type: vms include: ^process\.runtime\.(.*)\.memory$$ match_type: regexp new_name: PythonProcessVMSMemoryUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" - action: insert aggregation_type: "" experimental_match_labels: - type: rss + type: rss include: ^process\.runtime\.(.*)\.memory$$ match_type: regexp new_name: PythonProcessRSSMemoryUsed operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric submatch_case: "" resourcedetection: aks: @@ -1104,4 +1104,4 @@ service: metrics: address: "" level: None - traces: {} \ No newline at end of file + traces: {} diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml index 9791f903dd..dfe5442a0d 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml @@ -1,1086 +1,1101 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: true - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - [ Environment, Service ] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^RuntimeMetric$' - separator: ; - metric_name_selectors: - - '^.*$' - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - shared_credentials_file: - - fake-path - version: "1" - awsxray/application_signals: - certificate_file_path: "" - endpoint: https://fake_endpoint - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: true - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - shared_credentials_file: - - fake-path - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: true + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; + metric_name_selectors: + - ^.*$ + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + shared_credentials_file: + - fake-path + version: "1" + awsxray/application_signals: + certificate_file_path: "" + endpoint: https://fake_endpoint + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: true + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + shared_credentials_file: + - fake-path + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: OP - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: OP - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: https://fake_endpoint - dialer: - timeout: "0s" - certificate_file_path: "" - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: true - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - role_arn: "" - service_name: "" - shared_credentials_file: - - fake-path - entitystore: - mode: onPremise - profile: AmazonCloudWatchAgent - region: us-east-1 - shared_credential_file: fake-path -processors: - awsapplicationsignals: - resolvers: - - name: "" - platform: generic - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: "0s" - http2_read_idle_timeout: "0s" - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: "0s" - server_name_override: "" - write_buffer_size: 0 - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: { "name": '.*Old\\sGen$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Survivor\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: { "name": '.*Eden\\sSpace$' } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Old Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: { "name": "G1 Young Generation" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen0Count - match_type: regexp - experimental_match_labels: { "count": "0" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen1Count - match_type: regexp - experimental_match_labels: { "count": "1" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.gc_count$$ - action: insert - new_name: PythonProcessGCGen2Count - match_type: regexp - experimental_match_labels: { "count": "2" } - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.thread_count$$ - action: update - new_name: PythonProcessThreadCount - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu_time$$ - action: update - new_name: PythonProcessCpuTime - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - action: update - new_name: PythonProcessCpuUtilization - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessVMSMemoryUsed - experimental_match_labels: { "type": "vms" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: ^process\.runtime\.(.*)\.memory$$ - action: insert - new_name: PythonProcessRSSMemoryUsed - experimental_match_labels: { "type": "rss" } - match_type: regexp - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [ ] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" -receivers: - otlp/application_signals: - protocols: - grpc: + agenthealth/logs: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: OP + region_type: ACJ + agenthealth/traces: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: OP + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: https://fake_endpoint + certificate_file_path: "" dialer: - timeout: "0s" - endpoint: 0.0.0.0:4315 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - transport: tcp + timeout: 0s + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: true + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + role_arn: "" + service_name: "" + shared_credentials_file: + - fake-path + entitystore: + mode: onPremise + profile: AmazonCloudWatchAgent + region: us-east-1 + shared_credential_file: fake-path +processors: + awsapplicationsignals: + resolvers: + - name: "" + platform: generic + metricstransform/application_signals: + transforms: + - action: update + aggregation_type: "" + include: jvm.cpu.recent_utilization + match_type: "" + new_name: JVMCpuRecentUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.cpu.time + match_type: "" + new_name: JVMCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.classes.loaded + match_type: "" + new_name: JVMClassLoaded + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.threads.count + match_type: "" + new_name: JVMThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.nonheap.used + match_type: "" + new_name: JVMMemoryNonHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.pool.used_after_last_gc + match_type: "" + new_name: JVMMemoryUsedAfterLastGC + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: jvm.memory.heap.used + match_type: "" + new_name: JVMMemoryHeapUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Old\sGen$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryOldGenUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Survivor\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemorySurvivorSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: .*Eden\sSpace$ + include: jvm.memory.pool.used + match_type: regexp + new_name: JVMMemoryEdenSpaceUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.elapsed + match_type: "" + new_name: JVMGCDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: jvm.gc.collections.count + match_type: "" + new_name: JVMGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCOldGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.elapsed + match_type: strict + new_name: JVMGCYoungGenDuration + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Old Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCOldGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + name: G1 Young Generation + include: jvm.gc.collections.count + match_type: strict + new_name: JVMGCYoungGenCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "0" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen0Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "1" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen1Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + count: "2" + include: ^process\.runtime\.(.*)\.gc_count$$ + match_type: regexp + new_name: PythonProcessGCGen2Count + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.thread_count$$ + match_type: regexp + new_name: PythonProcessThreadCount + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu_time$$ + match_type: regexp + new_name: PythonProcessCpuTime + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: update + aggregation_type: "" + include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + match_type: regexp + new_name: PythonProcessCpuUtilization + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: vms + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessVMSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + - action: insert + aggregation_type: "" + experimental_match_labels: + type: rss + include: ^process\.runtime\.(.*)\.memory$$ + match_type: regexp + new_name: PythonProcessRSSMemoryUsed + operations: + - action: aggregate_labels + aggregation_type: sum + experimental_scale: 0 + label: "" + label_set: [] + label_value: "" + new_label: "" + new_value: "" + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Telemetry.Source + new_value: RuntimeMetric + submatch_case: "" + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - traces_url_path: /v1/traces +receivers: + otlp/application_signals: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:4315 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index 618e81c072..5c333f6a0e 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -141,6 +141,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -149,8 +150,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-east-1 + mode: ec2 + region: us-east-1 processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml index 9a349c682e..74b74f384f 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -54,8 +55,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - telegraf_disk + - telegraf_mem telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml index 31c7c5229b..69475eceb3 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName @@ -56,8 +57,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/4283769065 + - telegraf_win_perf_counters/1492679118 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml index a1ecf22c1e..c77a8271c3 100644 --- a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,8 +24,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service + platform: ec2 scrape_datapoint_attribute: true - platform: ec2 receivers: telegraf_socket_listener: collection_interval: 1m0s diff --git a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml index ab934cba89..3a4978afae 100644 --- a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml @@ -21,6 +21,7 @@ exporters: - [] extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -34,15 +35,15 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - scrape_datapoint_attribute: true platform: ec2 + scrape_datapoint_attribute: true ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index ec2a2d8994..444b4ad32f 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -68,6 +68,7 @@ exporters: include_metadata: true extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -76,6 +77,7 @@ extensions: mode: EC2 region_type: ACJ agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -84,6 +86,7 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -100,8 +103,8 @@ processors: platform: ec2 awsentity/service/telegraf: entity_type: Service - scrape_datapoint_attribute: true platform: ec2 + scrape_datapoint_attribute: true batch/emf_logs: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -126,9 +129,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -138,11 +141,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" trace_statements: [] receivers: awsxray: @@ -275,13 +278,13 @@ service: - ec2tagger - transform receivers: - - telegraf_procstat/1917393364 - - telegraf_cpu + - telegraf_swap - telegraf_mem - telegraf_netstat + - telegraf_procstat/1917393364 - telegraf_processes - - telegraf_swap - telegraf_disk + - telegraf_cpu metrics/hostCustomMetrics: exporters: - awscloudwatch @@ -290,8 +293,8 @@ service: - ec2tagger - transform receivers: - - telegraf_socket_listener - telegraf_statsd + - telegraf_socket_listener metrics/hostDeltaMetrics: exporters: - awscloudwatch @@ -301,8 +304,8 @@ service: - ec2tagger - transform receivers: - - telegraf_diskio - telegraf_net + - telegraf_diskio traces/xray: exporters: - awsxray diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index e54d859883..e896c3799b 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -73,6 +73,7 @@ exporters: include_metadata: true extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -81,6 +82,7 @@ extensions: mode: EC2 region_type: ACJ agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -89,6 +91,7 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -102,11 +105,11 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 awsentity/service/telegraf: entity_type: Service - scrape_datapoint_attribute: true platform: ec2 + scrape_datapoint_attribute: true batch/emf_logs: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -138,9 +141,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceId - InstanceType - ImageId - - InstanceId imds_retries: 1 refresh_interval_seconds: 0s filter/jmx/0: @@ -189,11 +192,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx/0: error_mode: propagate @@ -202,9 +205,9 @@ processors: metric_statements: - context: metric statements: - - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" - - set(unit, "unit") where name == "jvm.memory.heap.used" - - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" + - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" + - set(unit, "unit") where name == "jvm.memory.heap.used" + - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" trace_statements: [] transform/jmx/1: error_mode: propagate @@ -213,7 +216,7 @@ processors: metric_statements: - context: metric statements: - - set(name, "TC_ERR") where name == "tomcat.errors" + - set(name, "TC_ERR") where name == "tomcat.errors" trace_statements: [] receivers: awsxray: @@ -381,13 +384,13 @@ service: - ec2tagger - transform receivers: - - telegraf_mem - - telegraf_netstat - - telegraf_procstat/1917393364 + - telegraf_processes + - telegraf_disk - telegraf_swap - telegraf_cpu - - telegraf_disk - - telegraf_processes + - telegraf_procstat/1917393364 + - telegraf_mem + - telegraf_netstat metrics/hostCustomMetrics/cloudwatch: exporters: - awscloudwatch @@ -396,8 +399,8 @@ service: - ec2tagger - transform receivers: - - telegraf_socket_listener - telegraf_statsd + - telegraf_socket_listener metrics/hostDeltaMetrics/cloudwatch: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/config_with_env.yaml b/translator/tocwconfig/sampleConfig/config_with_env.yaml index c776e99d76..1dbc4af2a9 100644 --- a/translator/tocwconfig/sampleConfig/config_with_env.yaml +++ b/translator/tocwconfig/sampleConfig/config_with_env.yaml @@ -32,6 +32,7 @@ exporters: queue_size: 1000 extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml index 28be63530c..68bdd27edb 100644 --- a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml +++ b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml @@ -175,6 +175,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -183,8 +184,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-west-2 + mode: ec2 + region: us-west-2 processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml index 6a27ffc90d..31be834b11 100644 --- a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict @@ -50,12 +51,12 @@ processors: metric_statements: - context: metric statements: - - set(unit, "Count") where name == "diskio_iops_in_progress" - - set(name, "DRIVER_DISKIO_IOPS_IN_PROGRESS") where name == "diskio_iops_in_progress" - - set(unit, "Milliseconds") where name == "diskio_read_time" - - set(name, "DRIVER_DISKIO_READ_TIME") where name == "diskio_read_time" - - set(unit, "Milliseconds") where name == "diskio_write_time" - - set(name, "DRIVER_DISKIO_WRITE_TIME") where name == "diskio_write_time" + - set(unit, "Count") where name == "diskio_iops_in_progress" + - set(name, "DRIVER_DISKIO_IOPS_IN_PROGRESS") where name == "diskio_iops_in_progress" + - set(unit, "Milliseconds") where name == "diskio_read_time" + - set(name, "DRIVER_DISKIO_READ_TIME") where name == "diskio_read_time" + - set(unit, "Milliseconds") where name == "diskio_write_time" + - set(name, "DRIVER_DISKIO_WRITE_TIME") where name == "diskio_write_time" trace_statements: [] receivers: telegraf_diskio: diff --git a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml index f6601c168d..c832e86571 100644 --- a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: "" @@ -35,9 +36,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml index a458852b8e..0bf0648499 100644 --- a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml +++ b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml @@ -15,6 +15,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -28,7 +29,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName @@ -45,9 +46,9 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" trace_statements: [] receivers: telegraf_cpu: @@ -75,9 +76,9 @@ service: - ec2tagger - transform receivers: + - telegraf_disk - telegraf_nvidia_smi - telegraf_cpu - - telegraf_disk telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index 18e4401d58..d4b5e54ae3 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -134,9 +134,9 @@ exporters: - pod_memory_request - pod_memory_limit - pod_cpu_limit + - pod_cpu_request - pod_cpu_usage_total - pod_memory_working_set - - pod_cpu_request - pod_container_status_running - pod_container_status_terminated - pod_container_status_waiting @@ -391,6 +391,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index 169eb97852..f6d5e43542 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -146,9 +146,9 @@ exporters: - pod_container_status_waiting_reason_create_container_error - pod_container_status_waiting_reason_create_container_config_error - pod_container_status_terminated_reason_oom_killed - - pod_gpu_usage_total - pod_gpu_request - pod_gpu_limit + - pod_gpu_usage_total - pod_gpu_reserved_capacity - dimensions: - - ClusterName @@ -175,8 +175,8 @@ exporters: - node_status_condition_unknown - node_status_capacity_pods - node_status_allocatable_pods - - node_gpu_usage_total - node_gpu_limit + - node_gpu_usage_total - node_gpu_reserved_capacity - dimensions: - - ClusterName @@ -649,6 +649,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -685,9 +686,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: container_gpu_memory_used + new_name: container_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -706,9 +707,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: pod_gpu_memory_used + new_name: pod_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -727,9 +728,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: node_gpu_memory_used + new_name: node_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -748,9 +749,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: container_gpu_memory_total + new_name: container_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -759,19 +760,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: pod_gpu_memory_total + new_name: pod_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -780,19 +774,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: node_gpu_memory_total + new_name: node_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -801,19 +788,12 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: container_gpu_temperature + new_name: container_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -825,9 +805,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: pod_gpu_temperature + new_name: pod_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -839,9 +819,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: node_gpu_temperature + new_name: node_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -853,9 +833,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: container_gpu_power_draw + new_name: container_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -867,9 +847,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: pod_gpu_power_draw + new_name: pod_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -881,9 +861,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: node_gpu_power_draw + new_name: node_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -895,9 +875,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: container_gpu_utilization + new_name: container_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -906,12 +886,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: pod_gpu_utilization + new_name: pod_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -920,12 +907,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: node_gpu_utilization + new_name: node_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -934,12 +928,19 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: container_gpu_memory_utilization + new_name: container_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -950,7 +951,7 @@ processors: new_value: ContainerGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -958,9 +959,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: pod_gpu_memory_utilization + new_name: pod_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -971,7 +972,7 @@ processors: new_value: PodGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -979,9 +980,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: node_gpu_memory_utilization + new_name: node_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -992,7 +993,7 @@ processors: new_value: NodeGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -1000,37 +1001,44 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuron_hardware + include: neuroncore_memory_usage_model_code match_type: "" - new_name: neuron_hardware + new_name: neuroncore_memory_usage_model_code operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_errors_total + include: neuroncore_memory_usage_runtime_memory match_type: "" - new_name: neuron_execution_errors + new_name: neuroncore_memory_usage_runtime_memory operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_runtime_memory_used_bytes + include: neuroncore_utilization_ratio match_type: "" - new_name: neurondevice_runtime_memory_used_bytes - operations: [] + new_name: neuroncore_utilization + operations: + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_constants + include: execution_status_total match_type: "" - new_name: neuroncore_memory_usage_constants + new_name: neuron_execution_status operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_code + include: neuron_runtime_memory_used_bytes match_type: "" - new_name: neuroncore_memory_usage_model_code + new_name: neurondevice_runtime_memory_used_bytes operations: [] submatch_case: "" - action: update @@ -1049,51 +1057,44 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: execution_status_total + include: instance_info match_type: "" - new_name: neuron_execution_status + new_name: instance_info operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_runtime_memory + include: neuron_hardware match_type: "" - new_name: neuroncore_memory_usage_runtime_memory + new_name: neuron_hardware operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_utilization_ratio + include: hardware_ecc_events_total match_type: "" - new_name: neuroncore_utilization - operations: - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" + new_name: neurondevice_hw_ecc_events + operations: [] submatch_case: "" - action: update aggregation_type: "" - include: instance_info + include: execution_latency_seconds match_type: "" - new_name: instance_info + new_name: neuron_execution_latency operations: [] submatch_case: "" - action: update aggregation_type: "" - include: hardware_ecc_events_total + include: execution_errors_total match_type: "" - new_name: neurondevice_hw_ecc_events + new_name: neuron_execution_errors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_latency_seconds + include: neuroncore_memory_usage_constants match_type: "" - new_name: neuron_execution_latency + new_name: neuroncore_memory_usage_constants operations: [] submatch_case: "" receivers: diff --git a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml index d38f02f2cd..16fda231f0 100644 --- a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml +++ b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: imds_retries: 1 refresh_interval_seconds: 0s diff --git a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml index 373ba8e154..74b74f384f 100644 --- a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml +++ b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml index 2bd2541d3e..ca4edcd445 100644 --- a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml @@ -58,6 +58,7 @@ exporters: write_buffer_size: 524288 extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -66,8 +67,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-west-2 + mode: ec2 + region: us-west-2 sigv4auth: assume_role: sts_region: us-west-2 @@ -75,7 +76,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 batch/host/amp: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -141,9 +142,9 @@ processors: metric_statements: - context: metric statements: + - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" - set(unit, "unit") where name == "jvm.memory.heap.used" - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" - - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" trace_statements: [] receivers: jmx: @@ -175,8 +176,8 @@ service: - transform - batch/host/amp receivers: - - telegraf_disk - telegraf_cpu + - telegraf_disk metrics/host/cloudwatch: exporters: - awscloudwatch @@ -184,8 +185,8 @@ service: - awsentity/resource - transform receivers: - - telegraf_disk - telegraf_cpu + - telegraf_disk metrics/jmx/amp: exporters: - prometheusremotewrite/amp diff --git a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml index a4edf266d3..3b404f215b 100644 --- a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml @@ -55,6 +55,7 @@ exporters: write_buffer_size: 524288 extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -62,13 +63,13 @@ extensions: usage_flags: mode: EC2 region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 sigv4auth: assume_role: sts_region: us-west-2 region: us-west-2 - entitystore: - mode: ec2 - region: us-west-2 processors: batch/jmx/amp/0: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 68118d53b9..e930254814 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -99,11 +99,11 @@ exporters: - pod_status_unknown - pod_status_succeeded - pod_memory_request - - pod_cpu_usage_total - - pod_memory_working_set - pod_memory_limit - pod_cpu_limit - pod_cpu_request + - pod_cpu_usage_total + - pod_memory_working_set - pod_container_status_running - pod_container_status_terminated - pod_container_status_waiting @@ -358,6 +358,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml index 3943981aa6..db4a93c4ee 100644 --- a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml +++ b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml @@ -90,6 +90,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/log_filter.yaml b/translator/tocwconfig/sampleConfig/log_filter.yaml index 0b694fca94..6ca631da29 100644 --- a/translator/tocwconfig/sampleConfig/log_filter.yaml +++ b/translator/tocwconfig/sampleConfig/log_filter.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-east-1 + entitystore: + mode: ec2 + region: us-east-1 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml b/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml index a01b2785ed..391143c01f 100644 --- a/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 28594ce0e7..41fec32690 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -387,6 +387,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -395,9 +396,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-east-1 - + mode: ec2 + region: us-east-1 processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml index e3327e1d00..11a14c9ad5 100644 --- a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml +++ b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml index a01b2785ed..391143c01f 100644 --- a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml +++ b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml index f6233cf355..8325c25842 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml @@ -1,126 +1,127 @@ exporters: - awsemf: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: "" - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/cwagent - log_retention: 0 - log_stream_name: "" - max_retries: 2 - middleware: agenthealth/logs - namespace: CWAgent - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-west-2 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" + awsemf: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: "" + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/cwagent + log_retention: 0 + log_stream_name: "" + max_retries: 2 + middleware: agenthealth/logs + namespace: CWAgent + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-west-2 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 + agenthealth/logs: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 processors: - batch/hostOtlpMetrics/cloudwatchlogs: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 30s - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs: - exclude: - match_type: "" - include: - match_type: "" - initial_value: 2 - max_staleness: 0s + batch/hostOtlpMetrics/cloudwatchlogs: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 30s + cumulativetodelta/hostOtlpMetrics/cloudwatchlogs: + exclude: + match_type: "" + include: + match_type: "" + initial_value: 2 + max_staleness: 0s receivers: - otlp/metrics: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:1234 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - transport: tcp - write_buffer_size: 0 - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - http: - endpoint: 0.0.0.0:2345 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - traces_url_path: /v1/traces - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s + otlp/metrics: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:1234 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:2345 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + traces_url_path: /v1/traces service: - extensions: - - agenthealth/logs - - entitystore - pipelines: - metrics/hostOtlpMetrics/cloudwatchlogs: - exporters: - - awsemf - processors: - - batch/hostOtlpMetrics/cloudwatchlogs - - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs - receivers: - - otlp/metrics - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } + extensions: + - agenthealth/logs + - entitystore + pipelines: + metrics/hostOtlpMetrics/cloudwatchlogs: + exporters: + - awsemf + processors: + - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs + - batch/hostOtlpMetrics/cloudwatchlogs + receivers: + - otlp/metrics + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml index 8f47cce671..df72c339f7 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml @@ -1,110 +1,111 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 + agenthealth/metrics: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 processors: - cumulativetodelta/hostOtlpMetrics: - exclude: - match_type: "" - include: - match_type: "" - initial_value: 2 - max_staleness: 0s - ec2tagger: - ec2_instance_tag_keys: - - AutoScalingGroupName - ec2_metadata_tags: - - ImageId - - InstanceId - - InstanceType - imds_retries: 1 - refresh_interval_seconds: 0s + cumulativetodelta/hostOtlpMetrics: + exclude: + match_type: "" + include: + match_type: "" + initial_value: 2 + max_staleness: 0s + ec2tagger: + ec2_instance_tag_keys: + - AutoScalingGroupName + ec2_metadata_tags: + - InstanceId + - InstanceType + - ImageId + imds_retries: 1 + refresh_interval_seconds: 0s receivers: - otlp/metrics: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:1234 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - transport: tcp - write_buffer_size: 0 - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - http: - endpoint: 0.0.0.0:2345 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - traces_url_path: /v1/traces - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s + otlp/metrics: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:1234 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:2345 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + traces_url_path: /v1/traces service: - extensions: - - agenthealth/metrics - - entitystore - pipelines: - metrics/hostOtlpMetrics: - exporters: - - awscloudwatch - processors: - - cumulativetodelta/hostOtlpMetrics - - ec2tagger - receivers: - - otlp/metrics - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } + extensions: + - agenthealth/metrics + - entitystore + pipelines: + metrics/hostOtlpMetrics: + exporters: + - awscloudwatch + processors: + - cumulativetodelta/hostOtlpMetrics + - ec2tagger + receivers: + - otlp/metrics + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml index cfce7bfa44..c8fd0f01d4 100644 --- a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml +++ b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml @@ -1,61 +1,62 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - profile: AmazonCloudWatchAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true - shared_credential_file: fake-path + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + profile: AmazonCloudWatchAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true + shared_credential_file: fake-path extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: OP - region_type: ACJ - entitystore: - mode: onPremise - profile: AmazonCloudWatchAgent - region: us-west-2 - shared_credential_file: fake-path + agenthealth/metrics: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: OP + region_type: ACJ + entitystore: + mode: onPremise + profile: AmazonCloudWatchAgent + region: us-west-2 + shared_credential_file: fake-path receivers: - telegraf_procstat/793254176: - alias_name: amazon-cloudwatch-agent - collection_interval: 1m0s - initial_delay: 1s - timeout: 0s + telegraf_procstat/793254176: + alias_name: amazon-cloudwatch-agent + collection_interval: 1m0s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - entitystore - pipelines: - metrics/host: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_procstat/793254176 - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - entitystore + pipelines: + metrics/host: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_procstat/793254176 + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml index ce4ad17041..693c2dc26a 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml @@ -70,6 +70,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml index 2a47f34ae3..70a94910b9 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml @@ -52,6 +52,7 @@ exporters: version: "0" extensions: agenthealth/logs: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml index df1b94808d..e417a5320a 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/tmp/a.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/tmp/a.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml index e3327e1d00..11a14c9ad5 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml index a01b2785ed..391143c01f 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml index e3dd15b6ba..d29a89a498 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: "ec2" - region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\tmp\am.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: { } \ No newline at end of file + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\tmp\am.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml index 99724c7d28..6b90ed65cf 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,7 +24,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict @@ -75,10 +76,10 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_cpu - telegraf_disk - telegraf_mem - telegraf_swap + - telegraf_cpu metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml index 13bac887c2..bfe71281d3 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml @@ -12,6 +12,7 @@ exporters: shared_credential_file: fake-path extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -42,9 +43,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s @@ -82,10 +83,10 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_swap - telegraf_cpu - telegraf_disk - telegraf_mem - - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml index 8df619d970..7691c0b53f 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -70,11 +71,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 + - telegraf_win_perf_counters/4283769065 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml index 2914d1bb74..6f2e14a4c5 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml @@ -12,6 +12,7 @@ exporters: shared_credential_file: fake-path extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -32,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s @@ -77,11 +78,11 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/3610923661 + - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - - telegraf_win_perf_counters/3610923661 - - telegraf_win_perf_counters/3446270237 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml index 0034301d02..401a8c27f2 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,8 +24,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - scrape_datapoint_attribute: true platform: ec2 + scrape_datapoint_attribute: true receivers: telegraf_statsd: collection_interval: 10s diff --git a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml index 6aeeae4dd6..35e786e5dc 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml @@ -10,6 +10,7 @@ exporters: enabled: true extensions: agenthealth/metrics: + is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -23,8 +24,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service + platform: ec2 scrape_datapoint_attribute: true - platform: ec2 receivers: telegraf_statsd: collection_interval: 10s diff --git a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml index 0e0e2da5a1..0220d83992 100644 --- a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml @@ -1,50 +1,51 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ + agenthealth/metrics: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EC2 + region_type: ACJ receivers: - telegraf_statsd: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_statsd: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - pipelines: - metrics/hostCustomMetrics: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_statsd - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + pipelines: + metrics/hostCustomMetrics: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_statsd + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml index 2ed69a21d4..b0fbeb16d6 100644 --- a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml @@ -1,61 +1,62 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EKS - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 - kubernetes_mode: EKS - server: - listen_addr: :4311 - tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" - tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" - tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" + agenthealth/metrics: + is_status_code_only: false + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EKS + region_type: ACJ + entitystore: + kubernetes_mode: EKS + mode: ec2 + region: us-west-2 + server: + listen_addr: :4311 + tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt + tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt + tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key receivers: - telegraf_statsd: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_statsd: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - entitystore - - server - pipelines: - metrics/hostCustomMetrics: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_statsd - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - entitystore + - server + pipelines: + metrics/hostCustomMetrics: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_statsd + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml index 11aceb51c8..cec74b77ed 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml @@ -23,6 +23,7 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml index 4ab7efc002..060e16d3a5 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml @@ -23,6 +23,7 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/traces: + is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml b/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml index 78c680ddcf..391143c01f 100644 --- a/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml +++ b/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml @@ -2,13 +2,13 @@ exporters: nop: {} extensions: entitystore: - mode: "ec2" - region: us-west-2 + mode: ec2 + region: us-west-2 receivers: nop: {} service: extensions: - - entitystore + - entitystore pipelines: metrics/nop: exporters: @@ -24,13 +24,13 @@ service: encoding: console level: info output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s + enabled: true + initial: 2 + thereafter: 500 + tick: 10s metrics: address: "" level: None - traces: { } \ No newline at end of file + traces: {} diff --git a/translator/tocwconfig/tocwconfig_test.go b/translator/tocwconfig/tocwconfig_test.go index c607257a3a..e542a3ef9e 100644 --- a/translator/tocwconfig/tocwconfig_test.go +++ b/translator/tocwconfig/tocwconfig_test.go @@ -774,11 +774,12 @@ func verifyToYamlTranslation(t *testing.T, input interface{}, expectedYamlFilePa require.NoError(t, err) yamlStr := toyamlconfig.ToYamlConfig(yamlConfig) require.NoError(t, yaml.Unmarshal([]byte(yamlStr), &actual)) + assert.NoError(t, os.WriteFile(expectedYamlFilePath, []byte(yamlStr), 0644)) // useful for regenerating YAML opt := cmpopts.SortSlices(func(x, y interface{}) bool { return pretty.Sprint(x) < pretty.Sprint(y) }) - // assert.Equal(t, expected, actual) // this is useful for debugging differences between the YAML + //assert.Equal(t, expected, actual) // this is useful for debugging differences between the YAML require.True(t, cmp.Equal(expected, actual, opt), "D! YAML diff: %s", cmp.Diff(expected, actual)) } From 5dc40f4358f24e5d1915d6bc59f890683f8e62fb Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 16:42:06 -0500 Subject: [PATCH 27/48] running make fmt --- .../agenthealth/handler/stats/provider/statuscode_test.go | 6 +++++- plugins/processors/ec2tagger/ec2tagger.go | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go index b5b99c0eaa..8b219477d1 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -1,11 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + package provider import ( - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) func TestStatusCodeHandler(t *testing.T) { diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index a6f6e967f7..35631a6ce2 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -11,7 +11,6 @@ import ( "time" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" From e5bf29595e38ab29d4d45049ce96cf3953685f19 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 17:18:01 -0500 Subject: [PATCH 28/48] fixing unit tests --- .../sampleConfig/advanced_config_darwin.yaml | 2 +- .../sampleConfig/advanced_config_linux.yaml | 4 +- .../sampleConfig/advanced_config_windows.yaml | 6 +- .../sampleConfig/amp_config_linux.yaml | 2 +- .../sampleConfig/basic_config_linux.yaml | 2 +- .../sampleConfig/complete_darwin_config.yaml | 14 +- .../sampleConfig/complete_linux_config.yaml | 12 +- .../sampleConfig/drop_origin_linux.yaml | 4 +- .../emf_and_kubernetes_with_gpu_config.yaml | 268 +++++++++--------- .../ignore_append_dimensions.yaml | 2 +- .../sampleConfig/invalid_input_linux.yaml | 2 +- .../sampleConfig/jmx_config_linux.yaml | 6 +- .../sampleConfig/otlp_metrics_config.yaml | 2 +- .../sampleConfig/standard_config_linux.yaml | 6 +- ...ndard_config_linux_with_common_config.yaml | 2 +- .../sampleConfig/standard_config_windows.yaml | 4 +- ...ard_config_windows_with_common_config.yaml | 6 +- 17 files changed, 172 insertions(+), 172 deletions(-) diff --git a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml index d5fa199e7c..f3dd0acaba 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml @@ -81,11 +81,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - telegraf_netstat - telegraf_swap - telegraf_cpu - telegraf_disk + - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml index addecabd25..e9ad7c1b8e 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml @@ -39,9 +39,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -89,13 +89,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_mem - telegraf_netstat - telegraf_swap - telegraf_ethtool - telegraf_nvidia_smi - telegraf_cpu - telegraf_disk - - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml index 35ccae8ff9..3bfe0532fa 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml @@ -29,9 +29,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -82,13 +82,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/3446270237 + - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/2073218482 - telegraf_win_perf_counters/2039663244 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - - telegraf_win_perf_counters/3446270237 - - telegraf_win_perf_counters/3762679655 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml index f17a3e72cc..ca7756e664 100644 --- a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml @@ -92,9 +92,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s rollup: diff --git a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml index 74b74f384f..f140013c65 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml @@ -55,8 +55,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_disk - telegraf_mem + - telegraf_disk telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index 444b4ad32f..8c1f8b9fda 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -129,9 +129,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -141,11 +141,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] receivers: awsxray: @@ -278,13 +278,13 @@ service: - ec2tagger - transform receivers: + - telegraf_processes - telegraf_swap - telegraf_mem - telegraf_netstat - telegraf_procstat/1917393364 - - telegraf_processes - - telegraf_disk - telegraf_cpu + - telegraf_disk metrics/hostCustomMetrics: exporters: - awscloudwatch @@ -293,8 +293,8 @@ service: - ec2tagger - transform receivers: - - telegraf_statsd - telegraf_socket_listener + - telegraf_statsd metrics/hostDeltaMetrics: exporters: - awscloudwatch @@ -304,8 +304,8 @@ service: - ec2tagger - transform receivers: - - telegraf_net - telegraf_diskio + - telegraf_net traces/xray: exporters: - awsxray diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index e896c3799b..b93393e96c 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -384,13 +384,13 @@ service: - ec2tagger - transform receivers: - - telegraf_processes - telegraf_disk - - telegraf_swap - - telegraf_cpu - - telegraf_procstat/1917393364 - - telegraf_mem - telegraf_netstat + - telegraf_processes + - telegraf_mem + - telegraf_procstat/1917393364 + - telegraf_cpu + - telegraf_swap metrics/hostCustomMetrics/cloudwatch: exporters: - awscloudwatch @@ -399,8 +399,8 @@ service: - ec2tagger - transform receivers: - - telegraf_statsd - telegraf_socket_listener + - telegraf_statsd metrics/hostDeltaMetrics/cloudwatch: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml index 0bf0648499..9a05163bed 100644 --- a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml +++ b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml @@ -34,9 +34,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -76,9 +76,9 @@ service: - ec2tagger - transform receivers: + - telegraf_cpu - telegraf_disk - telegraf_nvidia_smi - - telegraf_cpu telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index f6d5e43542..4a97034264 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -686,9 +686,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: container_gpu_memory_total + new_name: container_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -697,19 +697,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: pod_gpu_memory_total + new_name: pod_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -718,19 +711,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: node_gpu_memory_total + new_name: node_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -739,19 +725,12 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: container_gpu_temperature + new_name: container_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -760,12 +739,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: pod_gpu_temperature + new_name: pod_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -774,12 +760,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: node_gpu_temperature + new_name: node_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -788,12 +781,19 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: container_gpu_power_draw + new_name: container_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -802,12 +802,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: pod_gpu_power_draw + new_name: pod_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -816,12 +823,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: node_gpu_power_draw + new_name: node_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -830,12 +844,19 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: container_gpu_utilization + new_name: container_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -844,12 +865,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: pod_gpu_utilization + new_name: pod_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -858,12 +886,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: node_gpu_utilization + new_name: node_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -872,12 +907,19 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: container_gpu_memory_utilization + new_name: container_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -886,19 +928,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: pod_gpu_memory_utilization + new_name: pod_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -907,19 +942,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: node_gpu_memory_utilization + new_name: node_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -928,19 +956,12 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: container_gpu_memory_used + new_name: container_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -949,19 +970,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: pod_gpu_memory_used + new_name: pod_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -970,19 +984,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: node_gpu_memory_used + new_name: node_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -991,110 +998,103 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_code + include: execution_status_total match_type: "" - new_name: neuroncore_memory_usage_model_code + new_name: neuron_execution_status operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_runtime_memory + include: neuron_runtime_memory_used_bytes match_type: "" - new_name: neuroncore_memory_usage_runtime_memory + new_name: neurondevice_runtime_memory_used_bytes operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_utilization_ratio + include: neuroncore_memory_usage_model_shared_scratchpad match_type: "" - new_name: neuroncore_utilization - operations: - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" + new_name: neuroncore_memory_usage_model_shared_scratchpad + operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_status_total + include: neuroncore_memory_usage_tensors match_type: "" - new_name: neuron_execution_status + new_name: neuroncore_memory_usage_tensors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_runtime_memory_used_bytes + include: instance_info match_type: "" - new_name: neurondevice_runtime_memory_used_bytes + new_name: instance_info operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_shared_scratchpad + include: execution_errors_total match_type: "" - new_name: neuroncore_memory_usage_model_shared_scratchpad + new_name: neuron_execution_errors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_tensors + include: neuroncore_memory_usage_constants match_type: "" - new_name: neuroncore_memory_usage_tensors + new_name: neuroncore_memory_usage_constants operations: [] submatch_case: "" - action: update aggregation_type: "" - include: instance_info + include: neuroncore_memory_usage_model_code match_type: "" - new_name: instance_info + new_name: neuroncore_memory_usage_model_code operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_hardware + include: neuroncore_memory_usage_runtime_memory match_type: "" - new_name: neuron_hardware + new_name: neuroncore_memory_usage_runtime_memory operations: [] submatch_case: "" - action: update aggregation_type: "" - include: hardware_ecc_events_total + include: neuroncore_utilization_ratio match_type: "" - new_name: neurondevice_hw_ecc_events - operations: [] + new_name: neuroncore_utilization + operations: + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: update aggregation_type: "" - include: execution_latency_seconds + include: neuron_hardware match_type: "" - new_name: neuron_execution_latency + new_name: neuron_hardware operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_errors_total + include: hardware_ecc_events_total match_type: "" - new_name: neuron_execution_errors + new_name: neurondevice_hw_ecc_events operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_constants + include: execution_latency_seconds match_type: "" - new_name: neuroncore_memory_usage_constants + new_name: neuron_execution_latency operations: [] submatch_case: "" receivers: diff --git a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml index 16fda231f0..5d4e3b492d 100644 --- a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml +++ b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml @@ -49,8 +49,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_disk - telegraf_mem + - telegraf_disk telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml index 74b74f384f..f140013c65 100644 --- a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml +++ b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml @@ -55,8 +55,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_disk - telegraf_mem + - telegraf_disk telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml index ca4edcd445..449ed93cd2 100644 --- a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml @@ -129,11 +129,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx: error_mode: propagate @@ -142,9 +142,9 @@ processors: metric_statements: - context: metric statements: - - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" - set(unit, "unit") where name == "jvm.memory.heap.used" - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" + - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" trace_statements: [] receivers: jmx: diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml index df72c339f7..717dc69c8b 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml @@ -33,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml index 6b90ed65cf..c78d6dd9c3 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml @@ -39,9 +39,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType refresh_interval_seconds: 0s receivers: telegraf_cpu: @@ -76,10 +76,10 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_disk - - telegraf_mem - telegraf_swap - telegraf_cpu + - telegraf_disk + - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml index bfe71281d3..7764f9adad 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml @@ -83,10 +83,10 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_mem - telegraf_swap - telegraf_cpu - telegraf_disk - - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml index 7691c0b53f..05e062c29d 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml @@ -71,11 +71,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/1492679118 - - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 + - telegraf_win_perf_counters/1492679118 + - telegraf_win_perf_counters/3610923661 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml index 6f2e14a4c5..ca760d1f70 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml @@ -33,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s @@ -78,11 +78,11 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/4283769065 + - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - - telegraf_win_perf_counters/4283769065 - - telegraf_win_perf_counters/1492679118 telemetry: logs: development: false From e07463a9563ad9c5b1ed7396cfb91dfd62f6d27b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 17:50:46 -0500 Subject: [PATCH 29/48] fixing tests --- extension/agenthealth/config.go | 2 +- extension/agenthealth/extension.go | 13 +- internal/tls/testdata/server.crt | 44 +++--- internal/tls/testdata/server.key | 52 +++---- internal/tls/testdata/tls-ca.crt | 50 +++---- plugins/processors/ec2tagger/ec2tagger.go | 21 +-- .../sampleConfig/advanced_config_darwin.yaml | 6 +- .../sampleConfig/advanced_config_linux.yaml | 6 +- .../sampleConfig/amp_config_linux.yaml | 2 +- .../sampleConfig/basic_config_windows.yaml | 2 +- .../sampleConfig/compass_linux_config.yaml | 2 +- .../sampleConfig/complete_darwin_config.yaml | 16 +- .../sampleConfig/complete_linux_config.yaml | 10 +- .../emf_and_kubernetes_with_gpu_config.yaml | 138 +++++++++--------- .../sampleConfig/jmx_config_linux.yaml | 4 +- .../sampleConfig/otlp_metrics_config.yaml | 2 +- .../sampleConfig/standard_config_linux.yaml | 4 +- ...ndard_config_linux_with_common_config.yaml | 2 +- .../sampleConfig/standard_config_windows.yaml | 4 +- ...ard_config_windows_with_common_config.yaml | 6 +- .../otel/extension/agenthealth/translator.go | 15 +- .../otel/pipeline/host/translator.go | 1 - 22 files changed, 194 insertions(+), 208 deletions(-) diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index ad326129be..696db2ceca 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -12,7 +12,7 @@ import ( type Config struct { IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` Stats agent.StatsConfig `mapstructure:"stats"` - StatusCodeOnly bool `mapstructure:"is_status_code_only"` + StatusCodeOnly *bool `mapstructure:"is_status_code_only,omitempty"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index d129fe02c8..669c98a98a 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -22,18 +22,19 @@ type agentHealth struct { var _ awsmiddleware.Extension = (*agentHealth)(nil) func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { - // Initialize handlers var responseHandlers []awsmiddleware.ResponseHandler requestHandlers := []awsmiddleware.RequestHandler{useragent.NewHandler(ah.cfg.IsUsageDataEnabled)} - if ah.cfg.IsUsageDataEnabled { - req, res := stats.NewHandlers(ah.logger, ah.cfg.Stats, ah.cfg.StatusCodeOnly) - requestHandlers = append(requestHandlers, req...) - responseHandlers = append(responseHandlers, res...) - } else { + if !ah.cfg.IsUsageDataEnabled { ah.logger.Debug("Usage data is disabled, skipping stats handlers") + return requestHandlers, responseHandlers } + statusCodeOnly := ah.cfg.StatusCodeOnly != nil + statsRequestHandlers, statsResponseHandlers := stats.NewHandlers(ah.logger, ah.cfg.Stats, statusCodeOnly) + requestHandlers = append(requestHandlers, statsRequestHandlers...) + responseHandlers = append(responseHandlers, statsResponseHandlers...) + return requestHandlers, responseHandlers } diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index ea76fdfd7b..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGTCCAgGgAwIBAgIRALBSsWx0R8pdGw3H9ZNxAEUwDQYJKoZIhvcNAQELBQAw -EjEQMA4GA1UEChMHUm9vdCBDQTAeFw0yNDExMTkyMTMxMjJaFw0yNDExMTkyMjMx -MjJaMBUxEzARBgNVBAoTCkt1YmVybmV0ZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDi1fIx0fG6+A4HlKOh9olYknYbOs41+Dgc6FX6hu/5KZ0AvMMU -RNY/UmbqS+Iut1kF1069zRkFmf+NOyYMam//GbhtKA7FyYtC+pMSSU+amHPLo2dO -bOSSy/S4YWS/6O6A36YRwsGqNr9UVHnsaSRKp2yY7sd9b4g5VZmVHodnGTfohMpt -57bzggN0ZMMKJE94p3ZjB5y+pQ1hvbRA7WPWPUaPpPznTwXGO8z6mYPHjjGmEyFd -H4Pe9xA6gfLzRy8Bf0VJhOFH4+Xe0eTcigNimKMKT8ApMpXIlvsJ4Buuf8JXgxu9 -k0YW2r2E0ZYrvPhvzQMHntbovmuH+zHB5A+TAgMBAAGjZzBlMA4GA1UdDwEB/wQE -AwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB8GA1UdIwQY -MBaAFI+B0q4vVDUe4LSe172DYmnfkGIOMA8GA1UdEQQIMAaHBH8AAAEwDQYJKoZI -hvcNAQELBQADggIBAALYTNCcFEJnSIUL81+Fxb0U9KgdNwhJfou5WTgRSFqLwuJf -hYfzSHCZYQbANb93o7jsa0cj2Wqj8jL+UEhGLLXg6jLUGdG93WoVCtO2FchwWoay -6trRPJ0aHzfhKLZzU4cVp649iygbs5RFNbjMz+ehpC2FOizjA+2zysPchJ9xYCU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aNnMGUwDgYDVR0PAQH/BAQD +AgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgw +FoAUhscCtqKglSlRCx9YNN1D/Xz5MpMwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG +9w0BAQsFAAOCAgEAcxCGmWNtuM9V2yi0SOSLfxlSK7F1OS5qQuLWkZSDB1f+XG82 +PNDwSrV4J42qZcFfKrEt1HtS/Ws6VRlLrSnYArNSyQvNTeNf0q/rX9yO8wRcCM5K +sb8uv27xdawjN6F3z59rpJOf9ldX4ASrRZHzX/ttvvNcUdbCZsF5+h2EhcwNVVUa +Q6vlAW8u4Ik9HXxJ+W2HEdlSYWcCdTK4hDCtJhwqEBua1VdKwSdrlDZJPswAdCzv +CR3Fj4NsmPRDw8uCPIL4hwk5fbffcn3rZrsOXSMTKxvdyP+XBPKWEoIs6cxvdE3o +sG65EZeGpj0vLN+rLEbumkvgCAHACgVxvyDeJnajoA6lPNxfzby+9CmhLZfgaVbE +nVQTj8hkUW1gtvnAP3v1Zbe3QMhlqWqwfwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 3673072582..f5856375b7 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDi1fIx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MPtvw/OCDsmwlw +Up+F4Ym87BuxYPIgGMzb7r7x -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 1c22e4a6c1..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTExOTIxMzEyNloXDTM0MTExOTIxMzEyNlowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKx/urc3Bbky -5UCctkWDEganaU6qkZVnSGFnOhekzl2fnZDI8hETZo9ApOlaqBVaX+AMZc1JmvEb -qt/pfiyRl9q9wVvXi904nuZQk7Ehb6sLCcRxTaNPQUN+2OESX7mpBWZIvbTXpgVd -IqSXR8GX4H/IFyrdZSX4YS8bCcPQwzJ/xxOIL8xy8qox+EGYwsSg/M9BdhpfMLz6 -hCDxMKMw3obD4KeNC/Dkx2I/u3OzRWO5OTB+D0ihhzGFlee+mslyx2MtHVSpG7dd -hYvZXTLPFevK83lasQGJMTX7vLAER7aWAL5xMmEsZw4241pWqVBVMJEZrmv1812V -odKc+peH7s6olamO+ihN1wiYW9FpE39XcMhNITjcwZ3tQ7DD9igU3dMrQVtSToaS -Cx5ZTUlO+ngzApVuNY+A5VbQFoIzBfpGKACwrGd8qEayhiBUrYMQZ/38k4jaYsa5 -Z2vpMdrb96CDCC98dSvAfQncSn+sner1PcwSBfhr/9CPH2SHvZvzIXHBO2LJc2Pg -3q8T5K0LEbNtW4UNMdKfJLMURr4xO+Obw+vxHC+nyPk1NXnsbyoJrqnatnkc71Mg -T96Vb1dWXSH0Mwd1au7AkeUYah9HUTr9Bbb9+OrHGenPlAHUetrMRe5VMCkKhWxG -xLhfjATY/WxVkdrFaoT6k0xcjRd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URMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- diff --git a/plugins/processors/ec2tagger/ec2tagger.go b/plugins/processors/ec2tagger/ec2tagger.go index 35631a6ce2..52e9423100 100644 --- a/plugins/processors/ec2tagger/ec2tagger.go +++ b/plugins/processors/ec2tagger/ec2tagger.go @@ -10,7 +10,6 @@ import ( "sync" "time" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" @@ -64,6 +63,7 @@ type Tagger struct { func newTagger(config *Config, logger *zap.Logger) *Tagger { _, cancel := context.WithCancel(context.Background()) mdCredentialConfig := &configaws.CredentialConfig{} + p := &Tagger{ Config: config, logger: logger, @@ -280,7 +280,7 @@ func (t *Tagger) ebsVolumesRetrieved() bool { // Start acts as input validation and serves the purpose of updating ec2 tags and ebs volumes if necessary. // It will be called when OTel is enabling each processor -func (t *Tagger) Start(ctx context.Context, host component.Host) error { +func (t *Tagger) Start(ctx context.Context, _ component.Host) error { t.shutdownC = make(chan bool) t.ec2TagCache = map[string]string{} @@ -300,8 +300,10 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { } useAllTags := len(t.EC2InstanceTagKeys) == 1 && t.EC2InstanceTagKeys[0] == "*" - if !useAllTags && len(t.EC2InstanceTagKeys) > 0 { + if !useAllTags && len(t.EC2InstanceTagKeys) > 0 { + // if the customer said 'AutoScalingGroupName' (the CW dimension), do what they mean not what they said + // and filter for the EC2 tag name called 'aws:autoscaling:groupName' for i, key := range t.EC2InstanceTagKeys { if cwDimensionASG == key { t.EC2InstanceTagKeys[i] = Ec2InstanceTagKeyASG @@ -325,20 +327,11 @@ func (t *Tagger) Start(ctx context.Context, host component.Host) error { Region: t.ec2MetadataRespond.region, } t.ec2API = t.ec2Provider(ec2CredentialConfig) - - if ec2Client, ok := t.ec2API.(*ec2.EC2); ok { - if t.Config.MiddlewareID == nil { - TypeStr, _ = component.NewType("agenthealth") - defaultMiddlewareID := component.NewIDWithName(TypeStr, component.DataTypeMetrics.String()) - t.Config.MiddlewareID = &defaultMiddlewareID - } - awsmiddleware.TryConfigure(t.logger, host, *t.Config.MiddlewareID, awsmiddleware.SDKv1(&ec2Client.Handlers)) //Change this so that we confiugure new tegger to have the status code middware id !!!!!!!!!!!?????? - } - - go func() { + go func() { //Async start of initial retrieval to prevent block of agent start t.initialRetrievalOfTagsAndVolumes() t.refreshLoopToUpdateTagsAndVolumes() }() + t.logger.Info("ec2tagger: EC2 tagger has started initialization.") } else { t.setStarted() diff --git a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml index f3dd0acaba..6e0e541e10 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml @@ -39,9 +39,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -81,11 +81,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_netstat - - telegraf_swap - telegraf_cpu - telegraf_disk - telegraf_mem + - telegraf_netstat + - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml index e9ad7c1b8e..e3c3b5746d 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml @@ -89,13 +89,13 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - - telegraf_netstat - - telegraf_swap - telegraf_ethtool - telegraf_nvidia_smi - telegraf_cpu - telegraf_disk + - telegraf_mem + - telegraf_netstat + - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml index ca7756e664..a4e2973b1e 100644 --- a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml @@ -92,9 +92,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s rollup: diff --git a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml index 69475eceb3..3233c41868 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml @@ -57,8 +57,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 + - telegraf_win_perf_counters/4283769065 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml index 3a4978afae..d8f54142a4 100644 --- a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml @@ -41,9 +41,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index 8c1f8b9fda..2e1f065a84 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -129,9 +129,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -141,11 +141,11 @@ processors: metric_statements: - context: metric statements: + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] receivers: awsxray: @@ -278,12 +278,12 @@ service: - ec2tagger - transform receivers: - - telegraf_processes + - telegraf_cpu - telegraf_swap - - telegraf_mem - - telegraf_netstat + - telegraf_processes - telegraf_procstat/1917393364 - - telegraf_cpu + - telegraf_netstat + - telegraf_mem - telegraf_disk metrics/hostCustomMetrics: exporters: @@ -304,8 +304,8 @@ service: - ec2tagger - transform receivers: - - telegraf_diskio - telegraf_net + - telegraf_diskio traces/xray: exporters: - awsxray diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index b93393e96c..e079fec603 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -205,9 +205,9 @@ processors: metric_statements: - context: metric statements: - - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" - set(unit, "unit") where name == "jvm.memory.heap.used" - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" + - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" trace_statements: [] transform/jmx/1: error_mode: propagate @@ -384,13 +384,13 @@ service: - ec2tagger - transform receivers: + - telegraf_cpu - telegraf_disk - - telegraf_netstat - telegraf_processes - - telegraf_mem + - telegraf_netstat - telegraf_procstat/1917393364 - - telegraf_cpu - telegraf_swap + - telegraf_mem metrics/hostCustomMetrics/cloudwatch: exporters: - awscloudwatch @@ -399,8 +399,8 @@ service: - ec2tagger - transform receivers: - - telegraf_socket_listener - telegraf_statsd + - telegraf_socket_listener metrics/hostDeltaMetrics/cloudwatch: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index 4a97034264..410baa98a0 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -684,6 +684,48 @@ processors: match_type: regexp new_name: apiserver_request_total_5xx submatch_case: "" + - action: insert + aggregation_type: "" + include: DCGM_FI_DEV_POWER_USAGE + match_type: "" + new_name: container_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: ContainerGPU + submatch_case: "" + - action: insert + aggregation_type: "" + include: DCGM_FI_DEV_POWER_USAGE + match_type: "" + new_name: pod_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: PodGPU + submatch_case: "" + - action: insert + aggregation_type: "" + include: DCGM_FI_DEV_POWER_USAGE + match_type: "" + new_name: node_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: NodeGPU + submatch_case: "" - action: insert aggregation_type: "" include: DCGM_FI_DEV_GPU_UTIL @@ -957,47 +999,12 @@ processors: new_label: Type new_value: NodeGPU submatch_case: "" - - action: insert - aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE - match_type: "" - new_name: container_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: ContainerGPU - submatch_case: "" - - action: insert - aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE - match_type: "" - new_name: pod_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: PodGPU - submatch_case: "" - - action: insert + - action: update aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: execution_errors_total match_type: "" - new_name: node_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: NodeGPU + new_name: neuron_execution_errors + operations: [] submatch_case: "" - action: update aggregation_type: "" @@ -1008,9 +1015,9 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuron_runtime_memory_used_bytes + include: neuroncore_memory_usage_model_code match_type: "" - new_name: neurondevice_runtime_memory_used_bytes + new_name: neuroncore_memory_usage_model_code operations: [] submatch_case: "" - action: update @@ -1022,23 +1029,30 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_tensors + include: neuroncore_utilization_ratio match_type: "" - new_name: neuroncore_memory_usage_tensors - operations: [] + new_name: neuroncore_utilization + operations: + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: update aggregation_type: "" - include: instance_info + include: execution_latency_seconds match_type: "" - new_name: instance_info + new_name: neuron_execution_latency operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_errors_total + include: neuron_runtime_memory_used_bytes match_type: "" - new_name: neuron_execution_errors + new_name: neurondevice_runtime_memory_used_bytes operations: [] submatch_case: "" - action: update @@ -1050,31 +1064,24 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_code + include: neuroncore_memory_usage_runtime_memory match_type: "" - new_name: neuroncore_memory_usage_model_code + new_name: neuroncore_memory_usage_runtime_memory operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_runtime_memory + include: neuroncore_memory_usage_tensors match_type: "" - new_name: neuroncore_memory_usage_runtime_memory + new_name: neuroncore_memory_usage_tensors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_utilization_ratio + include: instance_info match_type: "" - new_name: neuroncore_utilization - operations: - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" + new_name: instance_info + operations: [] submatch_case: "" - action: update aggregation_type: "" @@ -1090,13 +1097,6 @@ processors: new_name: neurondevice_hw_ecc_events operations: [] submatch_case: "" - - action: update - aggregation_type: "" - include: execution_latency_seconds - match_type: "" - new_name: neuron_execution_latency - operations: [] - submatch_case: "" receivers: awscontainerinsightreceiver: accelerated_compute_metrics: true diff --git a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml index 449ed93cd2..b135ef9ba2 100644 --- a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml @@ -129,11 +129,11 @@ processors: metric_statements: - context: metric statements: + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx: error_mode: propagate diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml index 717dc69c8b..cf1f13e5a8 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml @@ -33,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml index c78d6dd9c3..64a32fc497 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml @@ -39,9 +39,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType refresh_interval_seconds: 0s receivers: telegraf_cpu: @@ -76,10 +76,10 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_mem - telegraf_swap - telegraf_cpu - telegraf_disk - - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml index 7764f9adad..3ef254456f 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml @@ -43,9 +43,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml index 05e062c29d..3064358227 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml @@ -71,11 +71,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/3446270237 - - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 + - telegraf_win_perf_counters/3446270237 + - telegraf_win_perf_counters/3762679655 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml index ca760d1f70..8a3188bcd1 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml @@ -33,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s @@ -78,11 +78,11 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/3446270237 + - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - - telegraf_win_perf_counters/3446270237 - - telegraf_win_perf_counters/3762679655 telemetry: logs: development: false diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 1a43a1d0a4..940c3d42b6 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -35,7 +35,7 @@ type translator struct { operations []string isUsageDataEnabled bool factory extension.Factory - statuscodeonly bool + statuscodeonly *bool } var _ common.Translator[component.Config] = (*translator)(nil) @@ -46,7 +46,7 @@ func NewTranslatorWithStatusCode(name component.DataType, operations []string, s operations: operations, factory: agenthealth.NewFactory(), isUsageDataEnabled: envconfig.IsUsageDataEnabled(), - statuscodeonly: statuscodeonly, + statuscodeonly: &statuscodeonly, } } @@ -56,7 +56,7 @@ func NewTranslator(name component.DataType, operations []string) common.Translat operations: operations, factory: agenthealth.NewFactory(), isUsageDataEnabled: envconfig.IsUsageDataEnabled(), - statuscodeonly: false, + statuscodeonly: nil, } } @@ -72,10 +72,7 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData } cfg.StatusCodeOnly = t.statuscodeonly - if t.statuscodeonly { - //cfg.StatusCode = agent.StatusCodeConfig{ - // Operations: agent.StatusCodeOperations, - //} + if t.statuscodeonly != nil && *t.statuscodeonly { return cfg, nil } cfg.Stats = agent.StatsConfig{ @@ -85,9 +82,5 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { agent.FlagRegionType: translateagent.Global_Config.RegionType, }, } - //cfg.StatusCode = agent.StatusCodeConfig{ - // Operations: agent.StatusCodeOperations, - //} //Do we need to add anything to otel config? - return cfg, nil } diff --git a/translator/translate/otel/pipeline/host/translator.go b/translator/translate/otel/pipeline/host/translator.go index 17793b23da..641ed43e93 100644 --- a/translator/translate/otel/pipeline/host/translator.go +++ b/translator/translate/otel/pipeline/host/translator.go @@ -90,7 +90,6 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators, if t.Destination() != common.CloudWatchLogsKey { if conf.IsSet(common.ConfigKey(common.MetricsKey, common.AppendDimensionsKey)) { log.Printf("D! ec2tagger processor required because append_dimensions is set") - translators.Extensions.Set(agenthealth.NewTranslator(component.DataTypeMetrics, []string{"*"})) //not sure if we need to change this?????? translators.Processors.Set(ec2taggerprocessor.NewTranslator()) } From a5ba52e257170beb03567b21ef40fd398c3d3712 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 17:58:00 -0500 Subject: [PATCH 30/48] fixing yamls --- internal/tls/testdata/server.key | 52 +++--- .../sampleConfig/advanced_config_darwin.yaml | 1 - .../sampleConfig/advanced_config_linux.yaml | 7 +- .../sampleConfig/advanced_config_windows.yaml | 5 +- .../sampleConfig/amp_config_linux.yaml | 5 +- .../appsignals_and_ecs_config.yaml | 2 - .../appsignals_and_eks_config.yaml | 2 - .../appsignals_and_k8s_config.yaml | 2 - .../appsignals_fallback_and_eks_config.yaml | 2 - .../appsignals_over_fallback_config.yaml | 2 - .../sampleConfig/base_appsignals_config.yaml | 2 - .../base_appsignals_fallback_config.yaml | 2 - .../base_container_insights_config.yaml | 1 - .../sampleConfig/basic_config_linux.yaml | 3 +- .../sampleConfig/basic_config_windows.yaml | 3 +- .../sampleConfig/collectd_config_linux.yaml | 1 - .../sampleConfig/compass_linux_config.yaml | 3 +- .../sampleConfig/complete_darwin_config.yaml | 9 +- .../sampleConfig/complete_linux_config.yaml | 17 +- .../sampleConfig/config_with_env.yaml | 1 - .../sampleConfig/container_insights_jmx.yaml | 1 - .../sampleConfig/delta_config_linux.yaml | 1 - .../sampleConfig/delta_net_config_linux.yaml | 1 - .../sampleConfig/drop_origin_linux.yaml | 3 +- .../emf_and_kubernetes_config.yaml | 1 - .../emf_and_kubernetes_with_gpu_config.yaml | 149 +++++++++--------- .../ignore_append_dimensions.yaml | 1 - .../sampleConfig/invalid_input_linux.yaml | 1 - .../sampleConfig/jmx_config_linux.yaml | 9 +- .../sampleConfig/jmx_eks_config_linux.yaml | 1 - .../kubernetes_on_prem_config.yaml | 1 - .../sampleConfig/log_ecs_metric_only.yaml | 1 - .../logs_and_kubernetes_config.yaml | 1 - .../otlp_metrics_cloudwatchlogs_config.yaml | 1 - .../sampleConfig/otlp_metrics_config.yaml | 3 +- .../procstat_memory_swap_config.yaml | 1 - .../sampleConfig/prometheus_config_linux.yaml | 1 - .../prometheus_config_windows.yaml | 1 - .../sampleConfig/standard_config_linux.yaml | 5 +- ...ndard_config_linux_with_common_config.yaml | 1 - .../sampleConfig/standard_config_windows.yaml | 5 +- ...ard_config_windows_with_common_config.yaml | 3 +- .../sampleConfig/statsd_config_linux.yaml | 1 - .../sampleConfig/statsd_config_windows.yaml | 1 - .../sampleConfig/statsd_ecs_config.yaml | 1 - .../sampleConfig/statsd_eks_config.yaml | 1 - .../sampleConfig/trace_config_linux.yaml | 1 - .../sampleConfig/trace_config_windows.yaml | 1 - translator/tocwconfig/tocwconfig_test.go | 2 +- 49 files changed, 132 insertions(+), 190 deletions(-) diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index f5856375b7..0efcb40bb3 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC63DhKeQNsXJWO -z1BHBSlZ3hX7MZ2li9j/Msxq/5knkiCeNs0C+M+/u5MjCX5Ib0r/L9HlYEQF1kzM -Qgai7xKM5Gae3hI81ggLjri4vmhQN6SBM/ygauOR4lzi2gajk2CE2wSNvF4bFsye -o9FgCGWVjmPEKDdkJcsWrjkRlr7uyqbxtQF3b6D5egsgo2Uo+eoXLlONpMBYN49K -oTL1mTXMS2Men1ZRU9o8JhedadyHJMFo2TrF4/RAEuhkrmbpYGy6ap7ppNqzRz4u -nhRSbOqadc4PEidbFg0Z9si+a1jgzqb4i7sGhsHLiuHXSvlIexEFOPO6XclqFqjO -Vyv4wbsdAgMBAAECggEBALEpD3mUKCm50dYXOf5Lp3vbsq14ygVlhLPXvrWHZfZ9 -dc1rGY5Cxfz7YzHp0z/rvIgbF37IeVWrax6RTud1kPnhpmXjGBlztyb2Bq6pYA8F -4kLZPh/9l4r9uaEeowK9PNpZKIUU3YgDYrbZjC3naCCWYoJcur+JkXYMcnD5okaU -X0pyb+sg/o28I90GzkMc8Ule3N2ipUKN6Xu0e7I0McOujjxsxrVhxwMPV7shss6z -DQSErHpxO2ESVcdAVDU2g/DfQEcm6o9omTyRybggsuNrBbgdFcoQbc4wzfQNsY3T -MKkEAwAsvVjM6/tuEBsWrd2zFHNFZg+/v9dCyqL688UCgYEA1nsNFaOTtxheRjQJ -/KhCWmwYz11BomKlmSyv+Ctc/6nmvPE5jZ90cjtCfG/ArlLt+isPbKbCKYbIVgxb -jlaZo/ZzpfVCRvoS+/pLIUs0Wkf9OtkCYENnkcBpeqKVJcWaR7nb/nASYMCcNB5y -00jQnsx+MUokj3TcHolsjK/OPDsCgY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o2u2EXEqUubVYxaUeYrpPAMiNzGNgAU+avTvvJaBAoGBAKely84irwZicpex79T/ +KYV3VOMYs6wETNSLdKkR9G2WEI4OsEw0qGm9pZXzS6lKOSXxW6fOzwI0/vhnmT4O +hBxeR+PriPFqD80ASXeVeVOEjMXQEjZ8Po+FfUvVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml index 6e0e541e10..7ec8a1544a 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml index e3c3b5746d..08e123680c 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -39,9 +38,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -89,13 +88,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_netstat + - telegraf_swap - telegraf_ethtool - telegraf_nvidia_smi - telegraf_cpu - telegraf_disk - telegraf_mem - - telegraf_netstat - - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml index 3bfe0532fa..2db1d4f417 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -82,13 +81,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/1492679118 + - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/2073218482 - telegraf_win_perf_counters/2039663244 - telegraf_win_perf_counters/4283769065 - - telegraf_win_perf_counters/1492679118 - - telegraf_win_perf_counters/3610923661 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml index a4e2973b1e..09d1eb1632 100644 --- a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml @@ -64,11 +64,10 @@ exporters: write_buffer_size: 524288 extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: - - '*' + - PutMetricData usage_flags: mode: EC2 region_type: ACJ @@ -92,9 +91,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s rollup: diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml index 8e083a6072..bd2ae3a253 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml @@ -128,7 +128,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -137,7 +136,6 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml index 609149736b..f9306ebb3f 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml @@ -267,7 +267,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -276,7 +275,6 @@ extensions: mode: EKS region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml index e82573525c..7691642f51 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml @@ -268,7 +268,6 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -277,7 +276,6 @@ extensions: mode: K8E region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml index 609149736b..f9306ebb3f 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml @@ -267,7 +267,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -276,7 +275,6 @@ extensions: mode: EKS region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml index 609149736b..f9306ebb3f 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml @@ -267,7 +267,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -276,7 +275,6 @@ extensions: mode: EKS region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml index 23b90150be..0393281fb9 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml @@ -136,7 +136,6 @@ exporters: verbosity: Detailed extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -145,7 +144,6 @@ extensions: mode: OP region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml index dfe5442a0d..5cffc25e9d 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml @@ -132,7 +132,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -141,7 +140,6 @@ extensions: mode: OP region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index 5c333f6a0e..8a910d80ee 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -141,7 +141,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml index f140013c65..a77f558584 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -29,9 +28,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml index 3233c41868..01d9efe369 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -29,9 +28,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml index c77a8271c3..f01c8c504e 100644 --- a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml index d8f54142a4..d8f4365eaf 100644 --- a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml @@ -21,7 +21,6 @@ exporters: - [] extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -41,9 +40,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index 2e1f065a84..ad049493b3 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -68,7 +68,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -77,7 +76,6 @@ extensions: mode: EC2 region_type: ACJ agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -86,7 +84,6 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -279,11 +276,11 @@ service: - transform receivers: - telegraf_cpu - - telegraf_swap - telegraf_processes - - telegraf_procstat/1917393364 - - telegraf_netstat + - telegraf_swap - telegraf_mem + - telegraf_netstat + - telegraf_procstat/1917393364 - telegraf_disk metrics/hostCustomMetrics: exporters: diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index e079fec603..3ac881c155 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -73,7 +73,6 @@ exporters: include_metadata: true extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -82,7 +81,6 @@ extensions: mode: EC2 region_type: ACJ agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -91,7 +89,6 @@ extensions: mode: EC2 region_type: ACJ agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -141,9 +138,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s filter/jmx/0: @@ -192,11 +189,11 @@ processors: metric_statements: - context: metric statements: + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx/0: error_mode: propagate @@ -384,13 +381,13 @@ service: - ec2tagger - transform receivers: + - telegraf_processes - telegraf_cpu + - telegraf_swap - telegraf_disk - - telegraf_processes - telegraf_netstat - - telegraf_procstat/1917393364 - - telegraf_swap - telegraf_mem + - telegraf_procstat/1917393364 metrics/hostCustomMetrics/cloudwatch: exporters: - awscloudwatch @@ -410,8 +407,8 @@ service: - ec2tagger - transform receivers: - - telegraf_diskio - telegraf_net + - telegraf_diskio metrics/jmx/cloudwatch/0: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/config_with_env.yaml b/translator/tocwconfig/sampleConfig/config_with_env.yaml index 1dbc4af2a9..c776e99d76 100644 --- a/translator/tocwconfig/sampleConfig/config_with_env.yaml +++ b/translator/tocwconfig/sampleConfig/config_with_env.yaml @@ -32,7 +32,6 @@ exporters: queue_size: 1000 extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml index 68bdd27edb..aa14bdf130 100644 --- a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml +++ b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml @@ -175,7 +175,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml index 31be834b11..05df69691c 100644 --- a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml index c832e86571..b0ebe0edb1 100644 --- a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml index 9a05163bed..8c19d0bee1 100644 --- a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml +++ b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml @@ -15,7 +15,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -34,9 +33,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 1 refresh_interval_seconds: 0s transform: diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index d4b5e54ae3..f2e17099c6 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -391,7 +391,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index 410baa98a0..c236a12b33 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -649,7 +649,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -684,48 +683,6 @@ processors: match_type: regexp new_name: apiserver_request_total_5xx submatch_case: "" - - action: insert - aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE - match_type: "" - new_name: container_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: ContainerGPU - submatch_case: "" - - action: insert - aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE - match_type: "" - new_name: pod_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: PodGPU - submatch_case: "" - - action: insert - aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE - match_type: "" - new_name: node_gpu_power_draw - operations: - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Type - new_value: NodeGPU - submatch_case: "" - action: insert aggregation_type: "" include: DCGM_FI_DEV_GPU_UTIL @@ -999,12 +956,47 @@ processors: new_label: Type new_value: NodeGPU submatch_case: "" - - action: update + - action: insert aggregation_type: "" - include: execution_errors_total + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: neuron_execution_errors - operations: [] + new_name: container_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: ContainerGPU + submatch_case: "" + - action: insert + aggregation_type: "" + include: DCGM_FI_DEV_POWER_USAGE + match_type: "" + new_name: pod_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: PodGPU + submatch_case: "" + - action: insert + aggregation_type: "" + include: DCGM_FI_DEV_POWER_USAGE + match_type: "" + new_name: node_gpu_power_draw + operations: + - action: add_label + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + new_label: Type + new_value: NodeGPU submatch_case: "" - action: update aggregation_type: "" @@ -1015,9 +1007,9 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_code + include: neuron_runtime_memory_used_bytes match_type: "" - new_name: neuroncore_memory_usage_model_code + new_name: neurondevice_runtime_memory_used_bytes operations: [] submatch_case: "" - action: update @@ -1029,72 +1021,79 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_utilization_ratio + include: neuroncore_memory_usage_tensors match_type: "" - new_name: neuroncore_utilization - operations: - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 100 - label: "" - label_value: "" - new_label: "" - new_value: "" + new_name: neuroncore_memory_usage_tensors + operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_latency_seconds + include: instance_info match_type: "" - new_name: neuron_execution_latency + new_name: instance_info operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_runtime_memory_used_bytes + include: neuron_hardware match_type: "" - new_name: neurondevice_runtime_memory_used_bytes + new_name: neuron_hardware operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_constants + include: hardware_ecc_events_total match_type: "" - new_name: neuroncore_memory_usage_constants + new_name: neurondevice_hw_ecc_events operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_runtime_memory + include: execution_errors_total match_type: "" - new_name: neuroncore_memory_usage_runtime_memory + new_name: neuron_execution_errors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_tensors + include: neuroncore_memory_usage_model_code match_type: "" - new_name: neuroncore_memory_usage_tensors + new_name: neuroncore_memory_usage_model_code operations: [] submatch_case: "" - action: update aggregation_type: "" - include: instance_info + include: neuroncore_memory_usage_runtime_memory match_type: "" - new_name: instance_info + new_name: neuroncore_memory_usage_runtime_memory operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_hardware + include: neuroncore_utilization_ratio match_type: "" - new_name: neuron_hardware + new_name: neuroncore_utilization + operations: + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" + submatch_case: "" + - action: update + aggregation_type: "" + include: execution_latency_seconds + match_type: "" + new_name: neuron_execution_latency operations: [] submatch_case: "" - action: update aggregation_type: "" - include: hardware_ecc_events_total + include: neuroncore_memory_usage_constants match_type: "" - new_name: neurondevice_hw_ecc_events + new_name: neuroncore_memory_usage_constants operations: [] submatch_case: "" receivers: diff --git a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml index 5d4e3b492d..597ae1ccf7 100644 --- a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml +++ b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml index f140013c65..9a349c682e 100644 --- a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml +++ b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml index b135ef9ba2..fa7fd7e62f 100644 --- a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml @@ -58,7 +58,6 @@ exporters: write_buffer_size: 524288 extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -129,11 +128,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx: error_mode: propagate @@ -176,8 +175,8 @@ service: - transform - batch/host/amp receivers: - - telegraf_cpu - telegraf_disk + - telegraf_cpu metrics/host/cloudwatch: exporters: - awscloudwatch @@ -185,8 +184,8 @@ service: - awsentity/resource - transform receivers: - - telegraf_cpu - telegraf_disk + - telegraf_cpu metrics/jmx/amp: exporters: - prometheusremotewrite/amp diff --git a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml index 3b404f215b..c0ec7df581 100644 --- a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml @@ -55,7 +55,6 @@ exporters: write_buffer_size: 524288 extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index e930254814..9eb61610ae 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -358,7 +358,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml index db4a93c4ee..3943981aa6 100644 --- a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml +++ b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml @@ -90,7 +90,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 41fec32690..266b1a4959 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -387,7 +387,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml index 8325c25842..3b03def357 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml @@ -30,7 +30,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml index cf1f13e5a8..5ee9d0b9a7 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -33,9 +32,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml index c8fd0f01d4..f811c89411 100644 --- a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml +++ b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml @@ -12,7 +12,6 @@ exporters: shared_credential_file: fake-path extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml index 693c2dc26a..ce4ad17041 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml @@ -70,7 +70,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml index 70a94910b9..2a47f34ae3 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml @@ -52,7 +52,6 @@ exporters: version: "0" extensions: agenthealth/logs: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml index 64a32fc497..6160b8d27c 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -76,10 +75,10 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - - telegraf_swap - telegraf_cpu - telegraf_disk + - telegraf_mem + - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml index 3ef254456f..dba28bea71 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml @@ -12,7 +12,6 @@ exporters: shared_credential_file: fake-path extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml index 3064358227..b21170012f 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -29,9 +28,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType refresh_interval_seconds: 0s receivers: telegraf_win_perf_counters/1492679118: @@ -71,11 +70,11 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - - telegraf_win_perf_counters/3762679655 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml index 8a3188bcd1..4b47c80f3c 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml @@ -12,7 +12,6 @@ exporters: shared_credential_file: fake-path extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: @@ -78,11 +77,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 + - telegraf_win_perf_counters/3446270237 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml index 401a8c27f2..9bbfe327b6 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml index 35e786e5dc..477bf89526 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml index 0220d83992..4190308c25 100644 --- a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml index b0fbeb16d6..4539d123c6 100644 --- a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml @@ -10,7 +10,6 @@ exporters: enabled: true extensions: agenthealth/metrics: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml index cec74b77ed..11aceb51c8 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml @@ -23,7 +23,6 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml index 060e16d3a5..4ab7efc002 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml @@ -23,7 +23,6 @@ exporters: transit_spans_in_otlp_format: true extensions: agenthealth/traces: - is_status_code_only: false is_usage_data_enabled: true stats: operations: diff --git a/translator/tocwconfig/tocwconfig_test.go b/translator/tocwconfig/tocwconfig_test.go index e542a3ef9e..218e2d3c13 100644 --- a/translator/tocwconfig/tocwconfig_test.go +++ b/translator/tocwconfig/tocwconfig_test.go @@ -774,7 +774,7 @@ func verifyToYamlTranslation(t *testing.T, input interface{}, expectedYamlFilePa require.NoError(t, err) yamlStr := toyamlconfig.ToYamlConfig(yamlConfig) require.NoError(t, yaml.Unmarshal([]byte(yamlStr), &actual)) - assert.NoError(t, os.WriteFile(expectedYamlFilePath, []byte(yamlStr), 0644)) // useful for regenerating YAML + //assert.NoError(t, os.WriteFile(expectedYamlFilePath, []byte(yamlStr), 0644)) // useful for regenerating YAML opt := cmpopts.SortSlices(func(x, y interface{}) bool { return pretty.Sprint(x) < pretty.Sprint(y) From f3c8d46cfc467f1d0f45a0ae3b5e9c716eacff98 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 18:01:43 -0500 Subject: [PATCH 31/48] fixing yamls --- internal/tls/testdata/server.crt | 44 +- internal/tls/testdata/server.key | 52 +- internal/tls/testdata/tls-ca.crt | 50 +- .../sampleConfig/advanced_config_darwin.yaml | 6 +- .../sampleConfig/advanced_config_linux.yaml | 8 +- .../sampleConfig/advanced_config_windows.yaml | 4 +- .../sampleConfig/amp_config_linux.yaml | 326 +-- .../appsignals_and_ecs_config.yaml | 1392 ++++----- .../appsignals_and_eks_config.yaml | 1161 ++++---- .../appsignals_and_k8s_config.yaml | 1165 ++++---- .../appsignals_fallback_and_eks_config.yaml | 2589 ++++++++--------- .../appsignals_over_fallback_config.yaml | 2589 ++++++++--------- .../sampleConfig/base_appsignals_config.yaml | 1153 ++++---- .../base_appsignals_fallback_config.yaml | 2175 +++++++------- .../base_container_insights_config.yaml | 4 +- .../sampleConfig/basic_config_linux.yaml | 2 +- .../sampleConfig/basic_config_windows.yaml | 4 +- .../sampleConfig/collectd_config_linux.yaml | 2 +- .../sampleConfig/compass_linux_config.yaml | 4 +- .../sampleConfig/complete_darwin_config.yaml | 22 +- .../sampleConfig/complete_linux_config.yaml | 38 +- .../sampleConfig/container_insights_jmx.yaml | 4 +- .../sampleConfig/delta_config_linux.yaml | 14 +- .../sampleConfig/delta_net_config_linux.yaml | 4 +- .../sampleConfig/drop_origin_linux.yaml | 12 +- .../emf_and_kubernetes_config.yaml | 2 +- .../emf_and_kubernetes_with_gpu_config.yaml | 220 +- .../ignore_append_dimensions.yaml | 4 +- .../sampleConfig/invalid_input_linux.yaml | 2 +- .../sampleConfig/jmx_config_linux.yaml | 10 +- .../sampleConfig/jmx_eks_config_linux.yaml | 6 +- .../kubernetes_on_prem_config.yaml | 4 +- .../tocwconfig/sampleConfig/log_filter.yaml | 64 +- .../sampleConfig/log_only_config_windows.yaml | 64 +- .../logs_and_kubernetes_config.yaml | 5 +- .../sampleConfig/no_skip_log_timestamp.yaml | 64 +- .../no_skip_log_timestamp_windows.yaml | 64 +- .../otlp_metrics_cloudwatchlogs_config.yaml | 242 +- .../sampleConfig/otlp_metrics_config.yaml | 210 +- .../procstat_memory_swap_config.yaml | 114 +- .../sampleConfig/skip_log_timestamp.yaml | 64 +- .../skip_log_timestamp_default.yaml | 64 +- .../skip_log_timestamp_default_windows.yaml | 64 +- .../skip_log_timestamp_windows.yaml | 64 +- .../sampleConfig/standard_config_linux.yaml | 2 +- ...ndard_config_linux_with_common_config.yaml | 4 +- .../sampleConfig/standard_config_windows.yaml | 4 +- ...ard_config_windows_with_common_config.yaml | 2 +- .../sampleConfig/statsd_config_linux.yaml | 2 +- .../sampleConfig/statsd_config_windows.yaml | 2 +- .../sampleConfig/statsd_ecs_config.yaml | 92 +- .../sampleConfig/statsd_eks_config.yaml | 114 +- .../windows_eventlog_only_config.yaml | 18 +- translator/tocwconfig/tocwconfig_test.go | 3 +- 54 files changed, 7160 insertions(+), 7238 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..32180f9832 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTAyMjIyMzYzNloXDTI0MTAyMjIzMzYz -NlowFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAP3MeHLv7sragkzD8iOj75YCJvOoys4Iy+EVwZhLAdtx+K89IOJr -6EKknoI0/FZowg5xuz4sE3sK8uQVAjtN0u4Mu6oQm94uSB5RxGvkBV6vn+3JxUdC -+fj+KiTg0x+pEoDxVXSrL3gF2ZtvfNdC05+FCk39pdEPe5tbnh+IPtcXSqWmtWEB -LiHPhSU0HN5JWsfQZ2VkB8rFStQ8CwFG0DW9i6GSVsN1zmmzLQdVPAyP4Uzy8844 -/ceZsmlkIe6uk3BiRRNThUcJKlFJJroCBJ8y7AJA8s3teLWskRLik+0xintked6z -fMaQRgzOSPDc062QTODHB2IkShVZAeLh7OcCAwEAAaNnMGUwDgYDVR0PAQH/BAQD -AgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgw -FoAUhscCtqKgl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5y2MeBTPyBuMt7ZsMrL5Tan6JqKcg6xG95uOEIWyeO3sN4d9j -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..ec71f82f23 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7XF0qlprVhAS4hz4UlNBzeSVrH0GdlZAfKxUrU -PAsBRtA1vYuhklbDdc5psy0HVTwMj+FM8vPOOP3HmbJpZCHurpNwYkUTU4VHCSpR -SSa6AgSfMuwCQPLN7Xi1rJES4pPtMYp7ZHnes3zGkEYMzkjw3NOtkEzgxwdiJEoV -WQHi4eznAgMBAAECggEAGv7z1O32jXc+ouG40NewNVmXQRW0NMQ0w4Vn6UYZNXlj -BWjQJaVquCQAhEMUkDBma9jnHM7dZ5obie0+Joa5p/6Mu6M2oSR1IVx7Myq284Jk -1Ys/w7u5ESYf33pWmqiGQlbpSxamXvLoWaM7OT5veilRlkgjqiAmerj9EceRP5mR -aheVE5ctY5oZmdnvA9OcN6B8Oxk59EWEOECs8qAF/ChYfC8pWKOp4U0RILQ/9jXD -lu4p0C2XyadrJReer3whudUADWa/WSxgVCrx85/g/RTKs38KTPy7W4g3bv8KBRhc -bjLzoYTl6esRAi8nMG5Fc/85t07hkVv+j5a1NccxgQKBgQD/y/tdH90C8CrAn9y5 -mgr+1QcqJeJWaBpNf+yBqtLbybl6uLY2OzbZtzllU+TDUVlKZB36t2GnG6EIRUcd -WTHUVq8zEIRtDBa12SZlJ08FrNFyKfBByehEO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00Zfpu1zRAK6UfQW6JrxwmYkXTcu/+jfniQx5oFWZam97JXVygm4QR0GMm5V +PV54DgVn3Dp+257eF8iXY7WTwwMwsD8AxcTgERgVAoGBAMeAIbkzTbKePfpb55es +GHd4xtchqgPUtG2ZusK/YosIPoyKkyuOjdGPcWzZzX7PWFo+qwv3u+Uxy06R2cKs +gUk+KIWFyiUJn9snOgdV3gTWWDYL+eTVk5k18MJPaMpkVBMn2shzvZZ4ZbMSgE4P +kb9yslpf/18DdC8Q0/wzBxlb -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..a68c13893f 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTAyMjIyMzYzOFoXDTM0MTAyMjIyMzYzOFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJrhBEDtGS+b -WAVvkFJuQAkDbCCToy39eJ+51ZS/wA1yuVde8JvtX95dZC0STNm7GnxfIwH8tOut -gc82vz2Bim2K1N9uzBDu6flGWXpzXZSSuMAj1q8MRhEs1OpfbLuqxMs/TAbGYGqa -6FPlUWCwMZvpiRpV+hGxRIp9OsAYn/oVUvuACXnADEwBUYnGL3c9FYPn+kkjpsfH -vaH5kY8uTpKNIbmerYBCIt7X0QXcLOxk2CdnapKuIjaTML8og1/rMPbRsnGvIebh -FZsA60QnhuNiL6MowdJn17/Stl6Rs7cNV5zq3/WmaiipOoTcrKIMgA5ci23A69Pz -0WRfomoFsstRWHhimGrKrT5ewznEitvnWWxfiblmy21LTTJf6nrf7cD1B7Xlrfq+ -BORuHwSxyTapXw0HKSYPwjiSiijywWInS3QR3b5uvpyFy8rGfXI2PSTpn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4o+LeHc8akSql4lP/qPUP3n5fkRNOxr5VTKf6iQ +cYlggky4nxzY2CSgCNYm+WrzgXJKa7c1v3VPU1lwesJT3m2Xyj989DJbTTW30pfi +4CnVTRBCKXZU/p9Ce6W+6CcVb5D91dCXPDwe/CvbuITaGHnLZfB9fjiXKaCfMdjn +RIiR0FUGwj7f/2Wp/j/N4AJVdFaLLeGSFGrcOw/Lv7b8ssDdSFX/AU8f3s0TtabI +mpgqk5L0w9smzm1gwydp0eK4PL9kTZz+jt1ZXYzmDEFHMShTCle6deWyXtHuKpdF +QKeT66FT99DFALP0TPASn0EgBH+zPBWK6Amzyt/C2Z0HY1Yy8PZKCT5tN+KkBWYM +pi625MqtH4lxyZkOFpVHkDBTBOneMMHCGF0xDRuDi/X3iMxLNtRkixSdQ5uSsiYy +IuWfEV7ZzrnRHQenJ8Ghf3/8AXLljPYQ6po0xNa0CWKS/vLLMMrNZxTs86eInUkn +ZoPzbAxVEO/vEZ7F8j6DSdsA9QTju6qpNxI= -----END CERTIFICATE----- diff --git a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml index 7ec8a1544a..64d81aaa17 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_darwin.yaml @@ -38,9 +38,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: @@ -80,11 +80,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_cpu - telegraf_disk - - telegraf_mem - telegraf_netstat - telegraf_swap + - telegraf_cpu + - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml index 08e123680c..b202e49fd9 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_linux.yaml @@ -23,7 +23,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict @@ -88,13 +88,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_cpu + - telegraf_disk + - telegraf_mem - telegraf_netstat - telegraf_swap - telegraf_ethtool - telegraf_nvidia_smi - - telegraf_cpu - - telegraf_disk - - telegraf_mem metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml index 2db1d4f417..0b7068462e 100644 --- a/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/advanced_config_windows.yaml @@ -81,13 +81,13 @@ service: - awsentity/resource - ec2tagger receivers: + - telegraf_win_perf_counters/2039663244 + - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/2073218482 - - telegraf_win_perf_counters/2039663244 - - telegraf_win_perf_counters/4283769065 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml index 09d1eb1632..d32905f7ca 100644 --- a/translator/tocwconfig/sampleConfig/amp_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/amp_config_linux.yaml @@ -1,168 +1,168 @@ exporters: - awscloudwatch: - drop_original_metrics: - CPU_USAGE_IDLE: true - cpu_time_active: true - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true - rollup_dimensions: - - - ImageId - - - InstanceId - - InstanceType - - - d1 - - [] - prometheusremotewrite/amp: - add_metric_suffixes: true - auth: - authenticator: sigv4auth - compression: "" - disable_keep_alives: false - endpoint: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-12345/api/v1/remote_write - export_created_metric: - enabled: false - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - max_batch_size_bytes: 3000000 - namespace: "" - proxy_url: "" - read_buffer_size: 0 - remote_write_queue: - enabled: true - num_consumers: 5 - queue_size: 10000 - resource_to_telemetry_conversion: - clear_after_copy: true - enabled: true - retry_on_failure: - enabled: true - initial_interval: 50ms - max_elapsed_time: 5m0s - max_interval: 30s - multiplier: 1.5 - randomization_factor: 0.5 - send_metadata: false - target_info: - enabled: true - timeout: 5s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - write_buffer_size: 524288 + awscloudwatch: + drop_original_metrics: + CPU_USAGE_IDLE: true + cpu_time_active: true + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true + rollup_dimensions: + - - ImageId + - - InstanceId + - InstanceType + - - d1 + - [ ] + prometheusremotewrite/amp: + add_metric_suffixes: true + auth: + authenticator: sigv4auth + compression: "" + disable_keep_alives: false + endpoint: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-12345/api/v1/remote_write + export_created_metric: + enabled: false + http2_ping_timeout: 0s + http2_read_idle_timeout: 0s + max_batch_size_bytes: 3000000 + namespace: "" + proxy_url: "" + read_buffer_size: 0 + remote_write_queue: + enabled: true + num_consumers: 5 + queue_size: 10000 + resource_to_telemetry_conversion: + clear_after_copy: true + enabled: true + retry_on_failure: + enabled: true + initial_interval: 50ms + randomization_factor: 0.5 + multiplier: 1.5 + max_interval: 30s + max_elapsed_time: 5m0s + send_metadata: false + target_info: + enabled: true + timeout: 5s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: 0s + server_name_override: "" + write_buffer_size: 524288 extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 - sigv4auth: - assume_role: - sts_region: us-west-2 - region: us-west-2 + agenthealth/metrics: + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 + sigv4auth: + assume_role: + sts_region: us-west-2 + region: us-west-2 processors: - awsentity/resource: - entity_type: Resource - platform: ec2 - batch/host/amp: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 1m0s - ec2tagger: - ec2_instance_tag_keys: - - AutoScalingGroupName - ec2_metadata_tags: - - ImageId - - InstanceId - - InstanceType - imds_retries: 1 - refresh_interval_seconds: 0s - rollup: - attribute_groups: - - - ImageId - - - InstanceId - - InstanceType - - - d1 - - [] - cache_size: 1000 - drop_original: - - CPU_USAGE_IDLE - - cpu_time_active - transform: - error_mode: propagate - flatten_data: false - log_statements: [] - metric_statements: - - context: metric - statements: - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" - trace_statements: [] + awsentity/resource: + entity_type: Resource + platform: ec2 + batch/host/amp: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 1m0s + ec2tagger: + ec2_instance_tag_keys: + - AutoScalingGroupName + ec2_metadata_tags: + - InstanceType + - ImageId + - InstanceId + imds_retries: 1 + refresh_interval_seconds: 0s + rollup: + attribute_groups: + - - ImageId + - - InstanceId + - InstanceType + - - d1 + - [ ] + cache_size: 1000 + drop_original: + - CPU_USAGE_IDLE + - cpu_time_active + transform: + error_mode: propagate + flatten_data: false + log_statements: [ ] + metric_statements: + - context: metric + statements: + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" + trace_statements: [ ] receivers: - telegraf_cpu: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_cpu: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - sigv4auth - - entitystore - pipelines: - metrics/host/amp: - exporters: - - prometheusremotewrite/amp - processors: - - ec2tagger - - transform - - rollup - - batch/host/amp - receivers: - - telegraf_cpu - metrics/host/cloudwatch: - exporters: - - awscloudwatch - processors: - - awsentity/resource - - ec2tagger - - transform - receivers: - - telegraf_cpu - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - sigv4auth + - entitystore + pipelines: + metrics/host/cloudwatch: + exporters: + - awscloudwatch + processors: + - awsentity/resource + - ec2tagger + - transform + receivers: + - telegraf_cpu + metrics/host/amp: + exporters: + - prometheusremotewrite/amp + processors: + - ec2tagger + - transform + - rollup + - batch/host/amp + receivers: + - telegraf_cpu + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml index bd2ae3a253..a97027c87f 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_ecs_config.yaml @@ -1,106 +1,106 @@ exporters: awsemf/application_signals: - certificate_file_path: "" + certificate_file_path: '' detailed_metrics: false dimension_rollup_option: NoDimensionRollup disable_metric_extraction: false eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint + endpoint: 'https://fake_endpoint' enhanced_container_insights: false imds_retries: 1 local_mode: false log_group_name: /aws/application-signals/data log_retention: 0 - log_stream_name: "" + log_stream_name: '' max_retries: 2 metric_declarations: - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service + - - Environment + - Operation + - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; metric_name_selectors: - - Latency - - Fault - - Error + - Latency + - Fault + - Error - dimensions: - - - Environment - - Service + - - Environment + - Service label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; + - label_names: + - Telemetry.Source + regex: ^RuntimeMetric$ + separator: ; metric_name_selectors: - - ^.*$ + - ^.*$ middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false num_workers: 8 output_destination: cloudwatch - profile: "" - proxy_address: "" + profile: '' + proxy_address: '' region: us-east-1 request_timeout_seconds: 30 - resource_arn: "" + resource_arn: '' resource_to_telemetry_conversion: enabled: false retain_initial_value_of_delta_metric: false - role_arn: "" - version: "1" + role_arn: '' + version: '1' awsxray/application_signals: - certificate_file_path: "" - endpoint: "" + certificate_file_path: '' + endpoint: '' imds_retries: 1 index_all_attributes: false indexed_attributes: @@ -117,12 +117,12 @@ exporters: middleware: agenthealth/traces no_verify_ssl: false num_workers: 8 - profile: "" - proxy_address: "" + profile: '' + proxy_address: '' region: us-east-1 request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" + resource_arn: '' + role_arn: '' telemetry: enabled: true include_metadata: true @@ -144,18 +144,18 @@ extensions: mode: EC2 region_type: ACJ awsproxy/application_signals: - aws_endpoint: "" - certificate_file_path: "" + aws_endpoint: '' dialer: timeout: 0s - endpoint: 0.0.0.0:2000 + certificate_file_path: '' + endpoint: '0.0.0.0:2000' imds_retries: 1 local_mode: false - profile: "" - proxy_address: "" + profile: '' + proxy_address: '' region: us-east-1 - role_arn: "" - service_name: "" + service_name: '' + role_arn: '' processors: awsapplicationsignals: limiter: @@ -165,584 +165,8 @@ processors: log_dropped_metrics: true rotation_interval: 10m0s resolvers: - - name: "" + - name: '' platform: ecs - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" resourcedetection: aks: resource_attributes: @@ -775,11 +199,11 @@ processors: host.name: enabled: true tags: [] - compression: "" + compression: '' consul: - address: "" - datacenter: "" - namespace: "" + address: '' + datacenter: '' + namespace: '' resource_attributes: cloud.region: enabled: true @@ -787,7 +211,7 @@ processors: enabled: true host.name: enabled: true - token_file: "" + token_file: '' detectors: - env - ecs @@ -820,7 +244,7 @@ processors: host.type: enabled: true tags: - - ^aws:autoscaling:groupName + - '^aws:autoscaling:groupName' ecs: resource_attributes: aws.ecs.cluster.arn: @@ -831,10 +255,10 @@ processors: enabled: false aws.ecs.task.family: enabled: false - aws.ecs.task.id: - enabled: false aws.ecs.task.revision: enabled: false + aws.ecs.task.id: + enabled: false aws.log.group.arns: enabled: false aws.log.group.names: @@ -873,7 +297,7 @@ processors: enabled: true service.version: enabled: true - endpoint: "" + endpoint: '' gcp: resource_attributes: cloud.account.id: @@ -933,9 +357,9 @@ processors: idle_conn_timeout: 1m30s k8snode: auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" + context: '' + kube_config_path: '' + node_from_env_var: '' resource_attributes: k8s.node.name: enabled: true @@ -963,7 +387,7 @@ processors: enabled: true max_idle_conns: 100 openshift: - address: "" + address: '' resource_attributes: cloud.platform: enabled: true @@ -974,19 +398,19 @@ processors: k8s.cluster.name: enabled: true tls: - ca_file: "" - cert_file: "" + ca_file: '' + cert_file: '' include_system_ca_certs_pool: false insecure: false insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" + key_file: '' + max_version: '' + min_version: '' reload_interval: 0s - server_name_override: "" - token: "" + server_name_override: '' + token: '' override: true - proxy_url: "" + proxy_url: '' read_buffer_size: 0 system: resource_attributes: @@ -1018,55 +442,631 @@ processors: enabled: true timeout: 2s tls: - ca_file: "" - cert_file: "" + ca_file: '' + cert_file: '' include_system_ca_certs_pool: false insecure: false insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" + key_file: '' + max_version: '' + min_version: '' reload_interval: 0s - server_name_override: "" + server_name_override: '' write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: '' + submatch_case: '' + match_type: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: + name: .*Old\\sGen$ + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: + name: .*Survivor\\sSpace$ + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: + name: .*Eden\\sSpace$ + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: '' + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: '' + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: + name: G1 Old Generation + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: + name: G1 Young Generation + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: + name: G1 Old Generation + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: + name: G1 Young Generation + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: + count: '0' + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: + count: '1' + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: + count: '2' + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: + type: vms + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: + type: rss + match_type: regexp + aggregation_type: '' + submatch_case: '' + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: '' + new_label: '' + label_value: '' + new_value: '' + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: '' + experimental_scale: 0 + label: '' + label_value: '' receivers: otlp/application_signals: protocols: grpc: + endpoint: '0.0.0.0:4315' dialer: timeout: 0s - endpoint: 0.0.0.0:4315 include_metadata: false max_concurrent_streams: 0 max_recv_msg_size_mib: 0 read_buffer_size: 524288 tls: - ca_file: "" + ca_file: '' cert_file: path/to/cert.crt - client_ca_file: "" + client_ca_file: '' client_ca_file_reload: false include_system_ca_certs_pool: false key_file: path/to/key.key - max_version: "" - min_version: "" + max_version: '' + min_version: '' reload_interval: 0s transport: tcp write_buffer_size: 0 http: - endpoint: 0.0.0.0:4316 + endpoint: '0.0.0.0:4316' include_metadata: false logs_url_path: /v1/logs max_request_body_size: 0 metrics_url_path: /v1/metrics tls: - ca_file: "" + ca_file: '' cert_file: path/to/cert.crt - client_ca_file: "" + client_ca_file: '' client_ca_file_reload: false include_system_ca_certs_pool: false key_file: path/to/key.key - max_version: "" - min_version: "" + max_version: '' + min_version: '' reload_interval: 0s traces_url_path: /v1/traces service: @@ -1105,6 +1105,6 @@ service: thereafter: 500 tick: 10s metrics: - address: "" + address: '' level: None traces: {} diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml index f9306ebb3f..1d71ffb03b 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_eks_config.yaml @@ -104,15 +104,14 @@ exporters: - Fault - Error - dimensions: - - - Environment - - Service + - [ Environment, Service ] label_matchers: - label_names: - Telemetry.Source - regex: ^RuntimeMetric$ + regex: '^RuntimeMetric$' separator: ; metric_name_selectors: - - ^.*$ + - '^.*$' middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -296,14 +295,14 @@ extensions: role_arn: "" service_name: "" entitystore: - kubernetes_mode: EKS - mode: ec2 - region: us-east-1 + mode: ec2 + region: us-east-1 + kubernetes_mode: EKS server: - listen_addr: :4311 - tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt - tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt - tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key + listen_addr: :4311 + tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" + tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" + tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" processors: awsapplicationsignals: limiter: @@ -325,582 +324,6 @@ processors: send_batch_max_size: 0 send_batch_size: 8192 timeout: 5s - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" resourcedetection: aks: resource_attributes: @@ -1188,6 +611,570 @@ processors: reload_interval: 0s server_name_override: "" write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: {"name": '.*Old\\sGen$'} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: {"name": '.*Survivor\\sSpace$'} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: {"name": '.*Eden\\sSpace$'} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: {"name": "G1 Old Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: {"name": "G1 Young Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: {"name": "G1 Old Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: {"name": "G1 Young Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: {"type": "vms"} + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: {"type": "rss"} + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" receivers: awscontainerinsightreceiver: accelerated_compute_metrics: false diff --git a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml index 7691642f51..5b099d0315 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_and_k8s_config.yaml @@ -104,15 +104,14 @@ exporters: - Fault - Error - dimensions: - - - Environment - - Service + - [ Environment, Service ] label_matchers: - label_names: - Telemetry.Source - regex: ^RuntimeMetric$ + regex: '^RuntimeMetric$' separator: ; metric_name_selectors: - - ^.*$ + - '^.*$' middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -297,14 +296,14 @@ extensions: role_arn: "" service_name: "" entitystore: - kubernetes_mode: K8sEC2 - mode: ec2 - region: us-east-1 + mode: ec2 + region: us-east-1 + kubernetes_mode: K8sEC2 server: - listen_addr: :4311 - tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt - tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt - tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key + listen_addr: :4311 + tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" + tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" + tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" processors: awsapplicationsignals: limiter: @@ -314,8 +313,8 @@ processors: log_dropped_metrics: true rotation_interval: 10m0s resolvers: - - name: TestCluster - platform: k8s + - name: TestCluster + platform: k8s awsentity/service/application_signals: cluster_name: TestCluster entity_type: Service @@ -326,582 +325,6 @@ processors: send_batch_max_size: 0 send_batch_size: 8192 timeout: 5s - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" resourcedetection: aks: resource_attributes: @@ -1189,6 +612,570 @@ processors: reload_interval: 0s server_name_override: "" write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: { "name": '.*Old\\sGen$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Survivor\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Eden\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: { "type": "vms" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: { "type": "rss" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" receivers: awscontainerinsightreceiver: accelerated_compute_metrics: false diff --git a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml index f9306ebb3f..bfcea74610 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_fallback_and_eks_config.yaml @@ -1,1307 +1,1294 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; - metric_name_selectors: - - ^.*$ - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "1" - awsemf/containerinsights: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" - awsxray/application_signals: - certificate_file_path: "" - endpoint: "" - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: false - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - [ Environment, Service ] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^RuntimeMetric$' + separator: ; + metric_name_selectors: + - '^.*$' + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "1" + awsemf/containerinsights: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" + awsxray/application_signals: + certificate_file_path: "" + endpoint: "" + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: false + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EKS - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: EKS - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: "" - certificate_file_path: "" - dialer: - timeout: 0s - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: false - profile: "" - proxy_address: "" - region: us-east-1 - role_arn: "" - service_name: "" - entitystore: - kubernetes_mode: EKS - mode: ec2 - region: us-east-1 - server: - listen_addr: :4311 - tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt - tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt - tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key + agenthealth/logs: + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EKS + region_type: ACJ + agenthealth/traces: + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: EKS + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: "" + certificate_file_path: "" + dialer: + timeout: "0s" + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: false + profile: "" + proxy_address: "" + region: us-east-1 + service_name: "" + role_arn: "" + entitystore: + mode: ec2 + region: us-east-1 + kubernetes_mode: EKS + server: + listen_addr: :4311 + tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" + tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" + tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" processors: - awsapplicationsignals: - limiter: - disabled: false - drop_threshold: 500 - garbage_collection_interval: 10m0s - log_dropped_metrics: true - rotation_interval: 10m0s - resolvers: - - name: TestCluster - platform: eks - awsentity/service/application_signals: - cluster_name: TestCluster - entity_type: Service - kubernetes_mode: EKS - platform: ec2 - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s + awsapplicationsignals: + limiter: + disabled: false + drop_threshold: 500 + garbage_collection_interval: 10m0s + log_dropped_metrics: true + rotation_interval: 10m0s + resolvers: + - name: TestCluster + platform: eks + awsentity/service/application_signals: + cluster_name: TestCluster + entity_type: Service + kubernetes_mode: EKS + platform: ec2 + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: "0s" + http2_read_idle_timeout: "0s" + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: { "name": '.*Old\\sGen$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Survivor\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Eden\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: { "type": "vms" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: { "type": "rss" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" +receivers: + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: false + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + otlp/application_signals: + protocols: + grpc: + endpoint: 0.0.0.0:4315 + dialer: + timeout: "0s" + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp write_buffer_size: 0 -receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: false - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - otlp/application_signals: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:4315 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp - write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - traces_url_path: /v1/traces + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + include_system_ca_certs_pool: false + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - - server - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - awsentity/service/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + - server + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - awsentity/service/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml index f9306ebb3f..454a1bfa23 100644 --- a/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/appsignals_over_fallback_config.yaml @@ -1,1307 +1,1294 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteEnvironment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; - metric_name_selectors: - - ^.*$ - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "1" - awsemf/containerinsights: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: true - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/containerinsights/{ClusterName}/performance - log_retention: 0 - log_stream_name: '{NodeName}' - max_retries: 2 - metric_declarations: - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - - - ClusterName - - Namespace - - Service - - - ClusterName - - Namespace - metric_name_selectors: - - pod_cpu_utilization - - pod_memory_utilization - - pod_network_rx_bytes - - pod_network_tx_bytes - - pod_cpu_utilization_over_pod_limit - - pod_memory_utilization_over_pod_limit - - dimensions: - - - ClusterName - - Namespace - - PodName - metric_name_selectors: - - pod_number_of_container_restarts - - dimensions: - - - ClusterName - - Namespace - - PodName - - - ClusterName - metric_name_selectors: - - pod_cpu_reserved_capacity - - pod_memory_reserved_capacity - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_cpu_utilization - - node_memory_utilization - - node_network_total_bytes - - node_cpu_reserved_capacity - - node_memory_reserved_capacity - - node_number_of_running_pods - - node_number_of_running_containers - - dimensions: - - - ClusterName - metric_name_selectors: - - node_cpu_usage_total - - node_cpu_limit - - node_memory_working_set - - node_memory_limit - - dimensions: - - - ClusterName - - InstanceId - - NodeName - - - ClusterName - metric_name_selectors: - - node_filesystem_utilization - - dimensions: - - - ClusterName - - Namespace - - Service - - - ClusterName - metric_name_selectors: - - service_number_of_running_pods - - dimensions: - - - ClusterName - - Namespace - - - ClusterName - metric_name_selectors: - - namespace_number_of_running_pods - - dimensions: - - - ClusterName - metric_name_selectors: - - cluster_node_count - - cluster_failed_node_count - middleware: agenthealth/logs - namespace: ContainerInsights - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - parse_json_encoded_attr_values: - - Sources - - kubernetes - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" - awsxray/application_signals: - certificate_file_path: "" - endpoint: "" - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: false - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteEnvironment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - [ Environment, Service ] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^RuntimeMetric$' + separator: ; + metric_name_selectors: + - '^.*$' + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "1" + awsemf/containerinsights: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: true + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/containerinsights/{ClusterName}/performance + log_retention: 0 + log_stream_name: '{NodeName}' + max_retries: 2 + metric_declarations: + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + - - ClusterName + - Namespace + - Service + - - ClusterName + - Namespace + metric_name_selectors: + - pod_cpu_utilization + - pod_memory_utilization + - pod_network_rx_bytes + - pod_network_tx_bytes + - pod_cpu_utilization_over_pod_limit + - pod_memory_utilization_over_pod_limit + - dimensions: + - - ClusterName + - Namespace + - PodName + metric_name_selectors: + - pod_number_of_container_restarts + - dimensions: + - - ClusterName + - Namespace + - PodName + - - ClusterName + metric_name_selectors: + - pod_cpu_reserved_capacity + - pod_memory_reserved_capacity + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_cpu_utilization + - node_memory_utilization + - node_network_total_bytes + - node_cpu_reserved_capacity + - node_memory_reserved_capacity + - node_number_of_running_pods + - node_number_of_running_containers + - dimensions: + - - ClusterName + metric_name_selectors: + - node_cpu_usage_total + - node_cpu_limit + - node_memory_working_set + - node_memory_limit + - dimensions: + - - ClusterName + - InstanceId + - NodeName + - - ClusterName + metric_name_selectors: + - node_filesystem_utilization + - dimensions: + - - ClusterName + - Namespace + - Service + - - ClusterName + metric_name_selectors: + - service_number_of_running_pods + - dimensions: + - - ClusterName + - Namespace + - - ClusterName + metric_name_selectors: + - namespace_number_of_running_pods + - dimensions: + - - ClusterName + metric_name_selectors: + - cluster_node_count + - cluster_failed_node_count + middleware: agenthealth/logs + namespace: ContainerInsights + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + parse_json_encoded_attr_values: + - Sources + - kubernetes + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" + awsxray/application_signals: + certificate_file_path: "" + endpoint: "" + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: false + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EKS - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: EKS - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: "" - certificate_file_path: "" - dialer: - timeout: 0s - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: false - profile: "" - proxy_address: "" - region: us-east-1 - role_arn: "" - service_name: "" - entitystore: - kubernetes_mode: EKS - mode: ec2 - region: us-east-1 - server: - listen_addr: :4311 - tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt - tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt - tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key + agenthealth/logs: + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EKS + region_type: ACJ + agenthealth/traces: + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: EKS + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: "" + dialer: + timeout: "0s" + certificate_file_path: "" + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: false + profile: "" + proxy_address: "" + region: us-east-1 + service_name: "" + role_arn: "" + entitystore: + mode: ec2 + region: us-east-1 + kubernetes_mode: EKS + server: + listen_addr: :4311 + tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" + tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" + tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" processors: - awsapplicationsignals: - limiter: - disabled: false - drop_threshold: 500 - garbage_collection_interval: 10m0s - log_dropped_metrics: true - rotation_interval: 10m0s - resolvers: - - name: TestCluster - platform: eks - awsentity/service/application_signals: - cluster_name: TestCluster - entity_type: Service - kubernetes_mode: EKS - platform: ec2 - batch/containerinsights: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 5s - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s + awsapplicationsignals: + limiter: + disabled: false + drop_threshold: 500 + garbage_collection_interval: 10m0s + log_dropped_metrics: true + rotation_interval: 10m0s + resolvers: + - name: TestCluster + platform: eks + awsentity/service/application_signals: + cluster_name: TestCluster + entity_type: Service + kubernetes_mode: EKS + platform: ec2 + batch/containerinsights: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 5s + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.ecs.task.id: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: "0s" + http2_read_idle_timeout: "0s" + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: { "name": '.*Old\\sGen$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Survivor\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Eden\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: { "type": "vms" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: { "type": "rss" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" +receivers: + awscontainerinsightreceiver: + accelerated_compute_metrics: false + add_container_name_metric_label: false + add_full_pod_name_metric_label: false + add_service_as_attribute: true + certificate_file_path: "" + cluster_name: TestCluster + collection_interval: 30s + container_orchestrator: eks + enable_control_plane_metrics: false + endpoint: "" + host_ip: "" + host_name: "" + imds_retries: 1 + kube_config_path: "" + leader_lock_name: cwagent-clusterleader + leader_lock_using_config_map_only: true + local_mode: false + max_retries: 0 + no_verify_ssl: false + num_workers: 0 + prefer_full_pod_name: false + profile: "" + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 0 + resource_arn: "" + role_arn: "" + otlp/application_signals: + protocols: + grpc: + endpoint: 0.0.0.0:4315 + dialer: + timeout: "0s" + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + transport: tcp write_buffer_size: 0 -receivers: - awscontainerinsightreceiver: - accelerated_compute_metrics: false - add_container_name_metric_label: false - add_full_pod_name_metric_label: false - add_service_as_attribute: true - certificate_file_path: "" - cluster_name: TestCluster - collection_interval: 30s - container_orchestrator: eks - enable_control_plane_metrics: false - endpoint: "" - host_ip: "" - host_name: "" - imds_retries: 1 - kube_config_path: "" - leader_lock_name: cwagent-clusterleader - leader_lock_using_config_map_only: true - local_mode: false - max_retries: 0 - no_verify_ssl: false - num_workers: 0 - prefer_full_pod_name: false - profile: "" - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 0 - resource_arn: "" - role_arn: "" - otlp/application_signals: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:4315 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp - write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: path/to/cert.crt - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: path/to/key.key - max_version: "" - min_version: "" - reload_interval: 0s - traces_url_path: /v1/traces + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + tls: + ca_file: "" + cert_file: path/to/cert.crt + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: path/to/key.key + max_version: "" + min_version: "" + reload_interval: 0s + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - - server - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - awsentity/service/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - metrics/containerinsights: - exporters: - - awsemf/containerinsights - processors: - - batch/containerinsights - receivers: - - awscontainerinsightreceiver - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + - server + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - awsentity/service/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + metrics/containerinsights: + exporters: + - awsemf/containerinsights + processors: + - batch/containerinsights + receivers: + - awscontainerinsightreceiver + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml index 0393281fb9..24afc038e6 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_config.yaml @@ -74,15 +74,14 @@ exporters: - Fault - Error - dimensions: - - - Environment - - Service + - [ Environment, Service ] label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; + - label_names: + - Telemetry.Source + regex: '^RuntimeMetric$' + separator: ; metric_name_selectors: - - ^.*$ + - '^.*$' middleware: agenthealth/logs namespace: ApplicationSignals no_verify_ssl: false @@ -176,582 +175,6 @@ processors: resolvers: - name: "" platform: generic - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" resourcedetection: aks: resource_attributes: @@ -1039,6 +462,570 @@ processors: reload_interval: 0s server_name_override: "" write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: { "name": '.*Old\\sGen$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Survivor\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Eden\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: { "type": "vms" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: { "type": "rss" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" receivers: otlp/application_signals: protocols: diff --git a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml index 5cffc25e9d..9791f903dd 100644 --- a/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_appsignals_fallback_config.yaml @@ -1,1099 +1,1086 @@ exporters: - awsemf/application_signals: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: https://fake_endpoint - enhanced_container_insights: false - imds_retries: 1 - local_mode: true - log_group_name: /aws/application-signals/data - log_retention: 0 - log_stream_name: "" - max_retries: 2 - metric_declarations: - - dimensions: - - - Environment - - Operation - - Service - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ServerSpan|LocalRootSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Operation - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - Operation - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - Environment - - RemoteOperation - - RemoteService - - Service - - - Environment - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - Service - - - RemoteResourceIdentifier - - RemoteResourceType - - RemoteService - - - RemoteService - label_matchers: - - label_names: - - Telemetry.Source - regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ - separator: ; - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - - Environment - - Service - label_matchers: - - label_names: - - Telemetry.Source - regex: ^RuntimeMetric$ - separator: ; - metric_name_selectors: - - ^.*$ - middleware: agenthealth/logs - namespace: ApplicationSignals - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: false - retain_initial_value_of_delta_metric: false - role_arn: "" - shared_credentials_file: - - fake-path - version: "1" - awsxray/application_signals: - certificate_file_path: "" - endpoint: https://fake_endpoint - imds_retries: 1 - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - local_mode: true - max_retries: 2 - middleware: agenthealth/traces - no_verify_ssl: false - num_workers: 8 - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - request_timeout_seconds: 30 - resource_arn: "" - role_arn: "" - shared_credentials_file: - - fake-path - telemetry: - enabled: true - include_metadata: true + awsemf/application_signals: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: https://fake_endpoint + enhanced_container_insights: false + imds_retries: 1 + local_mode: true + log_group_name: /aws/application-signals/data + log_retention: 0 + log_stream_name: "" + max_retries: 2 + metric_declarations: + - dimensions: + - - Environment + - Operation + - Service + - - Environment + - Service + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ServerSpan|LocalRootSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - - Environment + - Operation + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - Operation + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - Environment + - RemoteOperation + - RemoteService + - Service + - - Environment + - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - Service + - - RemoteResourceIdentifier + - RemoteResourceType + - RemoteService + - - RemoteService + label_matchers: + - label_names: + - Telemetry.Source + regex: ^(ClientSpan|ProducerSpan|ConsumerSpan)$ + separator: ; + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - [ Environment, Service ] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^RuntimeMetric$' + separator: ; + metric_name_selectors: + - '^.*$' + middleware: agenthealth/logs + namespace: ApplicationSignals + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: false + retain_initial_value_of_delta_metric: false + role_arn: "" + shared_credentials_file: + - fake-path + version: "1" + awsxray/application_signals: + certificate_file_path: "" + endpoint: https://fake_endpoint + imds_retries: 1 + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + local_mode: true + max_retries: 2 + middleware: agenthealth/traces + no_verify_ssl: false + num_workers: 8 + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + request_timeout_seconds: 30 + resource_arn: "" + role_arn: "" + shared_credentials_file: + - fake-path + telemetry: + enabled: true + include_metadata: true extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: OP - region_type: ACJ - agenthealth/traces: - is_usage_data_enabled: true - stats: - operations: - - PutTraceSegments - usage_flags: - mode: OP - region_type: ACJ - awsproxy/application_signals: - aws_endpoint: https://fake_endpoint - certificate_file_path: "" - dialer: - timeout: 0s - endpoint: 0.0.0.0:2000 - imds_retries: 1 - local_mode: true - profile: AmazonCloudWatchAgent - proxy_address: "" - region: us-east-1 - role_arn: "" - service_name: "" - shared_credentials_file: - - fake-path - entitystore: - mode: onPremise - profile: AmazonCloudWatchAgent - region: us-east-1 - shared_credential_file: fake-path + agenthealth/logs: + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: OP + region_type: ACJ + agenthealth/traces: + is_usage_data_enabled: true + stats: + operations: + - PutTraceSegments + usage_flags: + mode: OP + region_type: ACJ + awsproxy/application_signals: + aws_endpoint: https://fake_endpoint + dialer: + timeout: "0s" + certificate_file_path: "" + endpoint: 0.0.0.0:2000 + imds_retries: 1 + local_mode: true + profile: AmazonCloudWatchAgent + proxy_address: "" + region: us-east-1 + role_arn: "" + service_name: "" + shared_credentials_file: + - fake-path + entitystore: + mode: onPremise + profile: AmazonCloudWatchAgent + region: us-east-1 + shared_credential_file: fake-path processors: - awsapplicationsignals: - resolvers: - - name: "" - platform: generic - metricstransform/application_signals: - transforms: - - action: update - aggregation_type: "" - include: jvm.cpu.recent_utilization - match_type: "" - new_name: JVMCpuRecentUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.cpu.time - match_type: "" - new_name: JVMCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.classes.loaded - match_type: "" - new_name: JVMClassLoaded - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.threads.count - match_type: "" - new_name: JVMThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.nonheap.used - match_type: "" - new_name: JVMMemoryNonHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.pool.used_after_last_gc - match_type: "" - new_name: JVMMemoryUsedAfterLastGC - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: jvm.memory.heap.used - match_type: "" - new_name: JVMMemoryHeapUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Old\sGen$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryOldGenUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Survivor\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemorySurvivorSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: .*Eden\sSpace$ - include: jvm.memory.pool.used - match_type: regexp - new_name: JVMMemoryEdenSpaceUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.elapsed - match_type: "" - new_name: JVMGCDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: jvm.gc.collections.count - match_type: "" - new_name: JVMGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCOldGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.elapsed - match_type: strict - new_name: JVMGCYoungGenDuration - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Old Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCOldGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - name: G1 Young Generation - include: jvm.gc.collections.count - match_type: strict - new_name: JVMGCYoungGenCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "0" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen0Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "1" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen1Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - count: "2" - include: ^process\.runtime\.(.*)\.gc_count$$ - match_type: regexp - new_name: PythonProcessGCGen2Count - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.thread_count$$ - match_type: regexp - new_name: PythonProcessThreadCount - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu_time$$ - match_type: regexp - new_name: PythonProcessCpuTime - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: update - aggregation_type: "" - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ - match_type: regexp - new_name: PythonProcessCpuUtilization - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: vms - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessVMSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - - action: insert - aggregation_type: "" - experimental_match_labels: - type: rss - include: ^process\.runtime\.(.*)\.memory$$ - match_type: regexp - new_name: PythonProcessRSSMemoryUsed - operations: - - action: aggregate_labels - aggregation_type: sum - experimental_scale: 0 - label: "" - label_set: [] - label_value: "" - new_label: "" - new_value: "" - - action: add_label - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - new_label: Telemetry.Source - new_value: RuntimeMetric - submatch_case: "" - resourcedetection: - aks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - azure: - resource_attributes: - azure.resourcegroup.name: - enabled: true - azure.vm.name: - enabled: true - azure.vm.scaleset.name: - enabled: true - azure.vm.size: - enabled: true - cloud.account.id: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - tags: [] - compression: "" - consul: - address: "" - datacenter: "" - namespace: "" - resource_attributes: - cloud.region: - enabled: true - host.id: - enabled: true - host.name: - enabled: true - token_file: "" - detectors: - - eks - - env - - ec2 - disable_keep_alives: false - docker: - resource_attributes: - host.name: - enabled: true - os.type: - enabled: true - ec2: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - host.id: - enabled: true - host.image.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - tags: - - ^kubernetes.io/cluster/.*$ - - ^aws:autoscaling:groupName - ecs: - resource_attributes: - aws.ecs.cluster.arn: - enabled: true - aws.ecs.launchtype: - enabled: true - aws.ecs.task.arn: - enabled: true - aws.ecs.task.family: - enabled: true - aws.ecs.task.id: - enabled: true - aws.ecs.task.revision: - enabled: true - aws.log.group.arns: - enabled: true - aws.log.group.names: - enabled: true - aws.log.stream.arns: - enabled: true - aws.log.stream.names: - enabled: true - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - eks: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - k8s.cluster.name: - enabled: false - elasticbeanstalk: - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - deployment.environment: - enabled: true - service.instance.id: - enabled: true - service.version: - enabled: true - endpoint: "" - gcp: - resource_attributes: - cloud.account.id: - enabled: true - cloud.availability_zone: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.id: - enabled: true - faas.instance: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - gcp.cloud_run.job.execution: - enabled: true - gcp.cloud_run.job.task_index: - enabled: true - gcp.gce.instance.hostname: - enabled: false - gcp.gce.instance.name: - enabled: false - host.id: - enabled: true - host.name: - enabled: true - host.type: - enabled: true - k8s.cluster.name: - enabled: true - heroku: - resource_attributes: - cloud.provider: - enabled: true - heroku.app.id: - enabled: true - heroku.dyno.id: - enabled: true - heroku.release.commit: - enabled: true - heroku.release.creation_timestamp: - enabled: true - service.instance.id: - enabled: true - service.name: - enabled: true - service.version: - enabled: true - http2_ping_timeout: 0s - http2_read_idle_timeout: 0s - idle_conn_timeout: 1m30s - k8snode: - auth_type: serviceAccount - context: "" - kube_config_path: "" - node_from_env_var: "" - resource_attributes: - k8s.node.name: - enabled: true - k8s.node.uid: - enabled: true - lambda: - resource_attributes: - aws.log.group.names: - enabled: true - aws.log.stream.names: - enabled: true - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - faas.instance: - enabled: true - faas.max_memory: - enabled: true - faas.name: - enabled: true - faas.version: - enabled: true - max_idle_conns: 100 - openshift: - address: "" - resource_attributes: - cloud.platform: - enabled: true - cloud.provider: - enabled: true - cloud.region: - enabled: true - k8s.cluster.name: - enabled: true - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - token: "" - override: true - proxy_url: "" - read_buffer_size: 0 - system: - resource_attributes: - host.arch: - enabled: false - host.cpu.cache.l2.size: - enabled: false - host.cpu.family: - enabled: false - host.cpu.model.id: - enabled: false - host.cpu.model.name: - enabled: false - host.cpu.stepping: - enabled: false - host.cpu.vendor.id: - enabled: false - host.id: - enabled: false - host.ip: - enabled: false - host.mac: - enabled: false - host.name: - enabled: true - os.description: - enabled: false - os.type: - enabled: true - timeout: 2s - tls: - ca_file: "" - cert_file: "" - include_system_ca_certs_pool: false - insecure: false - insecure_skip_verify: false - key_file: "" - max_version: "" - min_version: "" - reload_interval: 0s - server_name_override: "" - write_buffer_size: 0 + awsapplicationsignals: + resolvers: + - name: "" + platform: generic + resourcedetection: + aks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + azure: + resource_attributes: + azure.resourcegroup.name: + enabled: true + azure.vm.name: + enabled: true + azure.vm.scaleset.name: + enabled: true + azure.vm.size: + enabled: true + cloud.account.id: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + tags: [] + compression: "" + consul: + address: "" + datacenter: "" + namespace: "" + resource_attributes: + cloud.region: + enabled: true + host.id: + enabled: true + host.name: + enabled: true + token_file: "" + detectors: + - eks + - env + - ec2 + disable_keep_alives: false + docker: + resource_attributes: + host.name: + enabled: true + os.type: + enabled: true + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: false + elasticbeanstalk: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + deployment.environment: + enabled: true + service.instance.id: + enabled: true + service.version: + enabled: true + endpoint: "" + gcp: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.id: + enabled: true + faas.instance: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + gcp.cloud_run.job.execution: + enabled: true + gcp.cloud_run.job.task_index: + enabled: true + gcp.gce.instance.hostname: + enabled: false + gcp.gce.instance.name: + enabled: false + host.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + k8s.cluster.name: + enabled: true + heroku: + resource_attributes: + cloud.provider: + enabled: true + heroku.app.id: + enabled: true + heroku.dyno.id: + enabled: true + heroku.release.commit: + enabled: true + heroku.release.creation_timestamp: + enabled: true + service.instance.id: + enabled: true + service.name: + enabled: true + service.version: + enabled: true + http2_ping_timeout: "0s" + http2_read_idle_timeout: "0s" + idle_conn_timeout: 1m30s + k8snode: + auth_type: serviceAccount + context: "" + kube_config_path: "" + node_from_env_var: "" + resource_attributes: + k8s.node.name: + enabled: true + k8s.node.uid: + enabled: true + lambda: + resource_attributes: + aws.log.group.names: + enabled: true + aws.log.stream.names: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + faas.instance: + enabled: true + faas.max_memory: + enabled: true + faas.name: + enabled: true + faas.version: + enabled: true + max_idle_conns: 100 + openshift: + address: "" + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + k8s.cluster.name: + enabled: true + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + token: "" + override: true + proxy_url: "" + read_buffer_size: 0 + system: + resource_attributes: + host.arch: + enabled: false + host.cpu.cache.l2.size: + enabled: false + host.cpu.family: + enabled: false + host.cpu.model.id: + enabled: false + host.cpu.model.name: + enabled: false + host.cpu.stepping: + enabled: false + host.cpu.vendor.id: + enabled: false + host.id: + enabled: false + host.ip: + enabled: false + host.mac: + enabled: false + host.name: + enabled: true + os.description: + enabled: false + os.type: + enabled: true + timeout: 2s + tls: + ca_file: "" + cert_file: "" + include_system_ca_certs_pool: false + insecure: false + insecure_skip_verify: false + key_file: "" + max_version: "" + min_version: "" + reload_interval: "0s" + server_name_override: "" + write_buffer_size: 0 + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: { "name": '.*Old\\sGen$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Survivor\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: { "name": '.*Eden\\sSpace$' } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Old Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: { "name": "G1 Young Generation" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen0Count + match_type: regexp + experimental_match_labels: { "count": "0" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen1Count + match_type: regexp + experimental_match_labels: { "count": "1" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.gc_count$$ + action: insert + new_name: PythonProcessGCGen2Count + match_type: regexp + experimental_match_labels: { "count": "2" } + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.thread_count$$ + action: update + new_name: PythonProcessThreadCount + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu_time$$ + action: update + new_name: PythonProcessCpuTime + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.cpu\.utilization$$ + action: update + new_name: PythonProcessCpuUtilization + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessVMSMemoryUsed + experimental_match_labels: { "type": "vms" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: ^process\.runtime\.(.*)\.memory$$ + action: insert + new_name: PythonProcessRSSMemoryUsed + experimental_match_labels: { "type": "rss" } + match_type: regexp + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [ ] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" receivers: - otlp/application_signals: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:4315 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - transport: tcp - write_buffer_size: 0 - http: - endpoint: 0.0.0.0:4316 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - traces_url_path: /v1/traces + otlp/application_signals: + protocols: + grpc: + dialer: + timeout: "0s" + endpoint: 0.0.0.0:4315 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + transport: tcp + write_buffer_size: 0 + http: + endpoint: 0.0.0.0:4316 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + traces_url_path: /v1/traces service: - extensions: - - awsproxy/application_signals - - agenthealth/traces - - agenthealth/logs - - entitystore - pipelines: - metrics/application_signals: - exporters: - - awsemf/application_signals - processors: - - metricstransform/application_signals - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - traces/application_signals: - exporters: - - awsxray/application_signals - processors: - - resourcedetection - - awsapplicationsignals - receivers: - - otlp/application_signals - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - awsproxy/application_signals + - agenthealth/traces + - agenthealth/logs + - entitystore + pipelines: + metrics/application_signals: + exporters: + - awsemf/application_signals + processors: + - metricstransform/application_signals + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + traces/application_signals: + exporters: + - awsxray/application_signals + processors: + - resourcedetection + - awsapplicationsignals + receivers: + - otlp/application_signals + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index 8a910d80ee..618e81c072 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -149,8 +149,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-east-1 + mode: ec2 + region: us-east-1 processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml index a77f558584..9a349c682e 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_linux.yaml @@ -28,9 +28,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml index 01d9efe369..31c7c5229b 100644 --- a/translator/tocwconfig/sampleConfig/basic_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/basic_config_windows.yaml @@ -23,14 +23,14 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - ImageId - InstanceId - InstanceType - - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml index f01c8c504e..a1ecf22c1e 100644 --- a/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/collectd_config_linux.yaml @@ -23,8 +23,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 receivers: telegraf_socket_listener: collection_interval: 1m0s diff --git a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml index d8f4365eaf..ab934cba89 100644 --- a/translator/tocwconfig/sampleConfig/compass_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/compass_linux_config.yaml @@ -34,15 +34,15 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index ad049493b3..ec2a2d8994 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -100,8 +100,8 @@ processors: platform: ec2 awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 batch/emf_logs: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -126,9 +126,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -138,11 +138,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" trace_statements: [] receivers: awsxray: @@ -275,12 +275,12 @@ service: - ec2tagger - transform receivers: + - telegraf_procstat/1917393364 - telegraf_cpu - - telegraf_processes - - telegraf_swap - telegraf_mem - telegraf_netstat - - telegraf_procstat/1917393364 + - telegraf_processes + - telegraf_swap - telegraf_disk metrics/hostCustomMetrics: exporters: @@ -301,8 +301,8 @@ service: - ec2tagger - transform receivers: - - telegraf_net - telegraf_diskio + - telegraf_net traces/xray: exporters: - awsxray diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index 3ac881c155..e54d859883 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -102,11 +102,11 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 batch/emf_logs: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -138,9 +138,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 1 refresh_interval_seconds: 0s filter/jmx/0: @@ -189,11 +189,11 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx/0: error_mode: propagate @@ -202,9 +202,9 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "jvm.memory.heap.used" - - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" - - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" + - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate" + - set(unit, "unit") where name == "jvm.memory.heap.used" + - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used" trace_statements: [] transform/jmx/1: error_mode: propagate @@ -213,7 +213,7 @@ processors: metric_statements: - context: metric statements: - - set(name, "TC_ERR") where name == "tomcat.errors" + - set(name, "TC_ERR") where name == "tomcat.errors" trace_statements: [] receivers: awsxray: @@ -381,13 +381,13 @@ service: - ec2tagger - transform receivers: - - telegraf_processes - - telegraf_cpu - - telegraf_swap - - telegraf_disk - - telegraf_netstat - telegraf_mem + - telegraf_netstat - telegraf_procstat/1917393364 + - telegraf_swap + - telegraf_cpu + - telegraf_disk + - telegraf_processes metrics/hostCustomMetrics/cloudwatch: exporters: - awscloudwatch @@ -396,8 +396,8 @@ service: - ec2tagger - transform receivers: - - telegraf_statsd - telegraf_socket_listener + - telegraf_statsd metrics/hostDeltaMetrics/cloudwatch: exporters: - awscloudwatch @@ -407,8 +407,8 @@ service: - ec2tagger - transform receivers: - - telegraf_net - telegraf_diskio + - telegraf_net metrics/jmx/cloudwatch/0: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml index aa14bdf130..28be63530c 100644 --- a/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml +++ b/translator/tocwconfig/sampleConfig/container_insights_jmx.yaml @@ -183,8 +183,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-west-2 + mode: ec2 + region: us-west-2 processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml index 05df69691c..6a27ffc90d 100644 --- a/translator/tocwconfig/sampleConfig/delta_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_config_linux.yaml @@ -23,7 +23,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict @@ -50,12 +50,12 @@ processors: metric_statements: - context: metric statements: - - set(unit, "Count") where name == "diskio_iops_in_progress" - - set(name, "DRIVER_DISKIO_IOPS_IN_PROGRESS") where name == "diskio_iops_in_progress" - - set(unit, "Milliseconds") where name == "diskio_read_time" - - set(name, "DRIVER_DISKIO_READ_TIME") where name == "diskio_read_time" - - set(unit, "Milliseconds") where name == "diskio_write_time" - - set(name, "DRIVER_DISKIO_WRITE_TIME") where name == "diskio_write_time" + - set(unit, "Count") where name == "diskio_iops_in_progress" + - set(name, "DRIVER_DISKIO_IOPS_IN_PROGRESS") where name == "diskio_iops_in_progress" + - set(unit, "Milliseconds") where name == "diskio_read_time" + - set(name, "DRIVER_DISKIO_READ_TIME") where name == "diskio_read_time" + - set(unit, "Milliseconds") where name == "diskio_write_time" + - set(name, "DRIVER_DISKIO_WRITE_TIME") where name == "diskio_write_time" trace_statements: [] receivers: telegraf_diskio: diff --git a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml index b0ebe0edb1..f6601c168d 100644 --- a/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/delta_net_config_linux.yaml @@ -23,7 +23,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: "" @@ -35,9 +35,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - ImageId - InstanceId - InstanceType + - ImageId imds_retries: 1 refresh_interval_seconds: 0s receivers: diff --git a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml index 8c19d0bee1..a458852b8e 100644 --- a/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml +++ b/translator/tocwconfig/sampleConfig/drop_origin_linux.yaml @@ -28,14 +28,14 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceId - InstanceType - ImageId + - InstanceId imds_retries: 1 refresh_interval_seconds: 0s transform: @@ -45,9 +45,9 @@ processors: metric_statements: - context: metric statements: - - set(unit, "unit") where name == "cpu_usage_idle" - - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - - set(unit, "unit") where name == "cpu_usage_nice" + - set(unit, "unit") where name == "cpu_usage_idle" + - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" + - set(unit, "unit") where name == "cpu_usage_nice" trace_statements: [] receivers: telegraf_cpu: @@ -75,9 +75,9 @@ service: - ec2tagger - transform receivers: + - telegraf_nvidia_smi - telegraf_cpu - telegraf_disk - - telegraf_nvidia_smi telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index f2e17099c6..18e4401d58 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -134,9 +134,9 @@ exporters: - pod_memory_request - pod_memory_limit - pod_cpu_limit - - pod_cpu_request - pod_cpu_usage_total - pod_memory_working_set + - pod_cpu_request - pod_container_status_running - pod_container_status_terminated - pod_container_status_waiting diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index c236a12b33..169eb97852 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -146,9 +146,9 @@ exporters: - pod_container_status_waiting_reason_create_container_error - pod_container_status_waiting_reason_create_container_config_error - pod_container_status_terminated_reason_oom_killed + - pod_gpu_usage_total - pod_gpu_request - pod_gpu_limit - - pod_gpu_usage_total - pod_gpu_reserved_capacity - dimensions: - - ClusterName @@ -175,8 +175,8 @@ exporters: - node_status_condition_unknown - node_status_capacity_pods - node_status_allocatable_pods - - node_gpu_limit - node_gpu_usage_total + - node_gpu_limit - node_gpu_reserved_capacity - dimensions: - - ClusterName @@ -685,9 +685,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: container_gpu_utilization + new_name: container_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -696,12 +696,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: pod_gpu_utilization + new_name: pod_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -710,12 +717,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_UTIL + include: DCGM_FI_DEV_FB_USED match_type: "" - new_name: node_gpu_utilization + new_name: node_gpu_memory_used operations: - action: add_label aggregation_type: "" @@ -724,12 +738,19 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 1.048576e+06 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: container_gpu_memory_utilization + new_name: container_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -740,7 +761,7 @@ processors: new_value: ContainerGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -748,9 +769,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: pod_gpu_memory_utilization + new_name: pod_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -761,7 +782,7 @@ processors: new_value: PodGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -769,9 +790,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED_PERCENT + include: DCGM_FI_DEV_FB_TOTAL match_type: "" - new_name: node_gpu_memory_utilization + new_name: node_gpu_memory_total operations: - action: add_label aggregation_type: "" @@ -782,7 +803,7 @@ processors: new_value: NodeGPU - action: experimental_scale_value aggregation_type: "" - experimental_scale: 100 + experimental_scale: 1.048576e+06 label: "" label_value: "" new_label: "" @@ -790,9 +811,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: container_gpu_memory_used + new_name: container_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -801,19 +822,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: pod_gpu_memory_used + new_name: pod_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -822,19 +836,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_USED + include: DCGM_FI_DEV_GPU_TEMP match_type: "" - new_name: node_gpu_memory_used + new_name: node_gpu_temperature operations: - action: add_label aggregation_type: "" @@ -843,19 +850,12 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: container_gpu_memory_total + new_name: container_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -864,19 +864,12 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: pod_gpu_memory_total + new_name: pod_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -885,19 +878,12 @@ processors: label_value: "" new_label: Type new_value: PodGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_FB_TOTAL + include: DCGM_FI_DEV_POWER_USAGE match_type: "" - new_name: node_gpu_memory_total + new_name: node_gpu_power_draw operations: - action: add_label aggregation_type: "" @@ -906,19 +892,12 @@ processors: label_value: "" new_label: Type new_value: NodeGPU - - action: experimental_scale_value - aggregation_type: "" - experimental_scale: 1.048576e+06 - label: "" - label_value: "" - new_label: "" - new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: container_gpu_temperature + new_name: container_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -930,9 +909,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: pod_gpu_temperature + new_name: pod_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -944,9 +923,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_GPU_TEMP + include: DCGM_FI_DEV_GPU_UTIL match_type: "" - new_name: node_gpu_temperature + new_name: node_gpu_utilization operations: - action: add_label aggregation_type: "" @@ -958,9 +937,9 @@ processors: submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: container_gpu_power_draw + new_name: container_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -969,12 +948,19 @@ processors: label_value: "" new_label: Type new_value: ContainerGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: pod_gpu_power_draw + new_name: pod_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -983,12 +969,19 @@ processors: label_value: "" new_label: Type new_value: PodGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: insert aggregation_type: "" - include: DCGM_FI_DEV_POWER_USAGE + include: DCGM_FI_DEV_FB_USED_PERCENT match_type: "" - new_name: node_gpu_power_draw + new_name: node_gpu_memory_utilization operations: - action: add_label aggregation_type: "" @@ -997,68 +990,68 @@ processors: label_value: "" new_label: Type new_value: NodeGPU + - action: experimental_scale_value + aggregation_type: "" + experimental_scale: 100 + label: "" + label_value: "" + new_label: "" + new_value: "" submatch_case: "" - action: update aggregation_type: "" - include: execution_status_total - match_type: "" - new_name: neuron_execution_status - operations: [] - submatch_case: "" - - action: update - aggregation_type: "" - include: neuron_runtime_memory_used_bytes + include: neuron_hardware match_type: "" - new_name: neurondevice_runtime_memory_used_bytes + new_name: neuron_hardware operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_shared_scratchpad + include: execution_errors_total match_type: "" - new_name: neuroncore_memory_usage_model_shared_scratchpad + new_name: neuron_execution_errors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_tensors + include: neuron_runtime_memory_used_bytes match_type: "" - new_name: neuroncore_memory_usage_tensors + new_name: neurondevice_runtime_memory_used_bytes operations: [] submatch_case: "" - action: update aggregation_type: "" - include: instance_info + include: neuroncore_memory_usage_constants match_type: "" - new_name: instance_info + new_name: neuroncore_memory_usage_constants operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuron_hardware + include: neuroncore_memory_usage_model_code match_type: "" - new_name: neuron_hardware + new_name: neuroncore_memory_usage_model_code operations: [] submatch_case: "" - action: update aggregation_type: "" - include: hardware_ecc_events_total + include: neuroncore_memory_usage_model_shared_scratchpad match_type: "" - new_name: neurondevice_hw_ecc_events + new_name: neuroncore_memory_usage_model_shared_scratchpad operations: [] submatch_case: "" - action: update aggregation_type: "" - include: execution_errors_total + include: neuroncore_memory_usage_tensors match_type: "" - new_name: neuron_execution_errors + new_name: neuroncore_memory_usage_tensors operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_model_code + include: execution_status_total match_type: "" - new_name: neuroncore_memory_usage_model_code + new_name: neuron_execution_status operations: [] submatch_case: "" - action: update @@ -1084,16 +1077,23 @@ processors: submatch_case: "" - action: update aggregation_type: "" - include: execution_latency_seconds + include: instance_info match_type: "" - new_name: neuron_execution_latency + new_name: instance_info operations: [] submatch_case: "" - action: update aggregation_type: "" - include: neuroncore_memory_usage_constants + include: hardware_ecc_events_total match_type: "" - new_name: neuroncore_memory_usage_constants + new_name: neurondevice_hw_ecc_events + operations: [] + submatch_case: "" + - action: update + aggregation_type: "" + include: execution_latency_seconds + match_type: "" + new_name: neuron_execution_latency operations: [] submatch_case: "" receivers: diff --git a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml index 597ae1ccf7..d38f02f2cd 100644 --- a/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml +++ b/translator/tocwconfig/sampleConfig/ignore_append_dimensions.yaml @@ -23,7 +23,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 ec2tagger: imds_retries: 1 refresh_interval_seconds: 0s @@ -48,8 +48,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - telegraf_disk + - telegraf_mem telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml index 9a349c682e..373ba8e154 100644 --- a/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml +++ b/translator/tocwconfig/sampleConfig/invalid_input_linux.yaml @@ -54,8 +54,8 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - telegraf_disk + - telegraf_mem telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml index fa7fd7e62f..2bd2541d3e 100644 --- a/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_config_linux.yaml @@ -66,8 +66,8 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-west-2 + mode: ec2 + region: us-west-2 sigv4auth: assume_role: sts_region: us-west-2 @@ -75,7 +75,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 batch/host/amp: metadata_cardinality_limit: 1000 send_batch_max_size: 0 @@ -128,11 +128,11 @@ processors: metric_statements: - context: metric statements: + - set(unit, "unit") where name == "disk_free" + - set(name, "DISK_FREE") where name == "disk_free" - set(unit, "unit") where name == "cpu_usage_idle" - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle" - set(unit, "unit") where name == "cpu_usage_nice" - - set(unit, "unit") where name == "disk_free" - - set(name, "DISK_FREE") where name == "disk_free" trace_statements: [] transform/jmx: error_mode: propagate diff --git a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml index c0ec7df581..a4edf266d3 100644 --- a/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/jmx_eks_config_linux.yaml @@ -62,13 +62,13 @@ extensions: usage_flags: mode: EC2 region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 sigv4auth: assume_role: sts_region: us-west-2 region: us-west-2 + entitystore: + mode: ec2 + region: us-west-2 processors: batch/jmx/amp/0: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 9eb61610ae..68118d53b9 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -99,11 +99,11 @@ exporters: - pod_status_unknown - pod_status_succeeded - pod_memory_request + - pod_cpu_usage_total + - pod_memory_working_set - pod_memory_limit - pod_cpu_limit - pod_cpu_request - - pod_cpu_usage_total - - pod_memory_working_set - pod_container_status_running - pod_container_status_terminated - pod_container_status_waiting diff --git a/translator/tocwconfig/sampleConfig/log_filter.yaml b/translator/tocwconfig/sampleConfig/log_filter.yaml index 6ca631da29..0b694fca94 100644 --- a/translator/tocwconfig/sampleConfig/log_filter.yaml +++ b/translator/tocwconfig/sampleConfig/log_filter.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-east-1 + entitystore: + mode: "ec2" + region: us-east-1 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml b/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml index 391143c01f..a01b2785ed 100644 --- a/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/log_only_config_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 266b1a4959..28594ce0e7 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -395,8 +395,9 @@ extensions: mode: EC2 region_type: ACJ entitystore: - mode: ec2 - region: us-east-1 + mode: ec2 + region: us-east-1 + processors: batch/containerinsights: metadata_cardinality_limit: 1000 diff --git a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml index 11a14c9ad5..e3327e1d00 100644 --- a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml +++ b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml index 391143c01f..a01b2785ed 100644 --- a/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml +++ b/translator/tocwconfig/sampleConfig/no_skip_log_timestamp_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml index 3b03def357..f6233cf355 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml @@ -1,126 +1,126 @@ exporters: - awsemf: - certificate_file_path: "" - detailed_metrics: false - dimension_rollup_option: NoDimensionRollup - disable_metric_extraction: false - eks_fargate_container_insights_enabled: false - endpoint: "" - enhanced_container_insights: false - imds_retries: 1 - local_mode: false - log_group_name: /aws/cwagent - log_retention: 0 - log_stream_name: "" - max_retries: 2 - middleware: agenthealth/logs - namespace: CWAgent - no_verify_ssl: false - num_workers: 8 - output_destination: cloudwatch - profile: "" - proxy_address: "" - region: us-west-2 - request_timeout_seconds: 30 - resource_arn: "" - resource_to_telemetry_conversion: - enabled: true - retain_initial_value_of_delta_metric: false - role_arn: "" - version: "0" + awsemf: + certificate_file_path: "" + detailed_metrics: false + dimension_rollup_option: NoDimensionRollup + disable_metric_extraction: false + eks_fargate_container_insights_enabled: false + endpoint: "" + enhanced_container_insights: false + imds_retries: 1 + local_mode: false + log_group_name: /aws/cwagent + log_retention: 0 + log_stream_name: "" + max_retries: 2 + middleware: agenthealth/logs + namespace: CWAgent + no_verify_ssl: false + num_workers: 8 + output_destination: cloudwatch + profile: "" + proxy_address: "" + region: us-west-2 + request_timeout_seconds: 30 + resource_arn: "" + resource_to_telemetry_conversion: + enabled: true + retain_initial_value_of_delta_metric: false + role_arn: "" + version: "0" extensions: - agenthealth/logs: - is_usage_data_enabled: true - stats: - operations: - - PutLogEvents - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 + agenthealth/logs: + is_usage_data_enabled: true + stats: + operations: + - PutLogEvents + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 processors: - batch/hostOtlpMetrics/cloudwatchlogs: - metadata_cardinality_limit: 1000 - send_batch_max_size: 0 - send_batch_size: 8192 - timeout: 30s - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs: - exclude: - match_type: "" - include: - match_type: "" - initial_value: 2 - max_staleness: 0s + batch/hostOtlpMetrics/cloudwatchlogs: + metadata_cardinality_limit: 1000 + send_batch_max_size: 0 + send_batch_size: 8192 + timeout: 30s + cumulativetodelta/hostOtlpMetrics/cloudwatchlogs: + exclude: + match_type: "" + include: + match_type: "" + initial_value: 2 + max_staleness: 0s receivers: - otlp/metrics: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:1234 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp - write_buffer_size: 0 - http: - endpoint: 0.0.0.0:2345 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - traces_url_path: /v1/traces + otlp/metrics: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:1234 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + transport: tcp + write_buffer_size: 0 + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + http: + endpoint: 0.0.0.0:2345 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + traces_url_path: /v1/traces + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s service: - extensions: - - agenthealth/logs - - entitystore - pipelines: - metrics/hostOtlpMetrics/cloudwatchlogs: - exporters: - - awsemf - processors: - - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs - - batch/hostOtlpMetrics/cloudwatchlogs - receivers: - - otlp/metrics - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/logs + - entitystore + pipelines: + metrics/hostOtlpMetrics/cloudwatchlogs: + exporters: + - awsemf + processors: + - batch/hostOtlpMetrics/cloudwatchlogs + - cumulativetodelta/hostOtlpMetrics/cloudwatchlogs + receivers: + - otlp/metrics + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } diff --git a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml index 5ee9d0b9a7..8f47cce671 100644 --- a/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml +++ b/translator/tocwconfig/sampleConfig/otlp_metrics_config.yaml @@ -1,110 +1,110 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ - entitystore: - mode: ec2 - region: us-west-2 + agenthealth/metrics: + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EC2 + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 processors: - cumulativetodelta/hostOtlpMetrics: - exclude: - match_type: "" - include: - match_type: "" - initial_value: 2 - max_staleness: 0s - ec2tagger: - ec2_instance_tag_keys: - - AutoScalingGroupName - ec2_metadata_tags: - - ImageId - - InstanceId - - InstanceType - imds_retries: 1 - refresh_interval_seconds: 0s + cumulativetodelta/hostOtlpMetrics: + exclude: + match_type: "" + include: + match_type: "" + initial_value: 2 + max_staleness: 0s + ec2tagger: + ec2_instance_tag_keys: + - AutoScalingGroupName + ec2_metadata_tags: + - ImageId + - InstanceId + - InstanceType + imds_retries: 1 + refresh_interval_seconds: 0s receivers: - otlp/metrics: - protocols: - grpc: - dialer: - timeout: 0s - endpoint: 0.0.0.0:1234 - include_metadata: false - max_concurrent_streams: 0 - max_recv_msg_size_mib: 0 - read_buffer_size: 524288 - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - transport: tcp - write_buffer_size: 0 - http: - endpoint: 0.0.0.0:2345 - include_metadata: false - logs_url_path: /v1/logs - max_request_body_size: 0 - metrics_url_path: /v1/metrics - tls: - ca_file: "" - cert_file: /path/to/cert.pem - client_ca_file: "" - client_ca_file_reload: false - include_system_ca_certs_pool: false - key_file: /path/to/key.pem - max_version: "" - min_version: "" - reload_interval: 0s - traces_url_path: /v1/traces + otlp/metrics: + protocols: + grpc: + dialer: + timeout: 0s + endpoint: 0.0.0.0:1234 + include_metadata: false + max_concurrent_streams: 0 + max_recv_msg_size_mib: 0 + read_buffer_size: 524288 + transport: tcp + write_buffer_size: 0 + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s + http: + endpoint: 0.0.0.0:2345 + include_metadata: false + logs_url_path: /v1/logs + max_request_body_size: 0 + metrics_url_path: /v1/metrics + traces_url_path: /v1/traces + tls: + ca_file: "" + cert_file: /path/to/cert.pem + client_ca_file: "" + client_ca_file_reload: false + include_system_ca_certs_pool: false + key_file: /path/to/key.pem + max_version: "" + min_version: "" + reload_interval: 0s service: - extensions: - - agenthealth/metrics - - entitystore - pipelines: - metrics/hostOtlpMetrics: - exporters: - - awscloudwatch - processors: - - cumulativetodelta/hostOtlpMetrics - - ec2tagger - receivers: - - otlp/metrics - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - entitystore + pipelines: + metrics/hostOtlpMetrics: + exporters: + - awscloudwatch + processors: + - cumulativetodelta/hostOtlpMetrics + - ec2tagger + receivers: + - otlp/metrics + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } diff --git a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml index f811c89411..cfce7bfa44 100644 --- a/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml +++ b/translator/tocwconfig/sampleConfig/procstat_memory_swap_config.yaml @@ -1,61 +1,61 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - profile: AmazonCloudWatchAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true - shared_credential_file: fake-path + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + profile: AmazonCloudWatchAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true + shared_credential_file: fake-path extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: OP - region_type: ACJ - entitystore: - mode: onPremise - profile: AmazonCloudWatchAgent - region: us-west-2 - shared_credential_file: fake-path + agenthealth/metrics: + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: OP + region_type: ACJ + entitystore: + mode: onPremise + profile: AmazonCloudWatchAgent + region: us-west-2 + shared_credential_file: fake-path receivers: - telegraf_procstat/793254176: - alias_name: amazon-cloudwatch-agent - collection_interval: 1m0s - initial_delay: 1s - timeout: 0s + telegraf_procstat/793254176: + alias_name: amazon-cloudwatch-agent + collection_interval: 1m0s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - entitystore - pipelines: - metrics/host: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_procstat/793254176 - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - entitystore + pipelines: + metrics/host: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_procstat/793254176 + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml index e417a5320a..df1b94808d 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/tmp/a.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/tmp/a.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml index 11a14c9ad5..e3327e1d00 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml index 391143c01f..a01b2785ed 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_default_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml b/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml index d29a89a498..e3dd15b6ba 100644 --- a/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml +++ b/translator/tocwconfig/sampleConfig/skip_log_timestamp_windows.yaml @@ -1,36 +1,36 @@ exporters: - nop: {} + nop: {} extensions: - entitystore: - mode: ec2 - region: us-west-2 + entitystore: + mode: "ec2" + region: us-west-2 receivers: - nop: {} + nop: {} service: - extensions: - - entitystore - pipelines: - metrics/nop: - exporters: - - nop - processors: [] - receivers: - - nop - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - output_paths: - - c:\tmp\am.log - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - entitystore + pipelines: + metrics/nop: + exporters: + - nop + processors: [] + receivers: + - nop + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + output_paths: + - c:\tmp\am.log + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml index 6160b8d27c..99724c7d28 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux.yaml @@ -23,7 +23,7 @@ extensions: processors: awsentity/resource: entity_type: Resource - platform: ec2 + platform: ec2 cumulativetodelta/hostDeltaMetrics: exclude: match_type: strict diff --git a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml index dba28bea71..13bac887c2 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_linux_with_common_config.yaml @@ -82,10 +82,10 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_mem - - telegraf_swap - telegraf_cpu - telegraf_disk + - telegraf_mem + - telegraf_swap metrics/hostDeltaMetrics: exporters: - awscloudwatch diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml index b21170012f..8df619d970 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows.yaml @@ -28,9 +28,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: - - InstanceType - ImageId - InstanceId + - InstanceType refresh_interval_seconds: 0s receivers: telegraf_win_perf_counters/1492679118: @@ -70,11 +70,11 @@ service: - awsentity/resource - ec2tagger receivers: - - telegraf_win_perf_counters/3762679655 - telegraf_win_perf_counters/4283769065 - telegraf_win_perf_counters/1492679118 - telegraf_win_perf_counters/3610923661 - telegraf_win_perf_counters/3446270237 + - telegraf_win_perf_counters/3762679655 telemetry: logs: development: false diff --git a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml index 4b47c80f3c..2914d1bb74 100644 --- a/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml +++ b/translator/tocwconfig/sampleConfig/standard_config_windows_with_common_config.yaml @@ -32,9 +32,9 @@ processors: ec2_instance_tag_keys: - AutoScalingGroupName ec2_metadata_tags: + - InstanceType - ImageId - InstanceId - - InstanceType imds_retries: 2 profile: AmazonCloudWatchAgent refresh_interval_seconds: 0s diff --git a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml index 9bbfe327b6..0034301d02 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_linux.yaml @@ -23,8 +23,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 receivers: telegraf_statsd: collection_interval: 10s diff --git a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml index 477bf89526..6aeeae4dd6 100644 --- a/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_config_windows.yaml @@ -23,8 +23,8 @@ extensions: processors: awsentity/service/telegraf: entity_type: Service - platform: ec2 scrape_datapoint_attribute: true + platform: ec2 receivers: telegraf_statsd: collection_interval: 10s diff --git a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml index 4190308c25..0e0e2da5a1 100644 --- a/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_ecs_config.yaml @@ -1,50 +1,50 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EC2 - region_type: ACJ + agenthealth/metrics: + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EC2 + region_type: ACJ receivers: - telegraf_statsd: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_statsd: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - pipelines: - metrics/hostCustomMetrics: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_statsd - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + pipelines: + metrics/hostCustomMetrics: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_statsd + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml index 4539d123c6..2ed69a21d4 100644 --- a/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/statsd_eks_config.yaml @@ -1,61 +1,61 @@ exporters: - awscloudwatch: - force_flush_interval: 1m0s - max_datums_per_call: 1000 - max_values_per_datum: 150 - middleware: agenthealth/metrics - namespace: CWAgent - region: us-west-2 - resource_to_telemetry_conversion: - enabled: true + awscloudwatch: + force_flush_interval: 1m0s + max_datums_per_call: 1000 + max_values_per_datum: 150 + middleware: agenthealth/metrics + namespace: CWAgent + region: us-west-2 + resource_to_telemetry_conversion: + enabled: true extensions: - agenthealth/metrics: - is_usage_data_enabled: true - stats: - operations: - - PutMetricData - usage_flags: - mode: EKS - region_type: ACJ - entitystore: - kubernetes_mode: EKS - mode: ec2 - region: us-west-2 - server: - listen_addr: :4311 - tls_ca_path: /etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt - tls_cert_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.crt - tls_key_path: /etc/amazon-cloudwatch-observability-agent-server-cert/server.key + agenthealth/metrics: + is_usage_data_enabled: true + stats: + operations: + - PutMetricData + usage_flags: + mode: EKS + region_type: ACJ + entitystore: + mode: ec2 + region: us-west-2 + kubernetes_mode: EKS + server: + listen_addr: :4311 + tls_ca_path: "/etc/amazon-cloudwatch-observability-agent-client-cert/tls-ca.crt" + tls_cert_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.crt" + tls_key_path: "/etc/amazon-cloudwatch-observability-agent-server-cert/server.key" receivers: - telegraf_statsd: - collection_interval: 10s - initial_delay: 1s - timeout: 0s + telegraf_statsd: + collection_interval: 10s + initial_delay: 1s + timeout: 0s service: - extensions: - - agenthealth/metrics - - entitystore - - server - pipelines: - metrics/hostCustomMetrics: - exporters: - - awscloudwatch - processors: [] - receivers: - - telegraf_statsd - telemetry: - logs: - development: false - disable_caller: false - disable_stacktrace: false - encoding: console - level: info - sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s - metrics: - address: "" - level: None - traces: {} + extensions: + - agenthealth/metrics + - entitystore + - server + pipelines: + metrics/hostCustomMetrics: + exporters: + - awscloudwatch + processors: [] + receivers: + - telegraf_statsd + telemetry: + logs: + development: false + disable_caller: false + disable_stacktrace: false + encoding: console + level: info + sampling: + enabled: true + initial: 2 + thereafter: 500 + tick: 10s + metrics: + address: "" + level: None + traces: {} diff --git a/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml b/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml index 391143c01f..78c680ddcf 100644 --- a/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml +++ b/translator/tocwconfig/sampleConfig/windows_eventlog_only_config.yaml @@ -2,13 +2,13 @@ exporters: nop: {} extensions: entitystore: - mode: ec2 - region: us-west-2 + mode: "ec2" + region: us-west-2 receivers: nop: {} service: extensions: - - entitystore + - entitystore pipelines: metrics/nop: exporters: @@ -24,13 +24,13 @@ service: encoding: console level: info output_paths: - - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log + - c:\ProgramData\Amazon\AmazonCloudWatchAgent\Logs\amazon-cloudwatch-agent.log sampling: - enabled: true - initial: 2 - thereafter: 500 - tick: 10s + enabled: true + initial: 2 + thereafter: 500 + tick: 10s metrics: address: "" level: None - traces: {} + traces: { } \ No newline at end of file diff --git a/translator/tocwconfig/tocwconfig_test.go b/translator/tocwconfig/tocwconfig_test.go index 218e2d3c13..c607257a3a 100644 --- a/translator/tocwconfig/tocwconfig_test.go +++ b/translator/tocwconfig/tocwconfig_test.go @@ -774,12 +774,11 @@ func verifyToYamlTranslation(t *testing.T, input interface{}, expectedYamlFilePa require.NoError(t, err) yamlStr := toyamlconfig.ToYamlConfig(yamlConfig) require.NoError(t, yaml.Unmarshal([]byte(yamlStr), &actual)) - //assert.NoError(t, os.WriteFile(expectedYamlFilePath, []byte(yamlStr), 0644)) // useful for regenerating YAML opt := cmpopts.SortSlices(func(x, y interface{}) bool { return pretty.Sprint(x) < pretty.Sprint(y) }) - //assert.Equal(t, expected, actual) // this is useful for debugging differences between the YAML + // assert.Equal(t, expected, actual) // this is useful for debugging differences between the YAML require.True(t, cmp.Equal(expected, actual, opt), "D! YAML diff: %s", cmp.Diff(expected, actual)) } From f64b332d600f88ff5c1ed7659a3f8d9f5add90bd Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 18:02:41 -0500 Subject: [PATCH 32/48] removing internal changes --- internal/tls/testdata/server.crt | 44 +++++++++++++-------------- internal/tls/testdata/server.key | 52 ++++++++++++++++---------------- internal/tls/testdata/tls-ca.crt | 50 +++++++++++++++--------------- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 32180f9832..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGTCCAgGgAwIBAgIRAJod3LqRKFW/22rMh8kx5wYwDQYJKoZIhvcNAQELBQAw -EjEQMA4GA1UEChMHUm9vdCBDQTAeFw0yNDExMTkyMjU4MTJaFw0yNDExMTkyMzU4 -MTJaMBUxEzARBgNVBAoTCkt1YmVybmV0ZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDFb68a9n3w6373C2BcfefNqPx3mfV5RVE7QLXanDUkaN/eFPzw -iUfRq6DWoTODD0G/tBuJmXP/6bLTyDRGljtKmpLm57IgAMDgBIwL+YFLxeEkfwoh -rz5E3YAUfZeGZhdQv3yHnhuPRZWBEYxHZ2zXALtV2u/7jhVrr17ylXe1LhQoI4SH -BLXmszSiPfUwamz8lUwptClF2ymjf/k99VEBNxL71n/vASfUJ5mOkxsUNO1xn6b8 -jTZiACAMQ+CAUfPmrOWljr042FXzxOQFzHEEzKo1edvXIOrcBzWrj7PpeIv4YzZw -/xld/zI3oBFWWphfK3uJepq6eqVtoChdNkhbAgMBAAGjZzBlMA4GA1UdDwEB/wQE -AwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB8GA1UdIwQY -MBaAFC3eobfBsK9iPtSsypG2sK1J6aKeMA8GA1UdEQQIMAaHBH8AAAEwDQYJKoZI -hvcNAQELBQADggIBAL41rosLV+MlHKOIGESDYXGTagqzZnYnjeEd4ZsJ5R9R7eek -5nFgOm5ZBSFtKsHZwq5OrUh4nLyJ3DhEshV0w3EJGkdNMhTMWQgLdoc1KKrX+RJi -XLnhRbVcWI8Ln4utl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ked6z +fMaQRgzOSPDc062QTODHB2IkShVZAeLh7OcCAwEAAaNnMGUwDgYDVR0PAQH/BAQD +AgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgw +FoAUhscCtqKglSlRCx9YNN1D/Xz5MpMwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG +9w0BAQsFAAOCAgEAcxCGmWNtuM9V2yi0SOSLfxlSK7F1OS5qQuLWkZSDB1f+XG82 +PNDwSrV4J42qZcFfKrEt1HtS/Ws6VRlLrSnYArNSyQvNTeNf0q/rX9yO8wRcCM5K +sb8uv27xdawjN6F3z59rpJOf9ldX4ASrRZHzX/ttvvNcUdbCZsF5+h2EhcwNVVUa +Q6vlAW8u4Ik9HXxJ+W2HEdlSYWcCdTK4hDCtJhwqEBua1VdKwSdrlDZJPswAdCzv +CR3Fj4NsmPRDw8uCPIL4hwk5fbffcn3rZrsOXSMTKxvdyP+XBPKWEoIs6cxvdE3o +sG65EZeGpj0vLN+rLEbumkvgCAHACgVxvyDeJnajoA6lPNxfzby+9CmhLZfgaVbE +nVQTj8hkUW1gtvnAP3v1Zbe3QMhlqWqwfwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index ec71f82f23..0efcb40bb3 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgI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XeVeVOEjMXQEjZ8Po+FfUvVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index a68c13893f..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTExOTIyNTgxNFoXDTM0MTExOTIyNTgxNFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMsBV4crk8X6 -/wJceGXm/0qKOskFq8dVTOdCbgEWtWJbLu52QszsCP2i1scpZxrD+q9H2o1OajIe -zmyptU1kajqSRIr+1p/vBNICpUDYAHvhuIjbEboS049RTYkO4EfJN1hl1Ai9ujka -PRqIf18AdFnWlJ8IHvFfQ+kTuQ/ovi+0kbqiLgGiy0Nddazxvgd4sLMYNkZOdYZt -hzVFzXGKI8EWgAT4NvSnZHKOYqbboid8c+CChRn7dcuLAl1z1VrGfkmDAGNWU4D/ -Ukq/cUSBZFF5v1dIpuTwH2yqswbTBY6HkUGijrWla2oJLObgEFxopRk5FZZLTdev -PuOUjnts6wH13vQ7YVRxuGl5PMHXO8XbBblV89Dj65MUFuOR9rFUofy61FlNlWmQ -OFDuSBgVbK7zbW7Y0DxiZk2PL3u1JlIu0ChtevS66gT92NLx9UYvoWPlQevKu5lb -4qqC4gep5Po0TVbsdwJQM7Bk1OuLDuZ7yohzOLsWh0yJd1dhTK5dCOqnsWp5xcN0 -z9qvLFNCwFBh6LOGSqmPrcHgR3sIZbMCG8Jq/m+B67UDqE/xzTDPFy9nZeh0scsf -d33lF9bqwsWr0dPKBJ7mLjfeOxFmIH9/m/6y+qcaRMlO8Z7sLV/o5ei8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E1GI8kFjQsuiBD0RGNj1Db/m9lnxOX2B1vKOHRtg +Q3LQURMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- From fa4c1633bb2629aa1a185d02910c550bda826508 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 18:07:24 -0500 Subject: [PATCH 33/48] restoring files --- .../handler/stats/agent/agent_test.go | 5 -- .../agenthealth/handler/stats/handler.go | 3 +- .../handler/stats/provider/interval.go | 4 -- .../handler/stats/provider/statuscode_test.go | 8 --- internal/tls/testdata/server.crt | 44 ++++++++-------- internal/tls/testdata/server.key | 52 +++++++++---------- internal/tls/testdata/tls-ca.crt | 50 +++++++++--------- plugins/processors/ec2tagger/config.go | 2 - 8 files changed, 74 insertions(+), 94 deletions(-) diff --git a/extension/agenthealth/handler/stats/agent/agent_test.go b/extension/agenthealth/handler/stats/agent/agent_test.go index 9ec8177156..631de211c5 100644 --- a/extension/agenthealth/handler/stats/agent/agent_test.go +++ b/extension/agenthealth/handler/stats/agent/agent_test.go @@ -11,14 +11,12 @@ import ( ) func TestMergeWithStatusCodes(t *testing.T) { - // Initial stats with some status codes stats := &Stats{ StatusCodes: map[string][5]int{ "operation1": {1, 2, 3, 4, 5}, }, } - // Merge with new stats containing additional status codes stats.Merge(Stats{ StatusCodes: map[string][5]int{ "operation1": {2, 3, 4, 5, 6}, // Existing operation with new values @@ -26,16 +24,13 @@ func TestMergeWithStatusCodes(t *testing.T) { }, }) - // Assert merged values assert.Equal(t, [5]int{3, 5, 7, 9, 11}, stats.StatusCodes["operation1"]) // Values should sum assert.Equal(t, [5]int{0, 1, 2, 3, 4}, stats.StatusCodes["operation2"]) // New operation added - // Merge with empty StatusCodes map stats.Merge(Stats{ StatusCodes: nil, }) - // Assert that StatusCodes remains unchanged assert.Equal(t, [5]int{3, 5, 7, 9, 11}, stats.StatusCodes["operation1"]) assert.Equal(t, [5]int{0, 1, 2, 3, 4}, stats.StatusCodes["operation2"]) } diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index e6d00ece83..14f553c3cd 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -87,7 +87,6 @@ func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { } func (sh *statsHandler) Header(operation string) string { - stats := &agent.Stats{} for _, p := range sh.providers { stats.Merge(p.Stats(operation)) @@ -96,7 +95,7 @@ func (sh *statsHandler) Header(operation string) string { header, err := stats.Marshal() if err != nil { - return "" + sh.logger.Warn("Failed to serialize agent stats", zap.Error(err)) } return header diff --git a/extension/agenthealth/handler/stats/provider/interval.go b/extension/agenthealth/handler/stats/provider/interval.go index d2ac2e57ab..9856970a22 100644 --- a/extension/agenthealth/handler/stats/provider/interval.go +++ b/extension/agenthealth/handler/stats/provider/interval.go @@ -41,18 +41,14 @@ func (p *intervalStats) Stats(string) agent.Stats { func (p *intervalStats) getStats() agent.Stats { var stats agent.Stats - // Load the value from the stats field if value := p.stats.Load(); value != nil { - // Perform type assertion safely if s, ok := value.(agent.Stats); ok { stats = s } else { - // Handle the case where the value is not of the expected type log.Println("Error: Loaded value is not of type agent.Stats") } } - // Ensure that the map is not nil if stats.StatusCodes == nil { stats.StatusCodes = make(map[string][5]int) } diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go index 8b219477d1..0d8a850e17 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -13,22 +13,14 @@ import ( ) func TestStatusCodeHandler(t *testing.T) { - // Create a mock OperationsFilter filter := agent.NewStatusCodeOperationsFilter() - - // Retrieve the handler with the mock filter handler := GetStatusCodeStats(filter) require.NotNil(t, handler) - handler.statsByOperation.Store("pmd", &[5]int{1, 2, 0, 1, 0}) - stats := handler.Stats("pmd") - expected := [5]int{1, 2, 0, 1, 0} - actualStats := stats.StatusCodes["pmd"] assert.Equal(t, expected, actualStats, "Unexpected stats values for operation 'pmd'") - assert.Contains(t, stats.StatusCodes, "pmd", "Status code map should contain 'pmd'") assert.Equal(t, expected, stats.StatusCodes["pmd"], "Stats for 'pmd' do not match") } diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..7418d2e4d6 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTAyMjIyMzYzNloXDTI0MTAyMjIzMzYz -NlowFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAP3MeHLv7sragkzD8iOj75YCJvOoys4Iy+EVwZhLAdtx+K89IOJr -6EKknoI0/FZowg5xuz4sE3sK8uQVAjtN0u4Mu6oQm94uSB5RxGvkBV6vn+3JxUdC -+fj+KiTg0x+pEoDxVXSrL3gF2ZtvfNdC05+FCk39pdEPe5tbnh+IPtcXSqWmtWEB -LiHPhSU0HN5JWsfQZ2VkB8rFStQ8CwFG0DW9i6GSVsN1zmmzLQdVPAyP4Uzy8844 -/ceZsmlkIe6uk3BiRRNThUcJKlFJJroCBJ8y7AJA8s3teLWskRLik+0xintked6z -fMaQRgzOSPDc062QTODHB2IkShVZAeLh7OcCAwEAAaNn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qAuhGYEMJiOS/r9bxSTrWS9BUKwfL3z8Pvb +prgmnLesA9Mrgyk5hNYkzAKHrEMIlbmmHtNHf9e1vBl30NIG3CcWtU8PbQvLo/a+ +EwB7Ao90Xp/BsYInJyzDKV3c0ndfFFbZVUTQbupc+Ehb2QOVP8NiKIvTq6/r -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..aa112a6e01 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7XF0qlprVhAS4hz4UlNBzeSVrH0GdlZAfKxUrU -PAsBRtA1vYuhklbDdc5psy0HVTwMj+FM8vPOOP3HmbJpZCHurpNwYkUTU4VHCSpR -SSa6AgSfMuwCQPLN7Xi1rJES4pPtMYp7ZHnes3zGkEYMzkjw3NOtkEzgxwdiJEoV -WQHi4eznAgMBAAECggEAGv7z1O32jXc+ouG40NewNVmXQRW0NMQ0w4Vn6UYZNXlj -BWjQJaVquCQAhEMUkDBma9jnHM7dZ5obie0+Joa5p/6Mu6M2oSR1IVx7Myq284Jk -1Ys/w7u5ESYf33pWmqiGQlbpSxamXvLoWaM7OT5veilRlkgjqiAmerj9EceRP5mR -aheVE5ctY5oZmdnvA9OcN6B8Oxk59EWEOECs8qAF/ChYfC8pWKOp4U0RILQ/9jXD -lu4p0C2XyadrJReer3whudUADWa/WSxgVCrx85/g/RTKs38KTPy7W4g3bv8KBRhc -bjLzoYTl6esRAi8nMG5Fc/85t07hkVv+j5a1NccxgQKBgQD/y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3pProGRKL2XljHSIMcCWpj1zshAoGAAr7j +/t3covViS0UOSNk082ItTlxrN0IZ/yYhcWqa+FT2LLF7WW1XJsvlhZk9IUC0V76f +tIh9a1liEmI7PUWruEJyr3al7XZWS74POZkjF2FfLFKMNy4Uk5z6wmndsoJ6RMy7 +PteOVSHKyglVfqjTBtAeRnjiVbkY55IlH4SA37kCgYBLAcs2UehfNR/zypbj4lkt +iFSPPkY+ffK3mWc2ejidN03IxCSwcyhXIN9A6u21mqQdweOX5c3MOkROHdswIe80 +1nzfj3KHFofp2GEFalVZM3u1g/cROlHo/f36KLVnefl6leFk1uYsO7ZE0xqI8FeD +buGK4cBypsbIUVlAqGpkDg== -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..f77cf4f16c 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTAyMjIyMzYzOFoXDTM0MTAyMjIyMzYzOFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJrhBEDtGS+b -WAVvkFJuQAkDbCCToy39eJ+51ZS/wA1yuVde8JvtX95dZC0STNm7GnxfIwH8tOut -gc82vz2Bim2K1N9uzBDu6flGWXpzXZSSuMAj1q8MRhEs1OpfbLuqxMs/TAbGYGqa -6FPlUWCwMZvpiRpV+hGxRIp9OsAYn/oVUvuACXnADEwBUYnGL3c9FYPn+kkjpsfH -vaH5kY8uTpKNIbmerYBCIt7X0QXcLOxk2CdnapKuIjaTML8og1/rMPbRsnGvIebh -FZsA60QnhuNiL6MowdJn17/Stl6Rs7cNV5zq3/WmaiipOoTcrKIMgA5ci23A69Pz -0WRfomoFsstRWHhimGrKrT5ewznE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d +B0/Uo+il/st1FT8uKsmk3j+GbZdcLgACGiJQf1uG3B4ptyk20JTBmIQ5ENbOasw6 +/c8kg16GEGoeF3aGVJBF6zZlTt+yfE2oquTDfSQ2DT0IjTHQ5XlUb/M9ZZyJrQik +nFQgc8NLXiJOcqxhKxyzPzpCp0oOC+K5CL6lWeIWYV9pP4tqp63c9P2uAmElkZWs +VLXLRrV4s/FNZsYj+Bz59omfzPJap8vXxRhVD/pP1o8gpmnYsi5SXwtHSKWjtitQ +fsL4EkO02CSYS1+5MYe0juvWAgVlG0yR5u8PdtQIgJSSsA7m+s6UNt6PCAttjUKW +XOjsUkV1mDmt1Q6xsyn0WVaanPXgKV3xZqCer52jh3lu+pS3hwO+n+syq/11B7XC +qrst2AW+Hu4Le3S0vezhTb03YYazKiDdT5Rt+ag3VV740306MwdwD5Vkz6iKWMBi +FG89yfQUYz6BAlmKae8z93y7KE33egYnPDV6sYh6CgNhDUMqEimB81RfbMD+5JVH +GJAOKySihIjeO+T/ywx2OW2C+fSK0wC7YJ0Z0viHWDQ7dLYM619Z4WU+PnKPu05/ +U4pEPK5Y8UREuy/Ds8dP9jsnQhTYXL7/xcc= -----END CERTIFICATE----- diff --git a/plugins/processors/ec2tagger/config.go b/plugins/processors/ec2tagger/config.go index 9119139567..1b0549de6e 100644 --- a/plugins/processors/ec2tagger/config.go +++ b/plugins/processors/ec2tagger/config.go @@ -38,8 +38,6 @@ type Config struct { Filename string `mapstructure:"shared_credential_file,omitempty"` Token string `mapstructure:"token,omitempty"` IMDSRetries int `mapstructure:"imds_retries,omitempty"` - - MiddlewareID *component.ID `mapstructure:"middleware,omitempty"` } // Verify Config implements Processor interface. From 457e48c744e58c4f11979d812ddf44c32c0f44a6 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 18:08:42 -0500 Subject: [PATCH 34/48] removing unnecessary file changes and passing unit test --- internal/tls/testdata/server.crt | 44 +++++++++++++-------------- internal/tls/testdata/server.key | 52 ++++++++++++++++---------------- internal/tls/testdata/tls-ca.crt | 50 +++++++++++++++--------------- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 7418d2e4d6..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGTCCAgGgAwIBAgIRAMteT9XiIKUTCXx0IZAFmUwwDQYJKoZIhvcNAQELBQAw -EjEQMA4GA1UEChMHUm9vdCBDQTAeFw0yNDExMTkyMzAzMjhaFw0yNDExMjAwMDAz -MjhaMBUxEzARBgNVBAoTCkt1YmVybmV0ZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQCrJbHbyXUkhcRvmsbzQfIOI5sQViXY1l1852G/du7CLFEpmcWG -zXBciAAy96WDqMbs2dkaEIAphGnoOK1ydp6ZLp6erVhIl+TUyZ3z7floH5wfge0E -UAh7I72ZwYyDYhCBy6tA498SvzfX5R+03E+bh7lO7s5bS/ImEuav2NJcGb5tSNHm -UN0zfZJWN/tXB0imo4Ku6nYyUj2KoX6/Q7BaKNidwdwH8G9o+w9F+KY1f/myvd3/ -Djy1+p6vm95nQaFG6dSR+cXz6lH79SWARq1mWOqHo5x/03TjdvMuNG1Pq3COH519 -xt/trlzzcNskMJb6V7AbGPFXGvV9IzxSj66NAgMBAAGjZzBlMA4GA1UdDwEB/wQE -AwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB8GA1UdIwQY -MBaAFIQmJ4BOw9L3WBRada9Ha7bO6selMA8GA1UdEQQIMAaHBH8AAAEwDQYJKoZI -hvcNAQELBQADggIBAJWK54Mry2HDLJIqWWRTlSyWnhq1j7igsJc68keLRoI4c/bP -kat/ycwpQ5Ku5fwN9AfknZhHsNW8ypPjTLNiYnq4fs0FJ8aN7GGBKTlIQpf7wYCD -u3HrVme1YpVkJjGL5Xc0JJ0yW8z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+0xintked6z +fMaQRgzOSPDc062QTODHB2IkShVZAeLh7OcCAwEAAaNnMGUwDgYDVR0PAQH/BAQD +AgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgw +FoAUhscCtqKglSlRCx9YNN1D/Xz5MpMwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG +9w0BAQsFAAOCAgEAcxCGmWNtuM9V2yi0SOSLfxlSK7F1OS5qQuLWkZSDB1f+XG82 +PNDwSrV4J42qZcFfKrEt1HtS/Ws6VRlLrSnYArNSyQvNTeNf0q/rX9yO8wRcCM5K +sb8uv27xdawjN6F3z59rpJOf9ldX4ASrRZHzX/ttvvNcUdbCZsF5+h2EhcwNVVUa +Q6vlAW8u4Ik9HXxJ+W2HEdlSYWcCdTK4hDCtJhwqEBua1VdKwSdrlDZJPswAdCzv +CR3Fj4NsmPRDw8uCPIL4hwk5fbffcn3rZrsOXSMTKxvdyP+XBPKWEoIs6cxvdE3o +sG65EZeGpj0vLN+rLEbumkvgCAHACgVxvyDeJnajoA6lPNxfzby+9CmhLZfgaVbE +nVQTj8hkUW1gtvnAP3v1Zbe3QMhlqWqwfwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index aa112a6e01..0efcb40bb3 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MII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vVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index f77cf4f16c..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTExOTIzMDMzM1oXDTM0MTExOTIzMDMzM1owEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJbjg1LmHQFw -4ivYOOIKDn2XVERDjPQScbND/kCpUuuc5XCfgeHjcFLzfrBIWin+TM1UAWQq46jQ -v9kx40nfb7mpiw19ZDhFNnsjcB1PFiBivdirf1BRQuvGRf3NjmhNN/oRf5t2fz2j -fTPN6ILseLkz1QSnplpuzeEzU9EwwG6yfkQlCNODpP0aJLtt1k9JlV+2tBV+6DjG -QSqC0r5Aah/7eY2KCBOAEMyfN9RO7fFuLRBkvY5Iw0SQyr1l/Se+A86rI11I88ex -RFn981Lc+RuNGhg23n6Oao1srSHnB1K2cFOEDZKuicrRnvW383QEGUHIb3cTeAlt -+BbXBjlEq5cRwv0HuGV0+gQxYCgGVT+nLzRsJYKGWDYyk1WAAtHEeWo/OxiDyGsP -jEimcDoO9Ehgs/q9Yf0Yw0jqme/I2GfJ9lUVTbEIBe4trOZ8TBlww+Vsd+YFS+th -sdjxKVcM3gaCM5cinEoT+pNe+QAj8LGXjknXA95LEVwP7b2Q61egSVPVkBANwtZc -F0x9wtL1C7VoM/iPkGNgcrbn9V3IPDVSRZZTBRmrW33UFvZ61MdDg4n7OFde0ZYa -hfbafwnPN3uWZIn3ftgdhRlnOZSbcYNOCHhfq96OQlUFhtDEHQ6g5RT0lrNrP5ZP -1gqulk3dxvb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nxOX2B1vKOHRtg +Q3LQURMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- From 2705e87e9b5119e30ca6629d606a38a65d9a2d7d Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 19 Nov 2024 18:12:03 -0500 Subject: [PATCH 35/48] cleaning up code --- extension/agenthealth/handler/stats/handler.go | 9 --------- extension/agenthealth/handler/stats/provider/interval.go | 1 - 2 files changed, 10 deletions(-) diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 14f553c3cd..d7630fbeaa 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -5,7 +5,6 @@ package stats import ( "context" - "log" "net/http" "sync" @@ -72,17 +71,12 @@ func (sh *statsHandler) Position() awsmiddleware.HandlerPosition { func (sh *statsHandler) HandleRequest(ctx context.Context, r *http.Request) { operation := awsmiddleware.GetOperationName(ctx) - if !sh.filter.IsAllowed(operation) { return } - header := sh.Header(operation) - if header != "" { r.Header.Set(headerKeyAgentStats, header) - } else { - log.Println("No header generated for operation:", operation) } } @@ -90,13 +84,10 @@ func (sh *statsHandler) Header(operation string) string { stats := &agent.Stats{} for _, p := range sh.providers { stats.Merge(p.Stats(operation)) - } - header, err := stats.Marshal() if err != nil { sh.logger.Warn("Failed to serialize agent stats", zap.Error(err)) } - return header } diff --git a/extension/agenthealth/handler/stats/provider/interval.go b/extension/agenthealth/handler/stats/provider/interval.go index 9856970a22..00cb857de6 100644 --- a/extension/agenthealth/handler/stats/provider/interval.go +++ b/extension/agenthealth/handler/stats/provider/interval.go @@ -52,7 +52,6 @@ func (p *intervalStats) getStats() agent.Stats { if stats.StatusCodes == nil { stats.StatusCodes = make(map[string][5]int) } - return stats } From 308362692f2514806f87aa91ebe78eb62605b84a Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 20 Nov 2024 15:58:08 -0500 Subject: [PATCH 36/48] fixing up pointer issue and passing in operations --- extension/agenthealth/extension.go | 5 +++- .../agenthealth/handler/stats/agent/agent.go | 24 +++++-------------- .../agenthealth/handler/stats/handler.go | 2 +- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index 669c98a98a..ba597f4964 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -30,7 +30,10 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa return requestHandlers, responseHandlers } - statusCodeOnly := ah.cfg.StatusCodeOnly != nil + statusCodeOnly := false + if ah.cfg.StatusCodeOnly != nil { + statusCodeOnly = *ah.cfg.StatusCodeOnly + } statsRequestHandlers, statsResponseHandlers := stats.NewHandlers(ah.logger, ah.cfg.Stats, statusCodeOnly) requestHandlers = append(requestHandlers, statsRequestHandlers...) responseHandlers = append(responseHandlers, statsResponseHandlers...) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 85e4d252aa..ff1c731f7b 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -173,22 +173,6 @@ var StatusCodeOperations = []string{ // all the operations that are allowed "CreateLogStream", } -var StatusCodeAndOtherOperations = []string{ // all the operations that are allowed - "PutMetricData", - "PutLogEvents", - "PutTraceSegments", - "DescribeInstances", - "DescribeTags", - "DescribeVolumes", - "DescribeContainerInstances", - "DescribeServices", - "DescribeTaskDefinition", - "ListServices", - "ListTasks", - "CreateLogGroup", - "CreateLogStream", -} - // NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. func NewStatusCodeOperationsFilter() OperationsFilter { allowed := collections.NewSet[string](StatusCodeOperations...) @@ -199,8 +183,12 @@ func NewStatusCodeOperationsFilter() OperationsFilter { } } -func NewStatusCodeAndOtherOperationsFilter() OperationsFilter { - allowed := collections.NewSet[string](StatusCodeAndOtherOperations...) +func NewStatusCodeAndOtherOperationsFilter(operations []string) OperationsFilter { + allowed := collections.NewSet[string](StatusCodeOperations...) + + for _, operation := range operations { + allowed.Add(operation) + } return OperationsFilter{ operations: allowed, diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index d7630fbeaa..6aea128be6 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -27,7 +27,7 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } - filter := agent.NewStatusCodeAndOtherOperationsFilter() + filter := agent.NewStatusCodeAndOtherOperationsFilter(cfg.Operations) clientStats := client.NewHandler(filter) statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) From 9e40bd892112d667eeb14d871d6144d9dc3ce89e Mon Sep 17 00:00:00 2001 From: Paramadon Date: Wed, 20 Nov 2024 16:52:30 -0500 Subject: [PATCH 37/48] adding agent health to prometheus --- .../amazon-cloudwatch-agent.go | 1 - .../containerinstanceprocessor.go | 1 + plugins/inputs/prometheus/prometheus.go | 16 ++++++++++++++++ tool/clean/clean_host/clean_host.go | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go b/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go index da084dedcd..56960e2a3e 100644 --- a/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go +++ b/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go @@ -245,7 +245,6 @@ func runAgent(ctx context.Context, c.OutputFilters = outputFilters c.InputFilters = inputFilters c.AllowUnusedFields = true - err = loadTomlConfigIntoAgent(c) if err != nil { return err diff --git a/internal/ecsservicediscovery/containerinstanceprocessor.go b/internal/ecsservicediscovery/containerinstanceprocessor.go index ffc0c84010..6da7318bc7 100644 --- a/internal/ecsservicediscovery/containerinstanceprocessor.go +++ b/internal/ecsservicediscovery/containerinstanceprocessor.go @@ -64,6 +64,7 @@ func splitMapKeys(a map[string]*EC2MetaData, size int) [][]string { } func (p *ContainerInstanceProcessor) handleContainerInstances(cluster string, batch []string, containerInstanceMap map[string]*EC2MetaData) error { + log.Println("yooooo we in above describe instances for host") ec2Id2containerInstanceIdMap := make(map[string]*string) input := &ecs.DescribeContainerInstancesInput{ Cluster: &cluster, diff --git a/plugins/inputs/prometheus/prometheus.go b/plugins/inputs/prometheus/prometheus.go index 5497421cd2..68e1ae2ca8 100644 --- a/plugins/inputs/prometheus/prometheus.go +++ b/plugins/inputs/prometheus/prometheus.go @@ -5,6 +5,11 @@ package prometheus import ( _ "embed" + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/amazon-cloudwatch-agent/cfg/envconfig" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "go.uber.org/zap" "sync" "github.com/influxdata/telegraf" @@ -23,6 +28,7 @@ type Prometheus struct { mbCh chan PrometheusMetricBatch shutDownChan chan interface{} wg sync.WaitGroup + middleware awsmiddleware.Middleware } func (p *Prometheus) SampleConfig() string { @@ -74,9 +80,19 @@ func (p *Prometheus) Stop() { func init() { inputs.Add("prometheus", func() telegraf.Input { + boolean := true return &Prometheus{ mbCh: make(chan PrometheusMetricBatch, 10000), shutDownChan: make(chan interface{}), + middleware: agenthealth.NewAgentHealth( + zap.NewNop(), + &agenthealth.Config{ + IsUsageDataEnabled: envconfig.IsUsageDataEnabled(), + Stats: agent.StatsConfig{}, + StatusCodeOnly: &boolean, + }, + ), } + }) } diff --git a/tool/clean/clean_host/clean_host.go b/tool/clean/clean_host/clean_host.go index 31a7d9b5d4..d701fdc40b 100644 --- a/tool/clean/clean_host/clean_host.go +++ b/tool/clean/clean_host/clean_host.go @@ -39,6 +39,7 @@ func cleanHost() error { } func terminateInstances(cxt context.Context, ec2client *ec2.Client) { + log.Println("yooooo we in above describe instances") maxResults := int32(1000) nameFilter := types.Filter{Name: aws.String("tag:Name"), Values: []string{ "buildLinuxPackage", @@ -66,6 +67,7 @@ func terminateInstances(cxt context.Context, ec2client *ec2.Client) { for { instanceIds := make([]string, 0) expirationDateInstance := time.Now().UTC().Add(clean.KeepDurationOneDay) + log.Println("yooooo we in above describe instances for host") describeInstanceOutput, _ := ec2client.DescribeInstances(cxt, &instanceInput) for _, reservation := range describeInstanceOutput.Reservations { for _, instance := range reservation.Instances { From 5745ee636fc9532118958770dc38a03b43cd31fc Mon Sep 17 00:00:00 2001 From: Paramadon Date: Thu, 21 Nov 2024 20:01:18 -0500 Subject: [PATCH 38/48] resolving comments --- .../amazon-cloudwatch-agent.go | 1 + extension/agenthealth/config.go | 6 +- extension/agenthealth/extension.go | 4 +- .../agenthealth/handler/stats/agent/agent.go | 62 ++++------- .../handler/stats/agent/agent_test.go | 103 ++++++++++++++++++ .../agenthealth/handler/stats/handler.go | 6 +- .../agenthealth/handler/stats/handler_test.go | 15 ++- .../handler/stats/provider/interval.go | 10 +- .../handler/stats/provider/process_test.go | 3 +- .../handler/stats/provider/statuscode.go | 26 ++--- .../containerinstanceprocessor.go | 1 - plugins/inputs/prometheus/prometheus.go | 16 --- tool/clean/clean_host/clean_host.go | 1 - .../otel/extension/agenthealth/translator.go | 2 +- 14 files changed, 156 insertions(+), 100 deletions(-) diff --git a/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go b/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go index 56960e2a3e..da084dedcd 100644 --- a/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go +++ b/cmd/amazon-cloudwatch-agent/amazon-cloudwatch-agent.go @@ -245,6 +245,7 @@ func runAgent(ctx context.Context, c.OutputFilters = outputFilters c.InputFilters = inputFilters c.AllowUnusedFields = true + err = loadTomlConfigIntoAgent(c) if err != nil { return err diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index 696db2ceca..23d279a5d3 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -10,9 +10,9 @@ import ( ) type Config struct { - IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` - Stats agent.StatsConfig `mapstructure:"stats"` - StatusCodeOnly *bool `mapstructure:"is_status_code_only,omitempty"` + IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` + Stats agent.StatsConfig `mapstructure:"stats"` + IsOnlyStatusCodeEnabled *bool `mapstructure:"is_status_code_only,omitempty"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index ba597f4964..a381bc6bf7 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -31,8 +31,8 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa } statusCodeOnly := false - if ah.cfg.StatusCodeOnly != nil { - statusCodeOnly = *ah.cfg.StatusCodeOnly + if ah.cfg.IsOnlyStatusCodeEnabled != nil { + statusCodeOnly = *ah.cfg.IsOnlyStatusCodeEnabled } statsRequestHandlers, statsResponseHandlers := stats.NewHandlers(ah.logger, ah.cfg.Stats, statusCodeOnly) requestHandlers = append(requestHandlers, statsRequestHandlers...) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index ff1c731f7b..11dc462d26 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -5,7 +5,6 @@ package agent import ( "encoding/json" - "log" "strings" "github.com/aws/amazon-cloudwatch-agent/internal/util/collections" @@ -82,43 +81,26 @@ func (s *Stats) Merge(other Stats) { if other.EntityRejected != nil { s.EntityRejected = other.EntityRejected } - if other.StatusCodes != nil { - log.Println("Merging status codes from another source.") + if other.StatusCodes == nil { + return + } - if s.StatusCodes == nil { - log.Println("Initializing status codes map as it was nil.") - s.StatusCodes = make(map[string][5]int) - } + if s.StatusCodes == nil { + s.StatusCodes = make(map[string][5]int) + } - for key, value := range other.StatusCodes { - log.Printf("Processing key: %s with value: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", key, value[0], value[1], value[2], value[3], value[4]) - - if existing, ok := s.StatusCodes[key]; ok { - log.Printf( - "Key %s already exists. Existing: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d. Merging with: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", - key, existing[0], existing[1], existing[2], existing[3], existing[4], - value[0], value[1], value[2], value[3], value[4], - ) - - //Merge the values for each status code - s.StatusCodes[key] = [5]int{ - existing[0] + value[0], // 200 - existing[1] + value[1], // 400 - existing[2] + value[2], // 408 - existing[3] + value[3], // 413 - existing[4] + value[4], // 429 - } - - log.Printf( - "Updated key %s: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", - key, s.StatusCodes[key][0], s.StatusCodes[key][1], s.StatusCodes[key][2], s.StatusCodes[key][3], s.StatusCodes[key][4], - ) - } else { - log.Printf("Key %s does not exist. Adding it with: 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", key, value[0], value[1], value[2], value[3], value[4]) - s.StatusCodes[key] = value + for key, value := range other.StatusCodes { + if existing, ok := s.StatusCodes[key]; ok { + s.StatusCodes[key] = [5]int{ + existing[0] + value[0], // 200 + existing[1] + value[1], // 400 + existing[2] + value[2], // 408 + existing[3] + value[3], // 413 + existing[4] + value[4], // 429 } + } else { + s.StatusCodes[key] = value } - log.Println("Merging of status codes completed.") } } @@ -179,19 +161,15 @@ func NewStatusCodeOperationsFilter() OperationsFilter { return OperationsFilter{ operations: allowed, - allowAll: allowed.Contains(AllowAllOperations), + allowAll: false, } } func NewStatusCodeAndOtherOperationsFilter(operations []string) OperationsFilter { - allowed := collections.NewSet[string](StatusCodeOperations...) - + filter := NewStatusCodeOperationsFilter() for _, operation := range operations { - allowed.Add(operation) + filter.operations.Add(operation) } - return OperationsFilter{ - operations: allowed, - allowAll: allowed.Contains(AllowAllOperations), - } + return filter } diff --git a/extension/agenthealth/handler/stats/agent/agent_test.go b/extension/agenthealth/handler/stats/agent/agent_test.go index 631de211c5..f88ba822eb 100644 --- a/extension/agenthealth/handler/stats/agent/agent_test.go +++ b/extension/agenthealth/handler/stats/agent/agent_test.go @@ -10,6 +10,48 @@ import ( "github.com/stretchr/testify/assert" ) +func TestMerge(t *testing.T) { + stats := &Stats{CpuPercent: aws.Float64(1.2)} + assert.EqualValues(t, 1.2, *stats.CpuPercent) + assert.Nil(t, stats.MemoryBytes) + stats.Merge(Stats{ + CpuPercent: aws.Float64(1.3), + MemoryBytes: aws.Uint64(123), + }) + assert.EqualValues(t, 1.3, *stats.CpuPercent) + assert.EqualValues(t, 123, *stats.MemoryBytes) + stats.Merge(Stats{ + CpuPercent: aws.Float64(1.5), + MemoryBytes: aws.Uint64(133), + FileDescriptorCount: aws.Int32(456), + ThreadCount: aws.Int32(789), + LatencyMillis: aws.Int64(1234), + PayloadBytes: aws.Int(5678), + StatusCode: aws.Int(200), + SharedConfigFallback: aws.Int(1), + ImdsFallbackSucceed: aws.Int(1), + AppSignals: aws.Int(1), + EnhancedContainerInsights: aws.Int(1), + RunningInContainer: aws.Int(0), + RegionType: aws.String("RegionType"), + Mode: aws.String("Mode"), + }) + assert.EqualValues(t, 1.5, *stats.CpuPercent) + assert.EqualValues(t, 133, *stats.MemoryBytes) + assert.EqualValues(t, 456, *stats.FileDescriptorCount) + assert.EqualValues(t, 789, *stats.ThreadCount) + assert.EqualValues(t, 1234, *stats.LatencyMillis) + assert.EqualValues(t, 5678, *stats.PayloadBytes) + assert.EqualValues(t, 200, *stats.StatusCode) + assert.EqualValues(t, 1, *stats.ImdsFallbackSucceed) + assert.EqualValues(t, 1, *stats.SharedConfigFallback) + assert.EqualValues(t, 1, *stats.AppSignals) + assert.EqualValues(t, 1, *stats.EnhancedContainerInsights) + assert.EqualValues(t, 0, *stats.RunningInContainer) + assert.EqualValues(t, "RegionType", *stats.RegionType) + assert.EqualValues(t, "Mode", *stats.Mode) +} + func TestMergeWithStatusCodes(t *testing.T) { stats := &Stats{ StatusCodes: map[string][5]int{ @@ -79,3 +121,64 @@ func TestMergeFullWithStatusCodes(t *testing.T) { assert.Equal(t, [5]int{1, 1, 0, 0, 0}, stats.StatusCodes["operation1"]) assert.Equal(t, [5]int{1, 1, 1, 1, 1}, stats.StatusCodes["operation2"]) } + +func TestMarshal(t *testing.T) { + testCases := map[string]struct { + stats *Stats + want string + }{ + "WithEmpty": { + stats: &Stats{}, + want: "", + }, + "WithPartial": { + stats: &Stats{ + CpuPercent: aws.Float64(1.2), + MemoryBytes: aws.Uint64(123), + ThreadCount: aws.Int32(789), + PayloadBytes: aws.Int(5678), + }, + want: `"cpu":1.2,"mem":123,"th":789,"load":5678`, + }, + "WithFull": { + stats: &Stats{ + CpuPercent: aws.Float64(1.2), + MemoryBytes: aws.Uint64(123), + FileDescriptorCount: aws.Int32(456), + ThreadCount: aws.Int32(789), + LatencyMillis: aws.Int64(1234), + PayloadBytes: aws.Int(5678), + StatusCode: aws.Int(200), + ImdsFallbackSucceed: aws.Int(1), + }, + want: `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"code":200,"ifs":1`, + }, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + got, err := testCase.stats.Marshal() + assert.NoError(t, err) + assert.Equal(t, testCase.want, got) + }) + } +} + +func TestOperationFilter(t *testing.T) { + testCases := map[string]struct { + allowedOperations []string + testOperations []string + want []bool + }{ + "WithNoneAllowed": {allowedOperations: nil, testOperations: []string{"nothing", "is", "allowed"}, want: []bool{false, false, false}}, + "WithSomeAllowed": {allowedOperations: []string{"are"}, testOperations: []string{"some", "are", "allowed"}, want: []bool{false, true, false}}, + "WithAllAllowed": {allowedOperations: []string{"*"}, testOperations: []string{"all", "are", "allowed"}, want: []bool{true, true, true}}, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + filter := NewOperationsFilter(testCase.allowedOperations...) + for index, testOperation := range testCase.testOperations { + assert.Equal(t, testCase.want[index], filter.IsAllowed(testOperation)) + } + }) + } +} diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index 6aea128be6..c879dabe4f 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -23,13 +23,13 @@ const ( func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { statusCodeFilter := agent.NewStatusCodeOperationsFilter() + statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) + if statuscodeonly { - statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } filter := agent.NewStatusCodeAndOtherOperationsFilter(cfg.Operations) clientStats := client.NewHandler(filter) - statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) stats := newStatsHandler(logger, filter, []agent.StatsProvider{ clientStats, @@ -39,7 +39,7 @@ func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) }) agent.UsageFlags().SetValues(cfg.UsageFlags) - return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} + return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats, clientStats} } type statsHandler struct { diff --git a/extension/agenthealth/handler/stats/handler_test.go b/extension/agenthealth/handler/stats/handler_test.go index ae0612a10a..54a7f4e1d1 100644 --- a/extension/agenthealth/handler/stats/handler_test.go +++ b/extension/agenthealth/handler/stats/handler_test.go @@ -37,6 +37,7 @@ func TestStatsHandler(t *testing.T) { ThreadCount: aws.Int32(789), LatencyMillis: aws.Int64(1234), PayloadBytes: aws.Int(5678), + StatusCode: aws.Int(200), ImdsFallbackSucceed: aws.Int(1), SharedConfigFallback: aws.Int(1), StatusCodes: map[string][5]int{ @@ -62,9 +63,21 @@ func TestStatsHandler(t *testing.T) { assert.Equal(t, "", req.Header.Get(headerKeyAgentStats)) handler.filter = agent.NewOperationsFilter(agent.AllowAllOperations) handler.HandleRequest(ctx, req) - assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"scfb":1,"ifs":1,"codes":{"di":[0,1,0,0,0],"pmd":[1,0,0,0,0]}`, req.Header.Get(headerKeyAgentStats)) + assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"lat":1234,"load":5678,"code":200,"scfb":1,"ifs":1,"codes":{"di":[0,1,0,0,0],"pmd":[1,0,0,0,0]}`, req.Header.Get(headerKeyAgentStats)) stats.StatusCode = aws.Int(404) stats.LatencyMillis = nil handler.HandleRequest(ctx, req) assert.Equal(t, `"cpu":1.2,"mem":123,"fd":456,"th":789,"load":5678,"code":404,"scfb":1,"ifs":1,"codes":{"di":[0,1,0,0,0],"pmd":[1,0,0,0,0]}`, req.Header.Get(headerKeyAgentStats)) } + +func TestNewHandlersWithStatusCodeOnly(t *testing.T) { + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true) + assert.Len(t, requestHandlers, 2) + assert.Len(t, responseHandlers, 1) +} + +func TestNewHandlersWithNoStatusCodeOnly(t *testing.T) { + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, false) + assert.Len(t, requestHandlers, 2) + assert.Len(t, responseHandlers, 1) +} diff --git a/extension/agenthealth/handler/stats/provider/interval.go b/extension/agenthealth/handler/stats/provider/interval.go index 00cb857de6..40d279cfcf 100644 --- a/extension/agenthealth/handler/stats/provider/interval.go +++ b/extension/agenthealth/handler/stats/provider/interval.go @@ -4,7 +4,6 @@ package provider import ( - "log" "sync" "sync/atomic" "time" @@ -42,16 +41,9 @@ func (p *intervalStats) getStats() agent.Stats { var stats agent.Stats if value := p.stats.Load(); value != nil { - if s, ok := value.(agent.Stats); ok { - stats = s - } else { - log.Println("Error: Loaded value is not of type agent.Stats") - } + stats = value.(agent.Stats) } - if stats.StatusCodes == nil { - stats.StatusCodes = make(map[string][5]int) - } return stats } diff --git a/extension/agenthealth/handler/stats/provider/process_test.go b/extension/agenthealth/handler/stats/provider/process_test.go index ee31bbb2f8..931f08e6a0 100644 --- a/extension/agenthealth/handler/stats/provider/process_test.go +++ b/extension/agenthealth/handler/stats/provider/process_test.go @@ -75,7 +75,6 @@ func TestProcessStats(t *testing.T) { mock.mu.Unlock() provider.refresh() assert.Eventually(t, func() bool { - stats := provider.getStats() - return len(stats.StatusCodes) == 0 //map isn't comparable so we can just do this + return len(provider.getStats().StatusCodes) == 0 // map isn't comparable, so we check the length }, 5*time.Millisecond, time.Millisecond) } diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 0e49e4bb81..bbbd1addaa 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -28,7 +28,6 @@ var ( // StatusCodeHandler provides monitoring for status codes per operation. type StatusCodeHandler struct { statsByOperation sync.Map - mu sync.Mutex resetTimer *time.Timer filter agent.OperationsFilter } @@ -47,13 +46,7 @@ func GetStatusCodeStats(filter agent.OperationsFilter) *StatusCodeHandler { // startResetTimer initializes a reset timer to clear stats every 5 minutes. func (h *StatusCodeHandler) startResetTimer() { h.resetTimer = time.AfterFunc(statusResetInterval, func() { - h.mu.Lock() - defer h.mu.Unlock() - - h.statsByOperation.Range(func(key, _ interface{}) bool { - h.statsByOperation.Delete(key) - return true - }) + h.statsByOperation.Clear() log.Println("Status code stats reset.") h.startResetTimer() }) @@ -66,10 +59,7 @@ func (h *StatusCodeHandler) HandleRequest(ctx context.Context, _ *http.Request) func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response) { // Extract the operation name operation := awsmiddleware.GetOperationName(ctx) - if operation == "" { - log.Println("No operation name found in the context") - return - } else if !h.filter.IsAllowed(operation) { + if !h.filter.IsAllowed(operation) { log.Printf("Operation %s is not allowed", operation) return } else { @@ -77,11 +67,11 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response } operation = GetShortOperationName(operation) + if operation == "" { + return + } statusCode := r.StatusCode - h.mu.Lock() - defer h.mu.Unlock() - value, loaded := h.statsByOperation.LoadOrStore(operation, &[5]int{}) if !loaded { log.Printf("Initializing stats for operation: %s", operation) @@ -144,9 +134,9 @@ func GetShortOperationName(operation string) string { case "CreateLogStream": return "cls" case "AssumeRole": - return "sts" + return "ar" default: - return operation + return "" } } @@ -162,8 +152,6 @@ func (h *StatusCodeHandler) Position() awsmiddleware.HandlerPosition { // Stats implements the `Stats` method required by the `agent.StatsProvider` interface. func (h *StatusCodeHandler) Stats(operation string) agent.Stats { - h.mu.Lock() - defer h.mu.Unlock() statusCodeMap := make(map[string][5]int) diff --git a/internal/ecsservicediscovery/containerinstanceprocessor.go b/internal/ecsservicediscovery/containerinstanceprocessor.go index 6da7318bc7..ffc0c84010 100644 --- a/internal/ecsservicediscovery/containerinstanceprocessor.go +++ b/internal/ecsservicediscovery/containerinstanceprocessor.go @@ -64,7 +64,6 @@ func splitMapKeys(a map[string]*EC2MetaData, size int) [][]string { } func (p *ContainerInstanceProcessor) handleContainerInstances(cluster string, batch []string, containerInstanceMap map[string]*EC2MetaData) error { - log.Println("yooooo we in above describe instances for host") ec2Id2containerInstanceIdMap := make(map[string]*string) input := &ecs.DescribeContainerInstancesInput{ Cluster: &cluster, diff --git a/plugins/inputs/prometheus/prometheus.go b/plugins/inputs/prometheus/prometheus.go index 68e1ae2ca8..5497421cd2 100644 --- a/plugins/inputs/prometheus/prometheus.go +++ b/plugins/inputs/prometheus/prometheus.go @@ -5,11 +5,6 @@ package prometheus import ( _ "embed" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/amazon-cloudwatch-agent/cfg/envconfig" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" - "go.uber.org/zap" "sync" "github.com/influxdata/telegraf" @@ -28,7 +23,6 @@ type Prometheus struct { mbCh chan PrometheusMetricBatch shutDownChan chan interface{} wg sync.WaitGroup - middleware awsmiddleware.Middleware } func (p *Prometheus) SampleConfig() string { @@ -80,19 +74,9 @@ func (p *Prometheus) Stop() { func init() { inputs.Add("prometheus", func() telegraf.Input { - boolean := true return &Prometheus{ mbCh: make(chan PrometheusMetricBatch, 10000), shutDownChan: make(chan interface{}), - middleware: agenthealth.NewAgentHealth( - zap.NewNop(), - &agenthealth.Config{ - IsUsageDataEnabled: envconfig.IsUsageDataEnabled(), - Stats: agent.StatsConfig{}, - StatusCodeOnly: &boolean, - }, - ), } - }) } diff --git a/tool/clean/clean_host/clean_host.go b/tool/clean/clean_host/clean_host.go index d701fdc40b..6c86394189 100644 --- a/tool/clean/clean_host/clean_host.go +++ b/tool/clean/clean_host/clean_host.go @@ -67,7 +67,6 @@ func terminateInstances(cxt context.Context, ec2client *ec2.Client) { for { instanceIds := make([]string, 0) expirationDateInstance := time.Now().UTC().Add(clean.KeepDurationOneDay) - log.Println("yooooo we in above describe instances for host") describeInstanceOutput, _ := ec2client.DescribeInstances(cxt, &instanceInput) for _, reservation := range describeInstanceOutput.Reservations { for _, instance := range reservation.Instances { diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 940c3d42b6..2823093ad5 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -71,7 +71,7 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData } - cfg.StatusCodeOnly = t.statuscodeonly + cfg.IsOnlyStatusCodeEnabled = t.statuscodeonly if t.statuscodeonly != nil && *t.statuscodeonly { return cfg, nil } From 6e0fdd34bca419c41ea1049747f6953903c22d62 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Thu, 21 Nov 2024 20:16:43 -0500 Subject: [PATCH 39/48] resolving comments --- extension/agenthealth/extension_test.go | 2 +- .../agenthealth/handler/stats/handler_test.go | 8 +-- .../handler/stats/provider/statuscode.go | 13 +++-- internal/tls/testdata/server.crt | 44 ++++++++-------- internal/tls/testdata/server.key | 52 +++++++++---------- internal/tls/testdata/tls-ca.crt | 50 +++++++++--------- 6 files changed, 86 insertions(+), 83 deletions(-) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index fa9e42f605..e72a8c53e9 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -22,7 +22,7 @@ func TestExtension(t *testing.T) { // user agent, client stats, stats assert.Len(t, requestHandlers, 4) // client stats - assert.Len(t, responseHandlers, 1) + assert.Len(t, responseHandlers, 2) cfg.IsUsageDataEnabled = false requestHandlers, responseHandlers = extension.Handlers() // user agent diff --git a/extension/agenthealth/handler/stats/handler_test.go b/extension/agenthealth/handler/stats/handler_test.go index 54a7f4e1d1..23e6530189 100644 --- a/extension/agenthealth/handler/stats/handler_test.go +++ b/extension/agenthealth/handler/stats/handler_test.go @@ -72,12 +72,12 @@ func TestStatsHandler(t *testing.T) { func TestNewHandlersWithStatusCodeOnly(t *testing.T) { requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true) - assert.Len(t, requestHandlers, 2) + assert.Len(t, requestHandlers, 1) assert.Len(t, responseHandlers, 1) } -func TestNewHandlersWithNoStatusCodeOnly(t *testing.T) { +func TestNewHandlersWithoutStatusCodeOnly(t *testing.T) { requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, false) - assert.Len(t, requestHandlers, 2) - assert.Len(t, responseHandlers, 1) + assert.Len(t, requestHandlers, 3) + assert.Len(t, responseHandlers, 2) } diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index bbbd1addaa..241cf8ca58 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -45,11 +45,14 @@ func GetStatusCodeStats(filter agent.OperationsFilter) *StatusCodeHandler { // startResetTimer initializes a reset timer to clear stats every 5 minutes. func (h *StatusCodeHandler) startResetTimer() { - h.resetTimer = time.AfterFunc(statusResetInterval, func() { - h.statsByOperation.Clear() - log.Println("Status code stats reset.") - h.startResetTimer() - }) + ticker := time.NewTicker(statusResetInterval) + + go func() { + for range ticker.C { + h.statsByOperation.Clear() + log.Println("Status code stats reset.") + } + }() } // HandleRequest is a no-op for the StatusCodeHandler. diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..60d0bb3374 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTAyMjIyMzYzNloXDTI0MTAyMjIzMzYz -NlowFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAP3MeHLv7sragkzD8iOj75YCJvOoys4Iy+EVwZhLAdtx+K89IOJr -6EKknoI0/FZowg5xuz4sE3sK8uQV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1zjT2vKiGQGKNLIc9G7bPJk6I7v6S00I0SGp02TC+Oak9g37Bo +FiZ0B9PuYipyfYhmFL/5Sg50DEq8V940IvhfS2sd83v0N1Y32EUpbWIxD8Qn05dP +Sps7WwDjlvQWb8Sxi7nAxNXgcDbpBI/3TIougCMVI4glV8LMzPSjG2FHaQgUZCFK +0lx3rRPIdQHN3GfAGx02Or1xSMJzs++3QkG6IOgrdmQdbkIXP3o+zzJLx8xMqUm/ +G/RoFS5P0TPuxTEfVTk1RudSz/fwUNx6W8QNtPzw0zp/nWMZYvptNRw4Prh1v4H5 +Y0050xSVClebpPmypnA1Y1P2Kqj/zyQjBGCAqsKHPKzH5ORnfz4F2eHWFcCK4kkq +FPU7+Gi6oseQU1I8PoaAhTFUwt2ILvmuvkPEb5QEA/Plyw9wRThpXpM6rgEZ -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..cd9b1bc0d0 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7XF0qlprVhAS4hz4UlNBzeSVrH0GdlZAfKxUrU -PAsBRtA1vYuhklbDdc5psy0HVTwMj+FM8vPOOP3HmbJpZCHurpNwYkUTU4VHCSpR -SSa6AgSfMuwCQPLN7Xi1rJES4pPtMYp7ZHnes3zGkEYMzkjw3NOtkEzgxwdiJEoV -WQHi4eznAgMBAAECggEAGv7z1O32jXc+ouG40NewNVmXQRW0NMQ0w4Vn6UYZNXlj -BWjQJaVquCQAhEMUkDBma9j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b2Qh +NX7RbidLuegIeZ6x70a3OdHPtIlGhJ/pgA/YWAQDCl+AS06f+bDVGZqi9I1l+GPa +VbGBQnYckXTcf46FdAm8y0pdKpDPiDWCoRe9Uck0FJI0zVnBUw3hIYg/DQnyjQVS +XETCuGI72QKBgBnPp4BWeJZYyke21WnCUPNmtxr/JZafq1HaCwEp41RZD1y3hGZs +gRunNQXoTTq90j4qAomOcUXbwRsqc6mAi2EyNGK1E7hAchFsntC2XcJ1GIfo0E5Q +STG/j1qXerMhJOjo7RNs2V3C6TIm6LN5YgYylwq8Sb2Q7tU1rv4/NDtRAoGAHwGR +W4pBswB7HIDvE02mLa66e3+RRO/vphbbNaJxZCJHi3BxsYSG1rIpyYRceRd5J0qS +/LkrWoSTVw99LuPo2bvk0Kn56z/cm/jWnY/BDDqeY1a0V9xnyg4xk1QbnrwndbFU +iJTKKgMLQyyES5h11nnL7cUiOQ6uRTmfaaC5/4ECgYBCgcAgQtzQIX/YzRjNN9AK +a/tUwpqTsCoL3dg1I2HOLIYMMnz/oQvt8mUBjN6BniwtYfDXXQmVVLBuWOQJKtgN +w8KTpzjNOdhmIqUu/RbHLVPrqNn4WAGP5cwLzvGGvFVHTybR8USUvPA7KnmbdjyF +tPLITtZtD2j+/OVJu14hIg== -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..b899058804 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTAyMjIyMzYzOFoXDTM0MTAyMjIyMzYzOFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJrhBEDtGS+b -WAVvkFJuQAkDbCCToy39eJ+51ZS/wA1yuVde8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P7FXJNakUmrATNdwrWjuto -onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g -XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g -qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= +BBTg0Wn7OH9Ee5Ist0XF5+omJOWZkjANBgkqhkiG9w0BAQsFAAOCAgEATLwZ4GPc +JZVUtbA5Lfr2EeArXHwRJidV1CJXbjTy/UPyeGsYyoUWGOdUxT5NzS2VKf6nuta7 +V8cKuHN3WOrer+f9laIxm+PAxP76CXxjFEE85HEPfVW3QOIkCnMF2mcwsyZ9ri43 +AbF+GuUnI/8igV1oqxw+g75vRJ/qpRf6ZhEyAo0uGlhQ/rNAlCdQSpzyNx9EHSSu +U87NF2ldBzt07jPORxJLIZIO075wvqzANBJXqPAnzTj4Z2RdX9f4IEgu3uuAPlWe +QPBOkYfZcCEVmwStrSHfkRmJuDR5/U4kzcpIm1EnzEEpO4wUb9gdrvj+pPViB8ij +qA6DIJNiN75VQODG12eVy6kBYg7JeKNG1paFsz2lI9P1DJHT7W8LO+gcD/BUXjNS +rtGdSnVOBTaYl+V+3fHv0/fUZNcPJ07knSXZPInA/4I9DKAtuVusLjsRwyDdGg6u +EQZWrhUFcq12AQT2la9CiZbw+pyAo7ce62qn4T86TzVJj9xo+K4Ek2L47pxbr5r7 +PzDgIGIIqzCJJaVUXNlKOkgS3GPE5n6XO1TqvgjhYTaiIhZNrUYz3Ruz7lLh72yJ +o6JZxIxxWU/YzEc55MwxN6oZvkQhQykHjI4y+jOBCrUzCY0IztPxSCUTGLBojasX +i7fgxH3P7cd5hlZ73GAy21oX3+7FDPNUqtQ= -----END CERTIFICATE----- From 8aee0d997a7acc057c0836960a5e58f164238292 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 22 Nov 2024 12:54:22 -0500 Subject: [PATCH 40/48] adding tests --- extension/agenthealth/config.go | 2 +- extension/agenthealth/extension.go | 13 +++-- extension/agenthealth/extension_test.go | 3 +- .../agenthealth/handler/stats/agent/agent.go | 32 ++++++------ .../agenthealth/handler/stats/handler.go | 37 ++++++++----- .../agenthealth/handler/stats/handler_test.go | 16 ++++-- .../handler/stats/provider/interval.go | 2 - internal/tls/testdata/server.crt | 44 ++++++++-------- internal/tls/testdata/server.key | 52 +++++++++---------- internal/tls/testdata/tls-ca.crt | 50 +++++++++--------- tool/clean/clean_host/clean_host.go | 1 - 11 files changed, 139 insertions(+), 113 deletions(-) diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index 23d279a5d3..42138bf5d3 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -12,7 +12,7 @@ import ( type Config struct { IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` Stats agent.StatsConfig `mapstructure:"stats"` - IsOnlyStatusCodeEnabled *bool `mapstructure:"is_status_code_only,omitempty"` + IsOnlyStatusCodeEnabled *bool `mapstructure:"is_status_code_enabled,omitempty"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index a381bc6bf7..f2cc0e0402 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -7,6 +7,7 @@ import ( "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" "go.opentelemetry.io/collector/component" "go.uber.org/zap" + "golang.org/x/exp/slices" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/useragent" @@ -30,11 +31,17 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa return requestHandlers, responseHandlers } - statusCodeOnly := false + statusCodeEnabled := false if ah.cfg.IsOnlyStatusCodeEnabled != nil { - statusCodeOnly = *ah.cfg.IsOnlyStatusCodeEnabled + statusCodeEnabled = *ah.cfg.IsOnlyStatusCodeEnabled } - statsRequestHandlers, statsResponseHandlers := stats.NewHandlers(ah.logger, ah.cfg.Stats, statusCodeOnly) + + agentStatsEnabled := + slices.Contains(ah.cfg.Stats.Operations, "PutMetricData") || + slices.Contains(ah.cfg.Stats.Operations, "PutLogEvents") || + slices.Contains(ah.cfg.Stats.Operations, "PutTraceSegment") + + statsRequestHandlers, statsResponseHandlers := stats.NewHandlers(ah.logger, ah.cfg.Stats, statusCodeEnabled, agentStatsEnabled) requestHandlers = append(requestHandlers, statsRequestHandlers...) responseHandlers = append(responseHandlers, statsResponseHandlers...) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index e72a8c53e9..f0e66b7784 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -5,6 +5,7 @@ package agenthealth import ( "context" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "testing" "github.com/stretchr/testify/assert" @@ -14,7 +15,7 @@ import ( func TestExtension(t *testing.T) { ctx := context.Background() - cfg := &Config{IsUsageDataEnabled: true} + cfg := &Config{IsUsageDataEnabled: true, Stats: agent.StatsConfig{Operations: []string{"PutLogEvents"}}} extension := NewAgentHealth(zap.NewNop(), cfg) assert.NotNil(t, extension) assert.NoError(t, extension.Start(ctx, componenttest.NewNopHost())) diff --git a/extension/agenthealth/handler/stats/agent/agent.go b/extension/agenthealth/handler/stats/agent/agent.go index 11dc462d26..5bc84133db 100644 --- a/extension/agenthealth/handler/stats/agent/agent.go +++ b/extension/agenthealth/handler/stats/agent/agent.go @@ -127,21 +127,6 @@ func (of OperationsFilter) IsAllowed(operationName string) bool { return of.allowAll || of.operations.Contains(operationName) } -func NewOperationsFilter(operations ...string) OperationsFilter { - allowed := collections.NewSet[string](operations...) - return OperationsFilter{ - operations: allowed, - allowAll: allowed.Contains(AllowAllOperations), - } -} - -type StatsConfig struct { - // Operations are the allowed operation names to gather stats for. - Operations []string `mapstructure:"operations,omitempty"` - // UsageFlags are the usage flags to set on start up. - UsageFlags map[Flag]any `mapstructure:"usage_flags,omitempty"` -} - var StatusCodeOperations = []string{ // all the operations that are allowed "DescribeInstances", "DescribeTags", @@ -155,9 +140,24 @@ var StatusCodeOperations = []string{ // all the operations that are allowed "CreateLogStream", } +type StatsConfig struct { + // Operations are the allowed operation names to gather stats for. + Operations []string `mapstructure:"operations,omitempty"` + // UsageFlags are the usage flags to set on start up. + UsageFlags map[Flag]any `mapstructure:"usage_flags,omitempty"` +} + +func NewOperationsFilter(operations ...string) OperationsFilter { + allowed := collections.NewSet[string](operations...) + return OperationsFilter{ + operations: allowed, + allowAll: allowed.Contains(AllowAllOperations), + } +} + // NewStatusCodeOperationsFilter creates a new filter for allowed operations and status codes. func NewStatusCodeOperationsFilter() OperationsFilter { - allowed := collections.NewSet[string](StatusCodeOperations...) + allowed := make(map[string]struct{}, len(StatusCodeOperations)) return OperationsFilter{ operations: allowed, diff --git a/extension/agenthealth/handler/stats/handler.go b/extension/agenthealth/handler/stats/handler.go index c879dabe4f..2f89062bd4 100644 --- a/extension/agenthealth/handler/stats/handler.go +++ b/extension/agenthealth/handler/stats/handler.go @@ -21,25 +21,36 @@ const ( headerKeyAgentStats = "X-Amz-Agent-Stats" ) -func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statuscodeonly bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { +func NewHandlers(logger *zap.Logger, cfg agent.StatsConfig, statusCodeEnabled bool, agentStatsEnabled bool) ([]awsmiddleware.RequestHandler, []awsmiddleware.ResponseHandler) { + var requestHandlers []awsmiddleware.RequestHandler + var responseHandlers []awsmiddleware.ResponseHandler + var statsProviders []agent.StatsProvider + + if !statusCodeEnabled && !agentStatsEnabled { + return nil, nil + } + statusCodeFilter := agent.NewStatusCodeOperationsFilter() statusCodeStats := provider.GetStatusCodeStats(statusCodeFilter) + if statusCodeEnabled { + requestHandlers = append(requestHandlers, statusCodeStats) + responseHandlers = append(responseHandlers, statusCodeStats) + statsProviders = append(statsProviders, statusCodeStats) + } + + if agentStatsEnabled { + clientStats := client.NewHandler(agent.NewOperationsFilter()) + statsProviders = append(statsProviders, clientStats, provider.GetProcessStats(), provider.GetFlagsStats()) + responseHandlers = append(responseHandlers, clientStats) + requestHandlers = append(requestHandlers, clientStats) - if statuscodeonly { - return []awsmiddleware.RequestHandler{statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats} } filter := agent.NewStatusCodeAndOtherOperationsFilter(cfg.Operations) - clientStats := client.NewHandler(filter) - - stats := newStatsHandler(logger, filter, []agent.StatsProvider{ - clientStats, - provider.GetProcessStats(), - provider.GetFlagsStats(), - statusCodeStats, - }) - agent.UsageFlags().SetValues(cfg.UsageFlags) + stats := newStatsHandler(logger, filter, statsProviders) + requestHandlers = append(requestHandlers, stats) - return []awsmiddleware.RequestHandler{stats, clientStats, statusCodeStats}, []awsmiddleware.ResponseHandler{statusCodeStats, clientStats} + agent.UsageFlags().SetValues(cfg.UsageFlags) + return requestHandlers, responseHandlers } type statsHandler struct { diff --git a/extension/agenthealth/handler/stats/handler_test.go b/extension/agenthealth/handler/stats/handler_test.go index 23e6530189..5352d5176c 100644 --- a/extension/agenthealth/handler/stats/handler_test.go +++ b/extension/agenthealth/handler/stats/handler_test.go @@ -71,13 +71,23 @@ func TestStatsHandler(t *testing.T) { } func TestNewHandlersWithStatusCodeOnly(t *testing.T) { - requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true) + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true, false) assert.Len(t, requestHandlers, 1) assert.Len(t, responseHandlers, 1) } +func TestNewHandlersWithAgentStatsOnly(t *testing.T) { + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, false, true) + assert.Len(t, requestHandlers, 2) + assert.Len(t, responseHandlers, 1) +} -func TestNewHandlersWithoutStatusCodeOnly(t *testing.T) { - requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, false) +func TestNewHandlersWithStatusCodeAndAgenthStats(t *testing.T) { + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true, true) assert.Len(t, requestHandlers, 3) assert.Len(t, responseHandlers, 2) } +func TestNewHandlersWithoutStatusCodeAndAgenthStats(t *testing.T) { + requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, false, false) + assert.Len(t, requestHandlers, 0) + assert.Len(t, responseHandlers, 0) +} diff --git a/extension/agenthealth/handler/stats/provider/interval.go b/extension/agenthealth/handler/stats/provider/interval.go index 40d279cfcf..bc5dc8e24e 100644 --- a/extension/agenthealth/handler/stats/provider/interval.go +++ b/extension/agenthealth/handler/stats/provider/interval.go @@ -39,11 +39,9 @@ func (p *intervalStats) Stats(string) agent.Stats { func (p *intervalStats) getStats() agent.Stats { var stats agent.Stats - if value := p.stats.Load(); value != nil { stats = value.(agent.Stats) } - return stats } diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 60d0bb3374..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGTCCAgGgAwIBAgIRAPg3AYT+HnZNbXi8U/IROjwwDQYJKoZIhvcNAQELBQAw -EjEQMA4GA1UEChMHUm9vdCBDQTAeFw0yNDExMjIwMTEyMjVaFw0yNDExMjIwMjEy -MjVaMBUxEzARBgNVBAoTCkt1YmVybmV0ZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQCoWxzOXaSbVPSIVXHM3Cx2KNPLokC2/zmI4AwXObfMN1OaO3e+ -g6jZp4voQIF+WH8/RgnLTp9HYSYuBTq98H8gdsSrnTpiCjrXz/YOEx0cTxBvt4Kr -DM3Y5oEQurljCMXGN+ESwzX6lE8J4s4bhv8wqyHz4SMGVtmYVgUbjuq/63393OOR -I83jd9II6hu5R2PHUG0IKPqH81SzSRTi3QQcUTwZDM2Aw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fwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index cd9b1bc0d0..0efcb40bb3 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCoWxzOXaSbVPSI -VXHM3Cx2KNPLokC2/zmI4AwXObfMN1OaO3e+g6jZp4voQIF+WH8/RgnLTp9HYSYu -BTq98H8gdsSrnTpiCjrXz/YOEx0cTxBvt4KrDM3Y5oEQurljCMXGN+ESwzX6lE8J -4s4bhv8wqyHz4SMGVtmYVgUbjuq/63393OORI83jd9II6hu5R2PHUG0IKPqH81Sz -SRTi3QQcUTwZDM2AwjGV5jBd3sSeMSoyBwEqDIwdUbtd7hin+Gs7XX7UXi+aRssB -cVeJMUilQ45ZevqUNda9qmnTAvs3r9R1fMBvOEE8qwBraJhPcsfcM0D2mzM2E9Vr -v9O6nXgJAgMBAAECggEACEOYsWSVXO6ZpkuTb3vrTs2IP/mx9YmnuFlPHqC9re+V -Uf/TS+3Ijw6TZo4sDRio/mEgv/MXDHjvV9j33jT8+In783SfVgqsgsV5jY1Qo4Aa -DXHTnzPcsuX1te2EhiD7HFTH3pTohGldS93vQhipVClCXGdTwc7nlXu7enPUgCEp -w7IFar6BQeEKwNLNqLC8W3eSML9pW3GRfI3a/pwrdkqwdUkhnEbJuh6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m1VOyk5kML7gMhqcbneL8XYzzx2S7IMuyKpSNt +H++ZGWdXga2Vbq3bDmNQrSvDJLcWgEP6e9ZwwZH6WYgo9KA3036iTiF6fUx1doh5 +WB3M0M6SUTBFZzqzAq3vYYEWhns7A7Se/2w8N1+0HrRQnXu5aHK1RGo+iwKBgEST +hRx7fi/dK/xsl9oDyN4SPdPLlcmjPZ6/cb23RgUMZaAGiThmfu1hLU6pphMpkdKX +yzx6W9Wu2NTYPpT/WK8Ks4olYDjXaCnlrZR8BKz5E0Qq1OLej21ta0+5d+FbNSPA +o2u2EXEqUubVYxaUeYrpPAMiNzGNgAU+avTvvJaBAoGBAKely84irwZicpex79T/ +KYV3VOMYs6wETNSLdKkR9G2WEI4OsEw0qGm9pZXzS6lKOSXxW6fOzwI0/vhnmT4O +hBxeR+PriPFqD80ASXeVeVOEjMXQEjZ8Po+FfUvVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index b899058804..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTEyMjAxMTIzMFoXDTM0MTEyMjAxMTIzMFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKynT8zSLBNR -FoNGLovkmVyn/ZtTCzvR4MdMBGoR+4+FKY/tmmdpEwmPBWdnWPdFYL81nKaR4wcL -Ao7nzkkhP60dsob5rRynJ5HDL8c1YQZ+wAJOd5EKLXc1Fk6zFsL4AYcqxViHEnyM -1Iy8AizXgIVLLwfNiSDw1UknaWYZGzDafyAW4Xqkkiaaq9NtHdHWHAQhJl+n0o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7fgxH3P7cd5hlZ73GAy21oX3+7FDPNUqtQ= +BBSWf0MJGMR6k7iAcZMQBOIFr+DoGjANBgkqhkiG9w0BAQsFAAOCAgEAHQib14b2 +y1b9Xa+lvvpyho887AF5LJMvcAaFA2qrZTgsct9YAUyP4jwHSMa82F34GF5zWm96 +wKGa2V7rykKPLtL2o0ilfnz3bJndL2MUjgVqK7GzkOGIhhXreG6/4WZ+oNReMzjw +uZ6zWKhUrTKfvt5J70Nzk+aPrwEzOOcb078QfrFvxElrkoyBz5LGF6HVdIVYUO94 +1DW1egaduIZCcmavO/CJ5QvzXMyiHkpuT0SoltvVFskoP9aS0OxnaQIrmNx+vajT +9zd/WMroxBh+z4Y6sQmy6zZF+rAPItgZNHncMt8AJBGUlAhjgtiP37v/+w5zKpOD +nXPKVf9mOPNdIDUBpzWxRXwkE1GI8kFjQsuiBD0RGNj1Db/m9lnxOX2B1vKOHRtg +Q3LQURMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- diff --git a/tool/clean/clean_host/clean_host.go b/tool/clean/clean_host/clean_host.go index 6c86394189..31a7d9b5d4 100644 --- a/tool/clean/clean_host/clean_host.go +++ b/tool/clean/clean_host/clean_host.go @@ -39,7 +39,6 @@ func cleanHost() error { } func terminateInstances(cxt context.Context, ec2client *ec2.Client) { - log.Println("yooooo we in above describe instances") maxResults := int32(1000) nameFilter := types.Filter{Name: aws.String("tag:Name"), Values: []string{ "buildLinuxPackage", From f3445182aeca86cb220edd1486434c4997f52d94 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 22 Nov 2024 16:16:31 -0500 Subject: [PATCH 41/48] resolving comments --- extension/agenthealth/config.go | 2 +- extension/agenthealth/extension.go | 4 +- extension/agenthealth/extension_test.go | 4 +- .../agenthealth/handler/stats/handler_test.go | 2 +- internal/tls/testdata/server.crt | 42 +++++++-------- internal/tls/testdata/server.key | 52 +++++++++---------- internal/tls/testdata/tls-ca.crt | 50 +++++++++--------- .../otel/extension/agenthealth/translator.go | 7 ++- 8 files changed, 80 insertions(+), 83 deletions(-) diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index 42138bf5d3..3952ef3f81 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -12,7 +12,7 @@ import ( type Config struct { IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` Stats agent.StatsConfig `mapstructure:"stats"` - IsOnlyStatusCodeEnabled *bool `mapstructure:"is_status_code_enabled,omitempty"` + IsOnlyStatusCodeEnabled bool `mapstructure:"is_status_code_enabled,omitempty"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index f2cc0e0402..f479d63b6a 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -32,9 +32,7 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa } statusCodeEnabled := false - if ah.cfg.IsOnlyStatusCodeEnabled != nil { - statusCodeEnabled = *ah.cfg.IsOnlyStatusCodeEnabled - } + statusCodeEnabled = ah.cfg.IsOnlyStatusCodeEnabled agentStatsEnabled := slices.Contains(ah.cfg.Stats.Operations, "PutMetricData") || diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index f0e66b7784..779147bf9f 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -21,9 +21,9 @@ func TestExtension(t *testing.T) { assert.NoError(t, extension.Start(ctx, componenttest.NewNopHost())) requestHandlers, responseHandlers := extension.Handlers() // user agent, client stats, stats - assert.Len(t, requestHandlers, 4) + assert.Len(t, requestHandlers, 3) // client stats - assert.Len(t, responseHandlers, 2) + assert.Len(t, responseHandlers, 1) cfg.IsUsageDataEnabled = false requestHandlers, responseHandlers = extension.Handlers() // user agent diff --git a/extension/agenthealth/handler/stats/handler_test.go b/extension/agenthealth/handler/stats/handler_test.go index 5352d5176c..108c6aa120 100644 --- a/extension/agenthealth/handler/stats/handler_test.go +++ b/extension/agenthealth/handler/stats/handler_test.go @@ -72,7 +72,7 @@ func TestStatsHandler(t *testing.T) { func TestNewHandlersWithStatusCodeOnly(t *testing.T) { requestHandlers, responseHandlers := NewHandlers(zap.NewNop(), agent.StatsConfig{}, true, false) - assert.Len(t, requestHandlers, 1) + assert.Len(t, requestHandlers, 2) assert.Len(t, responseHandlers, 1) } func TestNewHandlersWithAgentStatsOnly(t *testing.T) { diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 12424f7b27..900f44dbbe 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQDfInHXLoKYcZoMZe0q/N9TANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTAyMjIyMzYzNloXDTI0MTAyMjIzMzYz -NlowFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAP3MeHLv7sragkzD8iOj75YCJvOoys4Iy+EVwZhLAdtx+K89IOJr -6EKknoI0/FZowg5xuz4sE3sK8uQVAjtN0u4Mu6oQm94uSB5RxGvkBV6vn+3JxUdC -+fj+KiTg0x+pEoDxVXSrL3gF2ZtvfNdC05+FCk39pdEPe5tbnh+IPtcXSqWmtWEB -LiHPhSU0HN5JWsfQZ2VkB8rFStQ8CwFG0DW9i6GSVsN1zmmzLQdVPAyP4Uzy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a +F9+Wcu2+thaM2EzdjgVH730PzH1Hm9/vNs7Ntgsknb3ZSKT7uYfMuO0JqiGsQ08H +K0B3azia3xCPqNsQy6p6xlN7LWX4Io6IPluDZgvyIwVIgZmhBhSd1uiCeIY9Bh6s +L7+7dYSltuSLI6ZCnpW2UFtwqZ+qkNzxehwV5Og/9ns2ppv8pwq7wPMOJZ0= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 0efcb40bb3..57fc5d831f 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD9zHhy7+7K2oJM -w/Ijo++WAibzqMrOCMvhFcGYSwHbcfivPSDia+hCpJ6CNPxWaMIOcbs+LBN7CvLk -FQI7TdLuDLuqEJveLkgeUcRr5AVer5/tycVHQvn4/iok4NMfqRKA8VV0qy94Bdmb -b3zXQtOfhQpN/aXRD3ubW54fiD7XF0qlprVhAS4hz4UlNBzeSVrH0GdlZAfKxUrU -PAsBRtA1vYuhklbDdc5psy0HVTwMj+FM8vPOOP3HmbJpZCHurpNwYkUTU4VHCSpR -SSa6AgSfMuwCQPLN7Xi1rJES4pPtMYp7ZHnes3zGkEYMzkjw3NOtkEzgxwdiJEoV -WQHi4eznAgMBAAECggEAGv7z1O32jXc+ouG40NewNVmXQRW0NMQ0w4Vn6UYZNXlj -BWjQJaVquCQAhEMUkDBma9jnHM7dZ5obie0+Joa5p/6Mu6M2oSR1IVx7Myq284Jk -1Ys/w7u5ESYf33pWmqiGQlbpSxamXvLoWaM7OT5veilRlkgjqiAmerj9EceRP5mR -aheVE5ctY5oZmdnvA9OcN6B8Oxk59EWEOECs8qAF/ChYfC8pWKOp4U0RILQ/9jXD -lu4p0C2XyadrJReer3whudUADWa/WSxgVCrx85/g/RTKs38KTPy7W4g3bv8KBRhc -bjLzoYTl6esRAi8nM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Nn2k +7kHViM2btkquPocSnp4diBcT8u9C/lYdSLWgOjIy2bOeOKWUVhl/rW01AoGBAJpj +m29dvmHy7csinS1E6voTTsANbOToka0UXmN80fxljRKCXR3mRd0DjOO+XafyCoxV +MheQnWOliJlfAz35iu5KXdN4dgtxvQohlhb5Me8uHoLyIw2If7uwKjqLPLrq3iGP +qdAdOINpMMb0XbE9dOgj3/uk047cn6DF8/ptMo2JAoGBALUVdOoFOyAnSCuOYYrO +nNMQ6F1Qut5pgtab4vJv0QyhbQsSUbsdnySBx8cegVDccLnAi2sjpPyxaebcxELd +yaW6CjDPs0EjozkW1ywdUazpJJZrme7dGJ26uxGH4WJ6abn4U31ItfqqaIAVSEAT +RPLrxJiFVDDcElvkvX7ypNbF -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index 4b861f4f40..ed672ec812 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTAyMjIyMzYzOFoXDTM0MTAyMjIyMzYzOFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJrhBEDtGS+b -WAVvkFJuQAkDbCCToy39eJ+51ZS/wA1yuVde8JvtX95dZC0STNm7GnxfIwH8tOut -gc82vz2Bim2K1N9uzBDu6flGWXpzXZSSuMAj1q8MRhEs1OpfbLuqxMs/TAbGYGqa -6FPlUWCwMZvpiRpV+hGxRIp9OsAYn/oVUvuACXnADEwBUYnGL3c9FYPn+kkjpsfH -vaH5kY8uTpKNIbmerYBCIt7X0QXcLOxk2CdnapKuIjaTML8og1/rMPbRsnGvIebh -FZsA60QnhuNiL6MowdJn17/Stl6Rs7cNV5zq3/WmaiipOoTcrKIMgA5ci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KFGImhb43I2+2Xv3NIWhdLW9LCPe +OgN5QdILMafNvhJsTz6sIjAxsSrYmYA6AZTlvdl2WZglrxU7QL4hkvi69Tbof4xT +T4BieKVgQ9buUxyk3ihj3BICcFrhXVBZIeJ+gmOpzoPviTBYWRzLrHNt7guYNS0y +f/H//TKXOBvPjDOSOMLItDu14Vu4sXQCYckXAcIqJ97CnlWKi45Rma1qD12LigaG +gk8cO879XqZrlMKZwe9Cjf18FKs6lhNLZp95GAqgQ6J7LZPVNWGabsiPluUxzIME +EoL+q5io5ndoTVothhCZJs4CT2fT+wRklHn5xa7k11cVm//rabwLxq+kTmKPZvNY +jkdtpQwF/oauN/ykCESdOZu4RE6dz49yAKQmUe2ZLwrC4i/Hp4031kyXF3vZZF4c +kvA3M1tJxVWJpRc4laJvcKWQIxFMyZirvfWNJt9Nmd2e2Yq0jeu73uVhDDLLf9nB +GmRvzbFetuuiyl/b27Nwnweobcy5fJewhnbo2NuJYxwfQDZv5SlnbrBiJRKzqPFQ +Cj28AriR+kyXhPfjyT0A9kH9A8GQQ51DPjDEbdGjSzatzTOYPPdBLSaHK+nNV3uM +ePw/GTTH5O72x6IyZJIE5OCUZrKlNUlUIXk= -----END CERTIFICATE----- diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index 2823093ad5..c4320374bf 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -35,7 +35,7 @@ type translator struct { operations []string isUsageDataEnabled bool factory extension.Factory - statuscodeonly *bool + statuscodeonly bool } var _ common.Translator[component.Config] = (*translator)(nil) @@ -46,7 +46,7 @@ func NewTranslatorWithStatusCode(name component.DataType, operations []string, s operations: operations, factory: agenthealth.NewFactory(), isUsageDataEnabled: envconfig.IsUsageDataEnabled(), - statuscodeonly: &statuscodeonly, + statuscodeonly: statuscodeonly, } } @@ -56,7 +56,6 @@ func NewTranslator(name component.DataType, operations []string) common.Translat operations: operations, factory: agenthealth.NewFactory(), isUsageDataEnabled: envconfig.IsUsageDataEnabled(), - statuscodeonly: nil, } } @@ -72,7 +71,7 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData } cfg.IsOnlyStatusCodeEnabled = t.statuscodeonly - if t.statuscodeonly != nil && *t.statuscodeonly { + if t.statuscodeonly != false && t.statuscodeonly { return cfg, nil } cfg.Stats = agent.StatsConfig{ From a7e0415a336213e5b4c8501ed07c6fccec6a6c3b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 22 Nov 2024 16:17:22 -0500 Subject: [PATCH 42/48] resolving comments --- extension/agenthealth/extension_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index 779147bf9f..531f7009c9 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -5,9 +5,10 @@ package agenthealth import ( "context" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "testing" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" + "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.uber.org/zap" From d91706df0fbe33c4f95414080016126a812e4063 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 22 Nov 2024 16:30:06 -0500 Subject: [PATCH 43/48] adding tests --- extension/agenthealth/extension_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index 531f7009c9..5679ef34d3 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -7,11 +7,11 @@ import ( "context" "testing" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" - "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.uber.org/zap" + + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) func TestExtension(t *testing.T) { From 59f735fc3ad65416e79f6477a3dfdb62b83d2a55 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Mon, 25 Nov 2024 12:40:37 -0500 Subject: [PATCH 44/48] fixing race condition --- .../handler/stats/provider/statuscode.go | 72 ++++++++++--------- .../handler/stats/provider/statuscode_test.go | 10 ++- internal/tls/testdata/server.crt | 42 +++++------ internal/tls/testdata/server.key | 52 +++++++------- internal/tls/testdata/tls-ca.crt | 50 ++++++------- 5 files changed, 121 insertions(+), 105 deletions(-) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 241cf8ca58..bb7b3a08ce 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -1,6 +1,3 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: MIT - package provider import ( @@ -11,7 +8,6 @@ import ( "time" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) @@ -27,16 +23,26 @@ var ( // StatusCodeHandler provides monitoring for status codes per operation. type StatusCodeHandler struct { - statsByOperation sync.Map + statsByOperation map[string]*[5]int resetTimer *time.Timer filter agent.OperationsFilter + mu sync.Mutex } // GetStatusCodeStats retrieves or initializes the singleton StatusCodeHandler. -func GetStatusCodeStats(filter agent.OperationsFilter) *StatusCodeHandler { +func GetStatusCodeStats(filter interface{}) *StatusCodeHandler { statusCodeStatsOnce.Do(func() { - handler := &StatusCodeHandler{} - handler.filter = filter + handler := &StatusCodeHandler{ + statsByOperation: make(map[string]*[5]int), + } + + if opsFilter, ok := filter.(agent.OperationsFilter); ok { + handler.filter = opsFilter + } else { + // Provide a default or fallback implementation if the filter is not valid + log.Println("Invalid filter provided; using NoOpOperationsFilter.") + } + handler.startResetTimer() statusCodeSingleton = handler }) @@ -45,14 +51,15 @@ func GetStatusCodeStats(filter agent.OperationsFilter) *StatusCodeHandler { // startResetTimer initializes a reset timer to clear stats every 5 minutes. func (h *StatusCodeHandler) startResetTimer() { - ticker := time.NewTicker(statusResetInterval) - - go func() { - for range ticker.C { - h.statsByOperation.Clear() - log.Println("Status code stats reset.") + h.resetTimer = time.AfterFunc(statusResetInterval, func() { + h.mu.Lock() + defer h.mu.Unlock() + for key := range h.statsByOperation { + delete(h.statsByOperation, key) } - }() + log.Println("Status code stats reset.") + h.startResetTimer() + }) } // HandleRequest is a no-op for the StatusCodeHandler. @@ -62,6 +69,7 @@ func (h *StatusCodeHandler) HandleRequest(ctx context.Context, _ *http.Request) func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response) { // Extract the operation name operation := awsmiddleware.GetOperationName(ctx) + if !h.filter.IsAllowed(operation) { log.Printf("Operation %s is not allowed", operation) return @@ -73,25 +81,25 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response if operation == "" { return } + statusCode := r.StatusCode - value, loaded := h.statsByOperation.LoadOrStore(operation, &[5]int{}) - if !loaded { + h.mu.Lock() + defer h.mu.Unlock() + + stats, exists := h.statsByOperation[operation] + if !exists { + stats = &[5]int{} + h.statsByOperation[operation] = stats log.Printf("Initializing stats for operation: %s", operation) } - stats := value.(*[5]int) h.updateStatusCodeCount(stats, statusCode, operation) - h.statsByOperation.Store(operation, stats) - - h.statsByOperation.Range(func(key, value interface{}) bool { - - operation := key.(string) - stats := value.(*[5]int) + // Optionally, log all stats (protected by the mutex) + for operation, stats := range h.statsByOperation { log.Printf("Operation: %s, 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) - return true - }) + } } // Helper function to update the status code counts @@ -155,15 +163,15 @@ func (h *StatusCodeHandler) Position() awsmiddleware.HandlerPosition { // Stats implements the `Stats` method required by the `agent.StatsProvider` interface. func (h *StatusCodeHandler) Stats(operation string) agent.Stats { + // Lock mutex to safely access statsByOperation + h.mu.Lock() + defer h.mu.Unlock() statusCodeMap := make(map[string][5]int) - h.statsByOperation.Range(func(key, value interface{}) bool { - operation := key.(string) - stats := value.(*[5]int) - statusCodeMap[operation] = [5]int{stats[0], stats[1], stats[2], stats[3], stats[4]} - return true - }) + for operation, stats := range h.statsByOperation { + statusCodeMap[operation] = *stats + } return agent.Stats{ StatusCodes: statusCodeMap, diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go index 0d8a850e17..4a1e9d1d47 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -16,10 +16,18 @@ func TestStatusCodeHandler(t *testing.T) { filter := agent.NewStatusCodeOperationsFilter() handler := GetStatusCodeStats(filter) require.NotNil(t, handler) - handler.statsByOperation.Store("pmd", &[5]int{1, 2, 0, 1, 0}) + + // Locking to ensure thread-safe operations + handler.mu.Lock() + handler.statsByOperation["pmd"] = &[5]int{1, 2, 0, 1, 0} + handler.mu.Unlock() + + // Retrieve stats after modification stats := handler.Stats("pmd") expected := [5]int{1, 2, 0, 1, 0} actualStats := stats.StatusCodes["pmd"] + + // Perform assertions assert.Equal(t, expected, actualStats, "Unexpected stats values for operation 'pmd'") assert.Contains(t, stats.StatusCodes, "pmd", "Status code map should contain 'pmd'") assert.Equal(t, expected, stats.StatusCodes["pmd"], "Stats for 'pmd' do not match") diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 900f44dbbe..4827558116 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQbvO6OvB6Nta0hPA2iV4lZjANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTEyMjIxMTI1NVoXDTI0MTEy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P +sOqXupd6UALMSFx1h9Bbu29hKzDpuT3D0dZAEZmOcziTRTpYWgIQqZ/KG0wjsMB2 +7wkj0gaxTELO6zHyMUULGgK4sUhA+/NZ4k/3OlqwKr4ZBeAgD9NQyuk+Si9+/aBd +U4rSneOehS18ChoDHMDQIAsqmWE2qcyt/YpAYaxsDdxHwAd9ofeIrXOp31Nz6WA9 +ZuUvBBq2IbeSe2AMJ1yfEZEJayAdz7+yj9TBamwl6icOjD1gMmPJ/8vv/v6U8nLz +7CBKdHV/GrrX6sRiST1VEqA/8tnu0eXvYuwBYPp9SuAMQyRsiGKTocr6ZAmyU7aj +znrwZkW63t4vcQ68G/BtCfbX6qcJ77P8zpbiIj+TxzIY5rF44smOkcTRlgy5Rwi6 +yJADOSkBY5BI2wgKIzi7kzrbcaOEDwzG8nskt9FD5IgUMjS2v+4J/esd05M9tKp8 +wPhXGkvsQXYHOsi1p8yXVuKParTO521f6Koc163wEvhNSBonrYxpL9B4ubI= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 57fc5d831f..e6afc8732a 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCwhKHYT43zWeBH -XyQuzhD/VHKlbA9A4405noSr2hDEVfnX6J8IumAgq47ceuhuoqwxCVDw9/BJwqRg -6exF/4yVSTSqkrN7bqHxls6joay9f89EJ21ofTJUBX2xf4w5YaS57JdAALsz0PWE -9k666ai+JLMA0UGBzplxJd7fhV+7SqW+LfInJ3DJmq4TWS7QxkoJWEZz/HjBJ3RJ -EZNpc+NYCKzloF318ya9YvKphcO1Q88h5qtJ60zaDtDWudruUZmTsrsmWg4zJgcL -g5AVhWlfYzX3TYBOkdrW0QGYvWw10Q65bY/ttM38FqGA9O+q3irtvWy8/uHl5tDN -l+9uzIP7AgMBAAECggEAZo9J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2Ivk0FL0FnTXj6wKBgQDyAFp3gVPoCGSL0wZeYkK5H0ANcAjyc75M +bHXc5P5zdATJyHK5bVpkH45+nlXp6AGIk45GysI6Jc9txfiIPuyrn9F8zRnbSg9G +LgzpahcWE+rNTsVeMOvTEG01GaNt+1IiV0bwc5v13Dz7lybcMfvdtWOy//XfWLiG +nKzTqtmEfwKBgBdAquEZaXRDjBZDpdR6DSml193G4lN6Bvip+YpVncyATh5OmciK +PBkyoorZNm22JJhzUCMf+nRONckE8sCzvS4oG/r0UosXtO393VEZIVboY5jR8Qju +0M0mDMp2zGZrAtsoYXYQmtO0aHfPmTjbXL+55moG135Z0L5lCh8iCtIDAoGAMhy2 +nxaNzHeocnfhUrwgOvtopR+1CpfDKUowYeydcETvFOXIM/OcCy2psTiSa9xaLPD5 +PlmQPMBFouKi43u8QJHYrHJAT3OXlB3HGLKaUz0OmzMblbSlsNAu/RbxC75GNMxD +6VjXS+MuUZ7sMh67nB6Kpa9xN63EkENzWmV/o3sCgYEAvuvGu6lqtS+nTxOaVJtJ +AyJAr/Dgwcoh/JAwCmhX5q/CydG+URA5sRNKOD7VcR9xl1kpfOC5sfCo42kyomSz +3PnXipBnuFeOzFMpIncoue86lulPdbU3j6hzKhrLtfYNF89qPEzfvVgSpNnIXWxF +lRyfz74PO2EDL62eUTvxa3U= -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index ed672ec812..efa4ac00ca 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTEyMjIxMTMwMFoXDTM0MTEyMjIxMTMwMFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3jm5T0iKR4 -y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cKWQIxFMyZirvfWNJt9Nmd2e2Yq0jeu73uVhDDLLf9nB -GmRvzbFetuuiyl/b27Nwnweobcy5fJewhnbo2NuJYxwfQDZv5SlnbrBiJRKzqPFQ -Cj28AriR+kyXhPfjyT0A9kH9A8GQQ51DPjDEbdGjSzatzTOYPPdBLSaHK+nNV3uM -ePw/GTTH5O72x6IyZJIE5OCUZrKlNUlUIXk= +BBQuYmIh+CV093BltPCw1QZHxIGHJTANBgkqhkiG9w0BAQsFAAOCAgEAIJRJHtZs +C7Ssn6a+MOPP1MR5tKrAI8Eyhgl+vcB8L1F9i8FLBqWoHxm6RKXR3DTiKvOHRFra +0jagYJwiEzmAV0E+wZvqlzqs1u7/YuAnM/Vx/azE4Ux3x5LQLUhBOInhG5VI1UFg +5ZpULVSTar3mZ0NjlXWi4FF4HiRfJtnIQnlzh3EM7PQEUwlNnzQMWRq9ogTadx2f +IIJQfM8DgYBqXX00HJMHVOprEPgCHldvc3RBFg8kym4/upSVancOAXmalePDWpg4 +8qWX54r+j2PlQuoxd5dMwequmG1yaKMHzcN10Vvku+C/DoUKXBwynyTksFfb5LcO +z+VbhzCGtvLEJ7xLYNY/AcJcmY3pR9zFpBlC7oAwGJdw/pYtnDjWSQ+D41mCrirV +K4MLn4YS0qVqXX2W1xrx89+E6WBzV7r53h73TVw9LXPNfn2AWV+bumZrMbwvrC2M +iAruaACheI9YACGaFYHSD8G9xxu1L0fFnnKDa8iGfnuz3RJE7iGPgDEjPaIrn7RP +WzojEQi03p3UNLhH9BQWuK9xF5ffzwKMWnrAQpgNASWh1/5P+U2tRZ4DSqhhya8D +UO9d1dF5gXpjrpz32N3crB2hYOocPQVJM4t0ub8YyEYV0Lzqs4shnHprZqP5kQ5T ++RG/fqOT5gEytJNNj6q//TY8vUAAiYHBO6k= -----END CERTIFICATE----- From ebd92bde6bb6d8c7a067942e3925bb2395d93222 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Mon, 25 Nov 2024 13:45:37 -0500 Subject: [PATCH 45/48] fixing formats --- .../handler/stats/provider/statuscode.go | 4 ++ .../handler/stats/provider/statuscode_test.go | 12 ++--- internal/tls/testdata/server.crt | 44 ++++++++-------- internal/tls/testdata/server.key | 52 +++++++++---------- internal/tls/testdata/tls-ca.crt | 50 +++++++++--------- 5 files changed, 83 insertions(+), 79 deletions(-) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index bb7b3a08ce..c4db2ce01e 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + package provider import ( @@ -8,6 +11,7 @@ import ( "time" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go index 4a1e9d1d47..c7a40033fe 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -19,16 +19,16 @@ func TestStatusCodeHandler(t *testing.T) { // Locking to ensure thread-safe operations handler.mu.Lock() - handler.statsByOperation["pmd"] = &[5]int{1, 2, 0, 1, 0} + handler.statsByOperation["dt"] = &[5]int{1, 2, 0, 1, 0} handler.mu.Unlock() // Retrieve stats after modification - stats := handler.Stats("pmd") + stats := handler.Stats("dt") expected := [5]int{1, 2, 0, 1, 0} - actualStats := stats.StatusCodes["pmd"] + actualStats := stats.StatusCodes["dt"] // Perform assertions - assert.Equal(t, expected, actualStats, "Unexpected stats values for operation 'pmd'") - assert.Contains(t, stats.StatusCodes, "pmd", "Status code map should contain 'pmd'") - assert.Equal(t, expected, stats.StatusCodes["pmd"], "Stats for 'pmd' do not match") + assert.Equal(t, expected, actualStats, "Unexpected stats values for operation 'dt'") + assert.Contains(t, stats.StatusCodes, "dt", "Status code map should contain 'dt'") + assert.Equal(t, expected, stats.StatusCodes["dt"], "Stats for 'dt' do not match") } diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index 4827558116..fecbd8237b 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGDCCAgCgAwIBAgIQAYBHVENqvOHA8ZQqQjJDkzANBgkqhkiG9w0BAQsFADAS -MRAwDgYDVQQKEwdSb290IENBMB4XDTI0MTEyNTE2NTgyM1oXDTI0MTEyNTE3NTgy -M1owFTETMBEGA1UEChMKS3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAPDb0hiuoFEgmrTdSIlGa9bnQ16QVjkrA++xu00C7Kd562H+EinU -LYhyae6qn6iMhlU0Cid9YnW4SMPFcsJ4zaMymtKA7bijm6icsyp1k2HGgjdP+CEo -1FJ19ykl3ipiKn5BDgSLaLwDW/bekdT3akDPuDc9V8F1/FPR3xhT0+OcGETOlPOq -PMtzVlaFH1s3ytUbofFxNLLueFg3eJ1gSOKSltyd4ooORvSfPMcUtkxs26JQywE6 -ZNAO6e70bE/a1A/pWXeGiSrfFvbW+I8JiNVzE486on48Jt5RvuUzV3qjs/Be4ivU -b4c3ijB1FA5g0FPFxDqdze/iKal1kgd0PZUCAwEAAaNnMGUwDgYDVR0PAQH/BAQD -AgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgw -FoAUyAL5mzrz1ukytBmj2Ur9nCLgY44wDwYDVR0RBAgwBocEfwAAATANBgkqhkiG -9w0BAQsFAAOCAgEAdQE6PI37b+iGZOjoRycWE5NVjU6dppSMTnN/2uPDarEO5flz -TgwHkepffb/nvB7W+yXzbdL3FSGjTw6xUXaLnN/18CgrxGQBsnTZiZPFUu8k34YW -oOdJL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c/RgC9fAcaRYYBhei7Xcid6 +0jI6nnKoSfS/+9VJBVqrYFbkqadO0JulXhSPAgMBAAGjZzBlMA4GA1UdDwEB/wQE +AwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB8GA1UdIwQY +MBaAFJi6T24jwFP3R2mB9/BGvFCzu7b1MA8GA1UdEQQIMAaHBH8AAAEwDQYJKoZI +hvcNAQELBQADggIBAB8VerzpkG1p5eq8QqDDAYjxDkn+W7MIZwLYUXQB+Uj7abs6 +t/6MNhCK89ookd3Wyg3MKpp7meKtscvPwZWUxs+tl9zNiFqPLRBa0qx1DKuatS3c +9teJZxSd15BeBLDir5OFp0f67s1mCh283aKf7saU12w/R0/xRCpiYCj2SheEG3Kr +FU3F+KtyrRx/RpX2p/bC9BL0k84oiXM30e49bdYKf/62v8SB8PsQN2nWglZAZ6/0 +q015Zh7K0Pa0NMDHEzZTlyLBPLpyeLyQyiEnBC783DqZOOvgcZOtghS9ZzO312eK +lxAofdLhteSZDOX8khQ4m/JXS5FBT0cGnYqNjdSKYeJdCRh1WTbENTSCwC3fvart +V+T5E35Px1Yot661sqPxrDs3UhN89IMYIk7lNlP5DiLQB0CrwXwRXdMn0jEJWhrv +xtFDaSXFKY12Axm6y1uv3wpVRDwWCXXxnEfoAsALm2onR0nOeg3WG4z5BzrKKfyk +DQXuN3zZzLuQmkmUCNUMxB6qDiI+rTaXgIphwfDZBmRkTgz+Hr1VXvpsg7pk335R +IR5QXYeAkFRc3TrH71OaYPBxIlCp8JcQ/eL1z5nvZZhMk3ivJnf3f22K5i18I/D4 +Aunffja6Z3nE4kuw56NkvDhyGEC9XsS7dbF2FNN/DNDCUxij8MukQuuDMMRy -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index e6afc8732a..543fac6267 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvQI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0e2tb6WXcWXnuSBZLmDkjx9RBp0ThWNdXD +qgRZEUfyLb4WaKYdl9cDJA== -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index efa4ac00ca..df4b572b3c 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTEyNTE2NTgyOFoXDTM0MTEyNTE2NTgyOFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMehddaZ8DxS -twdYQ4hil51MJDW4l01usSqpooUm+MaFLvMu8sxacKHjcwtgtRGRf9ZHv4cQUIFU -CvTestEyC7hS89Y6LEn9Ovy0iRtRLL6Y83t7/vLQM77PRSKkyuyI3t8q+bPQbgDr -z90H5CW1SMiDmFtnEFbYNMWc7EJrF5GLLKmv6ytAz3hxvHIzopl2xzR6WiXEod5G -IInMammxxweqNGaQuqT1Su2NxOlfGfuEoEpwZZoVfZkibbzwTdT8JeksLF9yo4+P -vMAljuOnabHsKsMVm8gJ0gjYpvMSNPIuXYbv1um6UvvfcCPY8xrrXT2u+EToXsGT -rg2nKS2nPRIT7kgZ6vhfybECwTmUx9C0QQIqWBO3VVd9eCbfuGINR9ZsgB/ApXtG -r0ZvYqSoTvCMbEXwdHdFW+2V1XvBADQGab3XiBfumkNFfztjmdRkgFWbLw5LABA+ -eedJliL7sX3ym/7RnpJxY9XRv4gsVCYJgKS+4u9ssSV0WAKuBDddFu3ib6qDEWqR -2rNza5sOSvrQFxE3GL5GgWadYpMZwSMuixa6PuG7aqMvWP8hFOchOgTuuWvvo2C7 -gw42yZ6/v1+OFRaaohivpsxLuhG01pH0CDA+71U+zzGE6ONXDMZKP72VQzkdgPXL -dJS0PfyyQcG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kdFdiVfvgNhmvWfQheovOVII2wRo/JEjKTU+01yF +Yp5S2cWYdMe8lur+8mlR+nTc6vq2Ql8ArQcwnRvUhpduRHkCr/WiRI6swalpIz4s +X+LfRCepH1bq/2tDXNjffAOaqlEz+QxI6+yUk9c7wyzmm/CIg85O4HrNNKu3CAF3 +/4zpAmIHuwyfGA26PX31LDfxYVtC+S7/7R5TbDDLP0G9Xjr37+5b2qXOL8A75qoM +W6byKk4IcSWTdwBsToGLx09N0BfH33j18ljcLRUNcoPqS2dvpw/Phm7ssGKN+a+N +P4QQhU7C27IdmorPqoj7/nNrA5wB8zLyeiY= -----END CERTIFICATE----- From 44c40066d53fd45d0f039a639a1112a93e8a1e81 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Mon, 25 Nov 2024 14:39:37 -0500 Subject: [PATCH 46/48] fixing tests --- internal/tls/testdata/server.crt | 44 +++++++++++++-------------- internal/tls/testdata/server.key | 52 ++++++++++++++++---------------- internal/tls/testdata/tls-ca.crt | 50 +++++++++++++++--------------- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/internal/tls/testdata/server.crt b/internal/tls/testdata/server.crt index fecbd8237b..12424f7b27 100644 --- a/internal/tls/testdata/server.crt +++ b/internal/tls/testdata/server.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEGTCCAgGgAwIBAgIRAJErVG1A9612vCnbWMxvVPIwDQYJKoZIhvcNAQELBQAw -EjEQMA4GA1UEChMHUm9vdCBDQTAeFw0yNDExMjUxODEyMTdaFw0yNDExMjUxOTEy -MTdaMBUxEzARBgNVBAoTCkt1YmVybmV0ZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDt5M2yZc6dQaKbh6azSnZ9TorGLPCeie5iFF3gvJACVPUoBnji -0oL/8PZONJGcLZbqjRKPNvqOLEIBxXRHu8Xy06+c7THaWPxKc4s7YtVjOZYpoZrv -iypksvj2YXnj25WMlXUIObMYZ5zCo8xey1vr4UXpnS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by+9CmhLZfgaVbE +nVQTj8hkUW1gtvnAP3v1Zbe3QMhlqWqwfwD5MgtdQZQ1IwAojaHwt105amQLxESe +vxAQdabKNkW/HUOjKmxz0XtadCLAwPBhP9/j6rQrDVH62zjHmEOjU/WsJQflgLfh +VJ/oIhLTDdGHhamJabpBr6RroxJVXo+vjfUf5LUc5vw54emx7PWOW4opuL3cE6J/ +URmA9CJX4wBeYyEHHoHFlPD9vV5GxOFQ57UimQK/bNl5jh1zxPPAY0j5OwReJRGH +1mrzt6pfGQeYFHMXbkFA5HU5P7Q5VF0cDCef9s1bxglSiMsEDaLOOyKvJ/w= -----END CERTIFICATE----- diff --git a/internal/tls/testdata/server.key b/internal/tls/testdata/server.key index 543fac6267..0efcb40bb3 100644 --- a/internal/tls/testdata/server.key +++ b/internal/tls/testdata/server.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDt5M2yZc6dQaKb -h6azSnZ9TorGLPCeie5iFF3gvJACVPUoBnji0oL/8PZONJGcLZbqjRKPNvqOLEIB -xXRHu8Xy06+c7THaWPxKc4s7YtVjOZYpoZrviypksvj2YXnj25WMlXUIObMYZ5zC -o8xey1vr4UXpnSQy1lEAxr7NpicxFIPpiQdT1DclsHI/ahY6eRdzUhAgyPpGJEwx -KsNsF6KUSXglUisCaPbY8mefmpEMWxQt2fXtdguXc++AqNGBjOXbdotJaTFGOnbv -/EQ8smJG4iptkc/RgC9fAcaRYYBhei7Xcid60jI6nnKoSfS/+9VJBVqrYFbkqadO -0JulXhSPAgMBAAECgf8ghieZPFIDLfYNTX59BLEucI6IiZxcEH+G6UHsd9s4dmUO -E9RzLlS6qTcDeixuLc10Q9VFvz6CMYrUsyoypHlruYVI7yThtUjI5QMkG18RMc5V -4sJL/brOCaoABVOk02Ce19AoT7ssmv3TnpFSZHssxJ/KULGiQarRcFqlwxGYo/Hp -x+QvnXdV4b/9//BJGRNlIQv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b701XfhR5UX +RWvWI50gwQKBgQCFa1i9luwJJ0m1VOyk5kML7gMhqcbneL8XYzzx2S7IMuyKpSNt +H++ZGWdXga2Vbq3bDmNQrSvDJLcWgEP6e9ZwwZH6WYgo9KA3036iTiF6fUx1doh5 +WB3M0M6SUTBFZzqzAq3vYYEWhns7A7Se/2w8N1+0HrRQnXu5aHK1RGo+iwKBgEST +hRx7fi/dK/xsl9oDyN4SPdPLlcmjPZ6/cb23RgUMZaAGiThmfu1hLU6pphMpkdKX +yzx6W9Wu2NTYPpT/WK8Ks4olYDjXaCnlrZR8BKz5E0Qq1OLej21ta0+5d+FbNSPA +o2u2EXEqUubVYxaUeYrpPAMiNzGNgAU+avTvvJaBAoGBAKely84irwZicpex79T/ +KYV3VOMYs6wETNSLdKkR9G2WEI4OsEw0qGm9pZXzS6lKOSXxW6fOzwI0/vhnmT4O +hBxeR+PriPFqD80ASXeVeVOEjMXQEjZ8Po+FfUvVu8zMNIPDwJ+hy94FE5kkDBte +vy6FnjMquTvekIsRwo/OOdz3 -----END PRIVATE KEY----- diff --git a/internal/tls/testdata/tls-ca.crt b/internal/tls/testdata/tls-ca.crt index df4b572b3c..4b861f4f40 100644 --- a/internal/tls/testdata/tls-ca.crt +++ b/internal/tls/testdata/tls-ca.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE----- MIIE9jCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQKEwdSb290 -IENBMB4XDTI0MTEyNTE4MTIyMFoXDTM0MTEyNTE4MTIyMFowEjEQMA4GA1UEChMH -Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJqmkUEzFRKI -OiiqMjvh9EEMkjFQs4D9E0dgpfNUVSeVAP7vYFZKK4+sM1D1reIjkQBfh+khPPts -DxVdjlCvjxKf8Mvm4RZXIe+Vf5sWYNj1phHc8up1fzZLkqEex6wRH4qnIgZyCaWj -FLIuF0+fhYT9m+Q0qiz0jbbQ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33j18ljcLRUNcoPqS2dvpw/Phm7ssGKN+a+N -P4QQhU7C27IdmorPqoj7/nNrA5wB8zLyeiY= +BBSWf0MJGMR6k7iAcZMQBOIFr+DoGjANBgkqhkiG9w0BAQsFAAOCAgEAHQib14b2 +y1b9Xa+lvvpyho887AF5LJMvcAaFA2qrZTgsct9YAUyP4jwHSMa82F34GF5zWm96 +wKGa2V7rykKPLtL2o0ilfnz3bJndL2MUjgVqK7GzkOGIhhXreG6/4WZ+oNReMzjw +uZ6zWKhUrTKfvt5J70Nzk+aPrwEzOOcb078QfrFvxElrkoyBz5LGF6HVdIVYUO94 +1DW1egaduIZCcmavO/CJ5QvzXMyiHkpuT0SoltvVFskoP9aS0OxnaQIrmNx+vajT +9zd/WMroxBh+z4Y6sQmy6zZF+rAPItgZNHncMt8AJBGUlAhjgtiP37v/+w5zKpOD +nXPKVf9mOPNdIDUBpzWxRXwkE1GI8kFjQsuiBD0RGNj1Db/m9lnxOX2B1vKOHRtg +Q3LQURMd3oNj2L4dnJG4SbfXi6CdxRPPtvAb2TJh8qIsL7WxDRey1uhmQWknYXso +kiQ1VgEBVwOXR3NGqlDboWYma/wDOtbaMSd0dl2m2PP7FXJNakUmrATNdwrWjuto +onSHblkkDI5NvA+xUPXm4n7os3DHl6upvToVRTIDaWDBJLGyWEVw87y8+VPR0l5g +XpYDatVLlgC/Nz3Ggn3vepGPV25d7COORXI1EXfjn2PUx7lEK0MbaPfkqPC43Q1g +qubuxdWE+FRLgfs3Ywv1JckNAec7Jg0FA2w= -----END CERTIFICATE----- From ecb4be5c085ebb4d9697811a14b5466502fe191b Mon Sep 17 00:00:00 2001 From: Paramadon Date: Mon, 25 Nov 2024 15:11:10 -0500 Subject: [PATCH 47/48] removing log statements --- .../handler/stats/provider/statuscode.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index c4db2ce01e..28d6303c4c 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -5,7 +5,6 @@ package provider import ( "context" - "log" "net/http" "sync" "time" @@ -42,11 +41,7 @@ func GetStatusCodeStats(filter interface{}) *StatusCodeHandler { if opsFilter, ok := filter.(agent.OperationsFilter); ok { handler.filter = opsFilter - } else { - // Provide a default or fallback implementation if the filter is not valid - log.Println("Invalid filter provided; using NoOpOperationsFilter.") } - handler.startResetTimer() statusCodeSingleton = handler }) @@ -61,7 +56,6 @@ func (h *StatusCodeHandler) startResetTimer() { for key := range h.statsByOperation { delete(h.statsByOperation, key) } - log.Println("Status code stats reset.") h.startResetTimer() }) } @@ -75,10 +69,7 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response operation := awsmiddleware.GetOperationName(ctx) if !h.filter.IsAllowed(operation) { - log.Printf("Operation %s is not allowed", operation) return - } else { - log.Printf("Processing response for operation: %s", operation) } operation = GetShortOperationName(operation) @@ -95,15 +86,9 @@ func (h *StatusCodeHandler) HandleResponse(ctx context.Context, r *http.Response if !exists { stats = &[5]int{} h.statsByOperation[operation] = stats - log.Printf("Initializing stats for operation: %s", operation) } h.updateStatusCodeCount(stats, statusCode, operation) - - // Optionally, log all stats (protected by the mutex) - for operation, stats := range h.statsByOperation { - log.Printf("Operation: %s, 200=%d, 400=%d, 408=%d, 413=%d, 429=%d", operation, stats[0], stats[1], stats[2], stats[3], stats[4]) - } } // Helper function to update the status code counts @@ -120,7 +105,7 @@ func (h *StatusCodeHandler) updateStatusCodeCount(stats *[5]int, statusCode int, case 429: stats[4]++ default: - log.Printf("Received an untracked status code %d for operation: %s", statusCode, operation) + return } } From dfa3d4b6529ad7824f545929330fc197c2b7db30 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Mon, 25 Nov 2024 15:14:48 -0500 Subject: [PATCH 48/48] fixed names --- extension/agenthealth/config.go | 6 +++--- extension/agenthealth/extension.go | 2 +- .../translate/otel/extension/agenthealth/translator.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/agenthealth/config.go b/extension/agenthealth/config.go index 3952ef3f81..78a1b28d92 100644 --- a/extension/agenthealth/config.go +++ b/extension/agenthealth/config.go @@ -10,9 +10,9 @@ import ( ) type Config struct { - IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` - Stats agent.StatsConfig `mapstructure:"stats"` - IsOnlyStatusCodeEnabled bool `mapstructure:"is_status_code_enabled,omitempty"` + IsUsageDataEnabled bool `mapstructure:"is_usage_data_enabled"` + Stats agent.StatsConfig `mapstructure:"stats"` + IsStatusCodeEnabled bool `mapstructure:"is_status_code_enabled,omitempty"` } var _ component.Config = (*Config)(nil) diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index f479d63b6a..6af3269610 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -32,7 +32,7 @@ func (ah *agentHealth) Handlers() ([]awsmiddleware.RequestHandler, []awsmiddlewa } statusCodeEnabled := false - statusCodeEnabled = ah.cfg.IsOnlyStatusCodeEnabled + statusCodeEnabled = ah.cfg.IsStatusCodeEnabled agentStatsEnabled := slices.Contains(ah.cfg.Stats.Operations, "PutMetricData") || diff --git a/translator/translate/otel/extension/agenthealth/translator.go b/translator/translate/otel/extension/agenthealth/translator.go index c4320374bf..541a4445d4 100644 --- a/translator/translate/otel/extension/agenthealth/translator.go +++ b/translator/translate/otel/extension/agenthealth/translator.go @@ -70,7 +70,7 @@ func (t *translator) Translate(conf *confmap.Conf) (component.Config, error) { if usageData, ok := common.GetBool(conf, common.ConfigKey(common.AgentKey, usageDataKey)); ok { cfg.IsUsageDataEnabled = cfg.IsUsageDataEnabled && usageData } - cfg.IsOnlyStatusCodeEnabled = t.statuscodeonly + cfg.IsStatusCodeEnabled = t.statuscodeonly if t.statuscodeonly != false && t.statuscodeonly { return cfg, nil }