From 10cc00e9e0c44accdd35af4bb74f1a971de7e77f Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 25 Oct 2023 10:33:10 -0400 Subject: [PATCH] enable enhanced container insights flag in emf exporter (#131) --- 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 e6579b640dc4..f98a03136396 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) IsAppSignalsEnabled() bool { diff --git a/exporter/awsemfexporter/config_test.go b/exporter/awsemfexporter/config_test.go index 0871a83b4548..ddd1a24e956e 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