Skip to content

feat(execution): count delivered HTTP outcalls by call class - #12001

Merged
eichhorl merged 1 commit into
masterfrom
eichhorl/outcall-delivered-class-label
Nov 2, 2026
Merged

eichhorl merged 1 commit into
masterfrom
eichhorl/outcall-delivered-class-label

Conversation

@eichhorl

@eichhorl eichhorl commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Adds a class label (guaranteed response or best-effort) to execution_http_outcalls_delivered_total, so that we can see how many HTTP outcalls are made with bounded-wait calls. That is useful for #11932, which cancels bounded-wait outcalls at their deadline.

The class is read from the request in the outcall's context, using the label name and values that the other execution and message-routing metrics already use for the call class. Outcalls that time out are delivered through the same path, so the counter still covers every outcall.

For dashboards: the counter now has two series per (pricing version, replication kind) pair. Queries that aggregate over it are unaffected; ones that select a single series need a sum.

🤖 Generated with Claude Code

Add a `class` label (`guaranteed response` or `best-effort`) to
`execution_http_outcalls_delivered_total`, so that we can see how many HTTP
outcalls are made with bounded-wait calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the change adding call-class labels to HTTP outcall metrics.

No open issues 🎉

What changed in this PR

Adds call-class visibility to delivered HTTP outcall metrics, helping measure bounded-wait usage ahead of deadline-based cancellation in #11932.

Changes:

  • Adds the class label with guaranteed response and best-effort values, derived from the request context.
  • Initializes all 12 pricing-version, replication-kind, and call-class series.
  • Updates metric assertions and adds a test covering both call classes.
File Description
rs/​execution_environment/​src/​metrics.rs Makes existing call-class label constants available within the crate.
rs/​execution_environment/​src/​execution_environment/​tests.rs Updates series-count assertions and verifies counting by call class.
rs/​execution_environment/​src/​execution_environment_metrics.rs Registers and increments delivered outcall counters with the new label.

Review effort: Balanced

@eichhorl
eichhorl marked this pull request as ready for review November 2, 2026 12:57
@eichhorl
eichhorl requested a review from a team as a code owner November 2, 2026 12:57
@zeropath-ai

zeropath-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to 2b2d86f.

Security Overview
Detected Code Changes
Change Type Relevant files
Refactor ► rs/execution_environment/src/execution_environment_metrics.rs
    Update imports and logic to incorporate and initialize call class labeling in HTTP outcalls metrics
► rs/execution_environment/src/metrics.rs
    Make LABEL_CLASS and related values public and adjust naming accordingly
Enhancement ► rs/execution_environment/src/execution_environment_metrics.rs
    Record HTTP outcalls by call class (best-effort vs guaranteed response) when delivering responses
► rs/execution_environment/src/metrics.rs
    Expose LABEL_CLASS and related label values publicly for use in metrics

@schneiderstefan

Copy link
Copy Markdown
Contributor

Is "call class" a good name for the distinction of best effort and guaranteed response? Have we maybe used other terminology in the past? cc @alin-at-dfinity

@eichhorl

eichhorl commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Is "call class" a good name for the distinction of best effort and guaranteed response? Have we maybe used other terminology in the past? cc @alin-at-dfinity

I'm reusing the existing label name which is "class": https://github.com/search?q=repo%3Adfinity%2Fic+LABEL_CLASS&type=code

@eichhorl
eichhorl added this pull request to the merge queue Nov 2, 2026
Merged via the queue into master with commit 13c9e34 Nov 2, 2026
44 checks passed
@eichhorl
eichhorl deleted the eichhorl/outcall-delivered-class-label branch November 2, 2026 15:37
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