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

internalstorage: add gorm database metrics #711

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Dec 19, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:
Adding gorm database metrics to internalstorage.

The reason for using https://github.com/go-gorm/prometheus instead of https://github.com/prometheus/client_golang/blob/main/prometheus/collectors/dbstats_collector.go is to try to control the latency of calls to DB.Stats() on the clusterpedia side; after all, DB.Stats() performs a global lock!

If there is a need in the future, you can add configurations to get real-time database information.

Remove the detection of mysql or postgres databases, which should directly observe the database.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@clusterpedia-bot
Copy link

Hi @Iceber,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@clusterpedia-bot clusterpedia-bot added the kind/feature New feature label Dec 19, 2024
@Iceber Iceber force-pushed the internalstorage_metrics branch from 17c43f4 to c2451ac Compare December 19, 2024 03:12
@Iceber Iceber merged commit 423e61b into main Dec 19, 2024
12 checks passed
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.

2 participants