Skip to content

Add metrics for recording HTTP requests performed by procedures.#3745

Merged
gefjon merged 4 commits intomasterfrom
phoebe/procedure/http-metrics
Nov 25, 2025
Merged

Add metrics for recording HTTP requests performed by procedures.#3745
gefjon merged 4 commits intomasterfrom
phoebe/procedure/http-metrics

Conversation

@gefjon
Copy link
Contributor

@gefjon gefjon commented Nov 24, 2025

Description of Changes

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.

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.

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.
@gefjon gefjon removed the request for review from Centril November 24, 2025 20:11
Copy link
Collaborator

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@joshua-spacetime joshua-spacetime left a comment

Choose a reason for hiding this comment

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

LGTM. Including them in DB_METRICS makes sense.

@gefjon gefjon added this pull request to the merge queue Nov 25, 2025
Merged via the queue into master with commit 507b087 Nov 25, 2025
25 checks passed
@Centril Centril deleted the phoebe/procedure/http-metrics branch November 25, 2025 18:28
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.

Procedures: metrics for tracking HTTP request networking

3 participants