Skip to content

chore: track subnet query message response size in metrics#9875

Merged
mraszyk merged 4 commits intomasterfrom
mraszyk/subnet_query_message_response_bytes
Apr 16, 2026
Merged

chore: track subnet query message response size in metrics#9875
mraszyk merged 4 commits intomasterfrom
mraszyk/subnet_query_message_response_bytes

Conversation

@mraszyk
Copy link
Copy Markdown
Contributor

@mraszyk mraszyk commented Apr 14, 2026

This PR tracks subnet query message response size in metrics. The motivation for this change is ability to monitor response sizes of the list_canisters query endpoint added by this PR.
For consistency, the label ErrorCode::CanisterRejectedMessage is introduced for the case Ok(WasmResult::Reject(_)).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new Prometheus histogram to track the response payload size (bytes) of subnet query message executions, to support monitoring/alerting on query response growth.

Changes:

  • Add a new execution_subnet_query_message_response_bytes histogram (labeled by method_name).
  • Update QueryHandlerMetrics::observe_subnet_query_message to accept Result<WasmResult, UserError> and record reply-size samples for successful replies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rs/execution_environment/src/metrics.rs
Comment thread rs/execution_environment/src/metrics.rs Outdated
Comment thread rs/execution_environment/src/metrics.rs
mraszyk and others added 2 commits April 14, 2026 19:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mraszyk mraszyk marked this pull request as ready for review April 14, 2026 18:19
@mraszyk mraszyk requested a review from a team as a code owner April 14, 2026 18:19
Comment thread rs/execution_environment/src/metrics.rs
@mraszyk mraszyk added this pull request to the merge queue Apr 16, 2026
Merged via the queue into master with commit 2847726 Apr 16, 2026
38 checks passed
@mraszyk mraszyk deleted the mraszyk/subnet_query_message_response_bytes branch April 16, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants