Skip to content

Fix ingester_memory_series/users metrics for TSDB storage #1982

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

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented Jan 15, 2020

What this PR does:
In this PR I've implemented the following two metrics for TSDB storage:

  • cortex_ingester_memory_series
  • cortex_ingester_memory_users

I've also moved the 4 metrics globally registered in user_state.go to the ingesterMetrics struct to ease testing.

This PR complements #1981 by @pstibrany.

Which issue(s) this PR fixes:
N/A

Checklist

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

@pracucci pracucci force-pushed the fix-ingester-memory-series-for-blocks-storage branch from 307a4bc to 0648256 Compare January 15, 2020 12:09
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.

Nice! So we actually can get number of series from TSDB! I missed that.

pracucci pushed a commit that referenced this pull request Jan 15, 2020
* Update queriedSeries and queriedSamples metrics in v2Query.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Increment number of users when creating new TSDB.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Use length of slices to update metrics.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Update CHANGELOG.md

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Removed memUsers.Inc() in favor of PR #1982.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Removed mention of cortex_ingester_memory_users from CHANGELOG.md

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* One more small fix to CHANGELOG.md.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pracucci pracucci force-pushed the fix-ingester-memory-series-for-blocks-storage branch from 0648256 to bfeb4be Compare January 15, 2020 14:02
Copy link
Contributor

@thorfour thorfour left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci force-pushed the fix-ingester-memory-series-for-blocks-storage branch from bfeb4be to b2569e0 Compare January 15, 2020 17:55
Copy link
Contributor

@jtlisi jtlisi left a comment

Choose a reason for hiding this comment

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

LGTM

@pracucci pracucci merged commit 876c8fa into cortexproject:master Jan 16, 2020
@pracucci pracucci deleted the fix-ingester-memory-series-for-blocks-storage branch January 16, 2020 07:49
@pracucci pracucci mentioned this pull request Jan 16, 2020
3 tasks
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.

6 participants