Skip to content

Commit

Permalink
Fix fleet.migration.total log key overlap (#1951)
Browse files Browse the repository at this point in the history
Co-authored-by: Anderson Queiroz <anderson.queiroz@elastic.co>
(cherry picked from commit 60ba1cf)

# Conflicts:
#	CHANGELOG.next.asciidoc
#	internal/pkg/dl/migration.go
  • Loading branch information
joshdover authored and mergify[bot] committed Oct 6, 2022
1 parent ea9947d commit ecc0431
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
- Add error detail to catch-all HTTP error response. {pull}1854[1854]
- Update apikey.cache_hit log field name to match convention. {pull}1900[1900]
- LoadServerLimits will not overwrite specified limits when loading default/agent number specified values. {issue}1841[1841] {pull}1912[1912]
<<<<<<< HEAD
- Fix issue were errors where being ignored written to elasticsearch. {pull}1896[1896]
=======
- 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]
>>>>>>> 60ba1cf (Fix fleet.migration.total log key overlap (#1951))
==== New Features

Expand Down
16 changes: 16 additions & 0 deletions internal/pkg/dl/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func updateAgentMetadata(ctx context.Context, bulker bulk.Bulk, body []byte) (in
}

log.Info().
<<<<<<< HEAD
Int("took", resp.Took).
Bool("timed_out", resp.TimedOut).
Int("total", resp.Total).
Expand All @@ -127,6 +128,21 @@ func updateAgentMetadata(ctx context.Context, bulker bulk.Bulk, body []byte) (in
Int("retries.search", resp.Retries.Search).
Dur("rtt", time.Since(start)).
Msg("migrate agent records response")
=======
Str("fleet.migration.name", name).
Int("fleet.migration.es.took", resp.Took).
Bool("fleet.migration.es.timed_out", resp.TimedOut).
Int("fleet.migration.updated", resp.Updated).
Int("fleet.migration.deleted", resp.Deleted).
Int("fleet.migration.batches", resp.Batches).
Int("fleet.migration.version_conflicts", resp.VersionConflicts).
Int("fleet.migration.noops", resp.Noops).
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)
>>>>>>> 60ba1cf (Fix fleet.migration.total log key overlap (#1951))

for _, fail := range resp.Failures {
log.Error().RawJSON("failure", fail).Msg("migration failure")
Expand Down

0 comments on commit ecc0431

Please sign in to comment.