chore: add logs with timing for cluster sync performance#28707
Open
agaudreault wants to merge 1 commit into
Open
chore: add logs with timing for cluster sync performance#28707agaudreault wants to merge 1 commit into
agaudreault wants to merge 1 commit into
Conversation
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
❗ Preview Environment deployment failed on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Bundle ReportBundle size has no change ✅ |
pjiang-dev
requested changes
Jul 14, 2026
| return nil | ||
| }) | ||
| }) | ||
| log := c.log.WithValues( |
Contributor
There was a problem hiding this comment.
For cases where there is a long sync that eventually fails, we may lose the timing log.
What do you think about wrapping this in a defer func() so that we don't lose the log on early returns?
Member
Author
There was a problem hiding this comment.
The code doesn't look really great with the defer since we don't have a nice object like TimingStats in the gitops-engine submodule, and that would change where the "Failed to sync cluster" error is logged.
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.
To be able to have more insights on the cache sync performance, add timing stats to the log message.
This will help diagnose performance issues with the cache holding a lock and blocking all reconciliations while a cluster is syncing.