Add metrics to the database - #2638
Draft
paberr wants to merge 1 commit into
Draft
Conversation
paberr
force-pushed
the
pb/db-metrics
branch
3 times, most recently
from
June 18, 2024 10:04
a8a39ea to
bb44f5b
Compare
paberr
marked this pull request as ready for review
June 18, 2024 10:05
paberr
marked this pull request as draft
June 18, 2024 16:31
paberr
marked this pull request as ready for review
June 18, 2024 16:51
paberr
force-pushed
the
pb/db-metrics
branch
2 times, most recently
from
June 18, 2024 20:46
ee897be to
b4255db
Compare
hrxi
reviewed
Jun 21, 2024
hrxi
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Most of the comments are minor or questions. The license/version this was taken from should probably be stated.
| /// If `true`, the backtrace of transaction has already been recorded and logged. | ||
| /// See [`MetricsHandler::log_backtrace_on_long_read_transaction`]. | ||
| backtrace_recorded: AtomicBool, | ||
| pub(super) env_metrics: Arc<DatabaseEnvMetrics>, |
Contributor
There was a problem hiding this comment.
I think you should be able to get away with a reference here.
Member
Author
There was a problem hiding this comment.
Not sure what you mean with that. Replacing the Arc with a &?
Member
Author
There was a problem hiding this comment.
I don't think there's much value in that as the Database struct needs to have an Arc anyways.
paberr
marked this pull request as draft
July 29, 2024 08:49
Member
Author
|
Incompatible with new DB refactor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this pull request?
Adds detailed metrics to the database crate – similarly to how
rethis doing it.This currently uses the
metricscrate, which is not compatible with ourprometheus_clientcrate.I implemented a connection between these two but it is not really nice. Thus, I'll also open an issue to improve this situation at a later point.
Open TODOs:
Pull request checklist
clippyandrustfmtwarnings.