From 3ac430f10efa5059495d03959319fd7309c678fe Mon Sep 17 00:00:00 2001 From: Keerthi Motupalli Date: Tue, 29 Mar 2022 15:48:06 -0400 Subject: [PATCH 1/3] added debug flag to print metrics payload --- exporter/datadogexporter/metrics_exporter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 3a19f4a6f5d4..19fe6fb5e848 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -186,6 +186,7 @@ func (exp *metricsExporter) PushMetricsData(ctx context.Context, md pdata.Metric err = nil if len(ms) > 0 { + exp.params.Logger.Debug("exporting payload", zap.Any("metric", ms)) err = multierr.Append( err, exp.retrier.DoWithRetries(ctx, func(context.Context) error { From e0a45e2de564b20e995d4a215bcddd8b31b640ae Mon Sep 17 00:00:00 2001 From: Keerthi Motupalli Date: Tue, 29 Mar 2022 15:48:34 -0400 Subject: [PATCH 2/3] add debug flag to print sketches payload --- exporter/datadogexporter/metrics_exporter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 19fe6fb5e848..3f5b33f0683e 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -196,6 +196,7 @@ func (exp *metricsExporter) PushMetricsData(ctx context.Context, md pdata.Metric } if len(sl) > 0 { + exp.params.Logger.Debug("exporting sketches payload", zap.Any("sketches", sl)) err = multierr.Append( err, exp.retrier.DoWithRetries(ctx, func(ctx context.Context) error { From 666abd3c893d5d779dc2cf9f38f8bb9ca84f63e6 Mon Sep 17 00:00:00 2001 From: Keerthi Motupalli Date: Tue, 29 Mar 2022 16:00:44 -0400 Subject: [PATCH 3/3] added a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f798c4e59fb..4ee91b3d4539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - `k8seventsreceiver`: Add Api_version and resource_version (#8539) - `dynatraceexporter`: add multi-instance deployment note to README.md (#8848) - +- `datadogexporter`: Metrics payload data and Sketches payload data will be logged if collector is started in debug mode (#8929) ### 🛑 Breaking changes 🛑 - `windowsperfcountersreceiver`: Added metrics configuration (#8376)