From 2051c71ab0a1cc641fd0267d1f15c77609569444 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Fri, 20 Oct 2023 16:02:05 -0400 Subject: [PATCH] enable enhanced container insights flag in emf exporter --- exporter/awsemfexporter/config.go | 3 +-- exporter/awsemfexporter/config_test.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/exporter/awsemfexporter/config.go b/exporter/awsemfexporter/config.go index a8804c334199..8a153c54c696 100644 --- a/exporter/awsemfexporter/config.go +++ b/exporter/awsemfexporter/config.go @@ -150,8 +150,7 @@ func (config *Config) Validate() error { } func (config *Config) IsEnhancedContainerInsights() bool { - return false // temporarily disable, also need to rename _config to config - // return config.EnhancedContainerInsights && !config.DisableMetricExtraction + return config.EnhancedContainerInsights && !config.DisableMetricExtraction } func (config *Config) IsPulseApmEnabled() bool { diff --git a/exporter/awsemfexporter/config_test.go b/exporter/awsemfexporter/config_test.go index 3d5056d5ab2b..e879462ffd45 100644 --- a/exporter/awsemfexporter/config_test.go +++ b/exporter/awsemfexporter/config_test.go @@ -320,7 +320,7 @@ func TestIsEnhancedContainerInsights(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) cfg.EnhancedContainerInsights = true cfg.DisableMetricExtraction = false - assert.False(t, cfg.IsEnhancedContainerInsights()) + assert.True(t, cfg.IsEnhancedContainerInsights()) cfg.EnhancedContainerInsights = false assert.False(t, cfg.IsEnhancedContainerInsights()) cfg.EnhancedContainerInsights = true