-
Notifications
You must be signed in to change notification settings - Fork 802
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
Add metrics for shuffle sharding #4432
Add metrics for shuffle sharding #4432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems broadly ok, but I have a question about the metric value if scraped at a bad time.
@@ -109,6 +115,7 @@ func (g *ShuffleShardingGrouper) Groups(blocks map[ulid.ULID]*metadata.Meta) (re | |||
// TODO: Use the group's hash to determine whether a compactor should be responsible for compacting that group | |||
groupHash := hashGroup(group.blocks[0].Thanos.Labels["__org_id__"], group.rangeStart, group.rangeEnd) | |||
|
|||
g.remainingPlannedCompactions.Inc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the metric is scraped in the middle of this function, it looks like it will have some value between 0 and the final value. Is that useful?
Would it be better to count up then Set()
once?
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
@ac1214 will you be coming back to this? |
I haven't had much time to work on these changes, but I believe that @roystchiang is taking over this work. There is some discussion about this work in #4433 |
Signed-off-by: Albert <ac1214@users.noreply.github.com>
Signed-off-by: Albert <ac1214@users.noreply.github.com>
Signed-off-by: Albert <ac1214@users.noreply.github.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
1142db4
to
0f9a910
Compare
I don't think we need this PR, since it looks like #4433 includes changes in this PR. I will double check in more depth before closing this PR. |
#4433 will contain or overwrite all of the changes in this PR, so this one should be okay to close. This PR was originally created to split up the code to make reviewing easier. |
What this PR does:
Adds a metric for tracking the number of compactions which are planned but yet to be completed. Depends on #4357. Once #4357 is merged the diff for this PR will be reduced.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]