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

Implement metrics collection #3430

Merged
merged 4 commits into from
Sep 25, 2023
Merged

Conversation

Mihai22125
Copy link
Contributor

@Mihai22125 Mihai22125 commented Sep 25, 2023

Description

Closes #3392.

Implemented the internal/backends/postgresql/metadata.Registry.Collect method, which collects basic metrics regarding the number of databases and collections within the Registry. This enhancement aligns with the initial issue's request to mirror the functionality found in the SQLite backend.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@Mihai22125 Mihai22125 requested a review from AlekSi as a code owner September 25, 2023 14:57
@CLAassistant
Copy link

CLAassistant commented Sep 25, 2023

CLA assistant check
All committers have signed the CLA.

@AlekSi AlekSi added the code/feature Some user-visible feature is not implemented yet label Sep 25, 2023
@AlekSi AlekSi added this to the Next milestone Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #3430 (2ae5c66) into main (46f2b8a) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3430      +/-   ##
==========================================
- Coverage   74.32%   74.27%   -0.06%     
==========================================
  Files         415      415              
  Lines       25859    25885      +26     
==========================================
+ Hits        19219    19225       +6     
- Misses       5497     5517      +20     
  Partials     1143     1143              
Files Changed Coverage
internal/backends/postgresql/metadata/registry.go 0.00%
Flag Coverage Δ
filter-true 69.72% <0.00%> (-0.08%) ⬇️
integration 69.72% <0.00%> (-0.08%) ⬇️
mongodb-1 4.66% <0.00%> (-0.01%) ⬇️
pg-1 42.94% <0.00%> (-0.05%) ⬇️
pg-2 42.68% <0.00%> (-0.05%) ⬇️
pg-3 43.12% <0.00%> (-0.18%) ⬇️
postgresql-1 ∅ <ø> (∅)
postgresql-2 ?
postgresql-3 ∅ <ø> (∅)
sort-false 69.72% <0.00%> (-0.08%) ⬇️
sqlite-1 41.87% <0.00%> (-0.01%) ⬇️
sqlite-2 41.33% <0.00%> (-0.05%) ⬇️
sqlite-3 42.12% <0.00%> (-0.09%) ⬇️
unit 24.54% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@AlekSi AlekSi enabled auto-merge (squash) September 25, 2023 15:07
@AlekSi AlekSi requested review from a team, rumyantseva, chilagrow and noisersup September 25, 2023 15:08
Copy link
Contributor

@rumyantseva rumyantseva 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 contributing! Looks good to me.

@AlekSi AlekSi merged commit e7cf630 into FerretDB:main Sep 25, 2023
25 of 29 checks passed
@AlekSi AlekSi changed the title Implement metrics collection for PostgreSQL backend Implement metrics collection Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement Prometheus collector for Registry
4 participants