From 1427ef7a452653161440b4a9d4061d6e4538a7c7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 21:20:23 +0200 Subject: [PATCH] Fix fleet.migration.total log key overlap (#1951) (#1962) Co-authored-by: Anderson Queiroz (cherry picked from commit 60ba1cf52f4bbc5bc96bca058ec651124fac7938) Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com> --- CHANGELOG.next.asciidoc | 1 + internal/pkg/dl/migration.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index b98d908e0..ab7419df9 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -13,6 +13,7 @@ - Fix issue were errors where being ignored written to elasticsearch. {pull}1896[1896] - LoadServerLimits will not overwrite specified limits when loading default/agent number specified values. {issue}1841[1841] {pull}1912[1912] - Use seperate rate limiters for internal and external API listeners. {issue}1859[1859] {pull}1904[1904] +- Fix fleet.migration.total log key overlap {pull}1951[1951] ==== New Features diff --git a/internal/pkg/dl/migration.go b/internal/pkg/dl/migration.go index a0b97bd04..acb00d84e 100644 --- a/internal/pkg/dl/migration.go +++ b/internal/pkg/dl/migration.go @@ -123,7 +123,6 @@ func applyMigration(ctx context.Context, name string, index string, bulker bulk. Str("fleet.migration.name", name). Int("fleet.migration.es.took", resp.Took). Bool("fleet.migration.es.timed_out", resp.TimedOut). - Int("fleet.migration.total", resp.Total). Int("fleet.migration.updated", resp.Updated). Int("fleet.migration.deleted", resp.Deleted). Int("fleet.migration.batches", resp.Batches). @@ -132,6 +131,7 @@ func applyMigration(ctx context.Context, name string, index string, bulker bulk. Int("fleet.migration.retries.bulk", resp.Retries.Bulk). Int("fleet.migration.retries.search", resp.Retries.Search). Dur("fleet.migration.total.duration", time.Since(start)). + Int("fleet.migration.total.count", resp.Total). Msgf("migration %s done", name) for _, fail := range resp.Failures {