Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move owned series check logging/metric inside of updateAllTenants #7044

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

pr00se
Copy link
Contributor

@pr00se pr00se commented Jan 3, 2024

What this PR does

We log and update the metric when we periodically recalculate the owned series for tenants, but we missed the recalculation triggered during service start. This moves the log/metric update inside of updateAllTenats so that we have a record of all invocations.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@pr00se pr00se requested a review from a team as a code owner January 3, 2024 19:27
@pracucci pracucci self-requested a review January 4, 2024 08:26
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pr00se pr00se merged commit b02398c into main Jan 4, 2024
@pr00se pr00se deleted the owned-series-logging branch January 4, 2024 15:14
Comment on lines +137 to +141
if updatedUsers > 0 {
level.Info(oss.logger).Log("msg", "updated owned series for users", "updatedUsers", updatedUsers, "duration", elapsed, "ringChanged", ringChanged)
}
oss.ownedSeriesCheckDuration.Observe(elapsed.Seconds())

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not be logged in case of early return on line 123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants