Add metrics for recording HTTP requests performed by procedures.#3745
Merged
Add metrics for recording HTTP requests performed by procedures.#3745
Conversation
This commit adds several new metrics to `DB_METRICS` for tracking procedures' HTTP requests: - `procedure_http_request_size_bytes`. - `procedure_http_response_size_bytes`. - `procedure_num_http_requests`. - `procedure_num_successful_http_requests`. - `procedure_num_failed_http_requests`. - `procedure_num_timeout_http_requests`. - `procedure_num_in_progress_http_requests`. See help strings in `crates/datastore/src/db_metrics/mod.rs` for details on what each of these tracks.
…tp-metrics Feat. merge conflict in imports, but no meaningful conflicts.
joshua-spacetime
approved these changes
Nov 25, 2025
Collaborator
joshua-spacetime
left a comment
There was a problem hiding this comment.
LGTM. Including them in DB_METRICS makes sense.
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.
Description of Changes
This commit adds several new metrics to
DB_METRICSfor tracking procedures' HTTP requests:procedure_http_request_size_bytes.procedure_http_response_size_bytes.procedure_num_http_requests.procedure_num_successful_http_requests.procedure_num_failed_http_requests.procedure_num_timeout_http_requests.procedure_num_in_progress_http_requests.See help strings in
crates/datastore/src/db_metrics/mod.rsfor details on what each of these tracks.Closes #3712 .
API and ABI breaking changes
N/a - I don't think we count metrics as a stable API.
Expected complexity level and risk
2, I guess? If we intend to use these for billing, some of the choices I've made about tracking may impact our business.
Testing
None; I don't know how to test Prometheus metrics.