diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index 45e3db40f8ab..5d230041ae80 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -10,7 +10,6 @@ import ( "strings" "sync" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/google/uuid" "go.opentelemetry.io/collector/component" @@ -20,6 +19,8 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/zap" + "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs" ) @@ -123,6 +124,7 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e putLogEvent, err := translateGroupedMetricToEmf(groupedMetric, emf.config, defaultLogStream) if err != nil { if errors.Is(err, errMissingMetricsForEnhancedContainerInsights) { + emf.config.logger.Debug("Dropping empty putLogEvents for enhanced container insights", zap.Error(err)) continue } return err diff --git a/exporter/awsemfexporter/metric_translator.go b/exporter/awsemfexporter/metric_translator.go index 5ec06fe13fa6..b1e37e804805 100644 --- a/exporter/awsemfexporter/metric_translator.go +++ b/exporter/awsemfexporter/metric_translator.go @@ -34,7 +34,7 @@ const ( fieldPrometheusMetricType = "prom_metric_type" ) -var errMissingMetricsForEnhancedContainerInsights = errors.New("Dropping empty putLogEvents for EnhancedContainerInsights") +var errMissingMetricsForEnhancedContainerInsights = errors.New("nil event detected with EnhancedContainerInsights enabled") var fieldPrometheusTypes = map[pmetric.MetricType]string{ pmetric.MetricTypeEmpty: "",