fix: Add better logging/metric per table#513
Merged
kodiakhq[bot] merged 3 commits intomainfrom Dec 18, 2022
Merged
Conversation
⏱️ Benchmark results
|
erezrokah
approved these changes
Dec 18, 2022
Member
erezrokah
left a comment
There was a problem hiding this comment.
Looks good, added 2 non blocking comments
| logger.Info().Uint64("resources", tableMetrics.Resources).Uint64("errors", tableMetrics.Errors).Msg("fetch table finished") | ||
| if parent == nil { // Log only for root tables and relations only after resolving is done, otherwise we spam per object instead of per table. | ||
| logger.Info().Uint64("resources", tableMetrics.Resources).Uint64("errors", tableMetrics.Errors).Msg("table sync finished") | ||
| p.logTablesMetrics(table.Relations, client) |
Member
There was a problem hiding this comment.
Suggested change
| p.logTablesMetrics(table.Relations, client) | |
| p.logTablesMetrics(table.Relations, client) |
[non blocking] Maybe this could be p.logTableMetrics(table, client) and move the log in the above line into the method? This way we don't need to duplicate it
Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com>
0fff63d to
55af7e3
Compare
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 19, 2022
🤖 I have created a release *beep* *boop* --- ## [1.12.6](v1.12.5...v1.12.6) (2022-12-18) ### Bug Fixes * Add better logging/metric per table ([#513](#513)) ([da36396](da36396)) * Improve formatting of newlines in markdown files ([#492](#492)) ([e48ff90](e48ff90)) * Include table name in logs on panic ([#505](#505)) ([a0b8a46](a0b8a46)) * Move source & destination plugin code to separate packages ([#516](#516)) ([6733785](6733785)) * Use correct error codes ([#514](#514)) ([8b53d76](8b53d76)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
currently we silently drop metrics from child tables. This add them back when root table sync is finished so it is printed once per table/client (and not per object like it was before with millions of log lines)