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

First cut at metrics for alertmanager sharding operation. #4149

Merged
merged 6 commits into from
May 5, 2021

Conversation

stevesg
Copy link
Contributor

@stevesg stevesg commented Apr 29, 2021

What this PR does:

This commit adds a number of metrics to help track the operation of the
alertmanager sharding, specifically around the handling of the state.

  • cortex_alertmanager_state_fetch_replica_state_total
  • cortex_alertmanager_state_fetch_replica_state_failed_total
  • cortex_alertmanager_state_initial_sync_total
  • cortex_alertmanager_state_initial_sync_completed_total
  • cortex_alertmanager_state_initial_sync_duration_seconds
  • cortex_alertmanager_state_persist_total
  • cortex_alertmanager_state_persist_failed_total

Note this complements the already existing metrics:

  • cortex_alertmanager_partial_state_merges_total
  • cortex_alertmanager_partial_state_merges_failed_total
  • cortex_alertmanager_state_replication_total
  • cortex_alertmanager_state_replication_failed_total

Overly detailed timing metrics have not been included, instead opting
for just a single (non per-user) histogram for the duration of the
initial state operation. Timings for storage read/write are not
included as they are already provided from the bucket client.

Checklist

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

@stevesg stevesg marked this pull request as ready for review April 30, 2021 09:17
Copy link
Contributor

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM, my nits are minor and entirely optional.

Copy link
Contributor

@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.

Good job! I've left few comments, thanks!

Copy link
Contributor

@ranton256 ranton256 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, looks good to me as far as I can tell, module the missing object/vs error comment Marco made.

@stevesg
Copy link
Contributor Author

stevesg commented May 4, 2021

Thanks all for the reviews and good feedback, appreciated as always. Will fix up now.

@stevesg stevesg requested a review from pracucci May 4, 2021 10:14
stevesg added 5 commits May 4, 2021 12:48
This commit adds a number of metrics to help track the operation of the
alertmanager sharding, specifically around the handling of the state.

- `cortex_alertmanager_fetch_replica_state_total`
- `cortex_alertmanager_fetch_replica_state_failed_total`
- `cortex_alertmanager_state_initial_sync_total`
- `cortex_alertmanager_state_initial_sync_completed_total`
- `cortex_alertmanager_state_initial_sync_duration_seconds`
- `cortex_alertmanager_state_persist_total`
- `cortex_alertmanager_state_persist_failed_total`

Note this complements the already existing metrics:

- `cortex_alertmanager_partial_state_merges_total`
- `cortex_alertmanager_partial_state_merges_failed_total`
- `cortex_alertmanager_state_replication_total`
- `cortex_alertmanager_state_replication_failed_total`

Overly detailed timing metrics have not been included, instead opting
for just a single (non per-user) histogram for the duration of the
initial state operation. Timings for storage read/write are not
included as they are already provided from the bucket client.

Signed-off-by: Steve Simpson <[email protected]>
Signed-off-by: Steve Simpson <[email protected]>
Signed-off-by: Steve Simpson <[email protected]>
Signed-off-by: Steve Simpson <[email protected]>
Signed-off-by: Steve Simpson <[email protected]>
Copy link
Contributor

@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.

Thanks for addressing my feedback! LGTM 🚀

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! My comments are not blocking.

Signed-off-by: Steve Simpson <[email protected]>
@pracucci pracucci merged commit 5290137 into cortexproject:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants