Skip to content

PRIV-546: node-measured round-trip metrics for ConfidentialModule - #23037

Merged
prashantkumar1982 merged 5 commits into
developfrom
tejaswi/priv-546-confidential-roundtrip-metric
Aug 8, 2026
Merged

prashantkumar1982 merged 5 commits into
developfrom
tejaswi/priv-546-confidential-roundtrip-metric

Conversation

@nadahalli

@nadahalli nadahalli commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

What

ConfidentialModule.Execute emitted no metrics, so there was no trusted signal for the enclave round-trip. The confidential metrics forwarded from the enclave (enclave.*) are re-emitted node-side but are non-attested (the host can tamper with them). This adds two node-measured, trusted instruments around the doRequest enclave call:

  • enclave_execution_time_ms (histogram)
  • enclave_execution_failures (counter)

labeled by workflowID / workflowOwner / workflowName.

Notes

  • Named in the enclave* namespace (not platform_engine_*), keeping all confidential-workflow metrics out of the classic namespace per the separate-namespace decision, so no classic dashboards/alerts are touched.
  • Self-contained metrics struct built via beholder.GetMeter(), matching the syncer's newMetrics pattern. newConfidentialModuleMetrics takes a metric.Meter so tests can inject a reader.
  • Unit tested: TestConfidentialModule_Execute_Metrics injects a ManualReader-backed meter and asserts the duration histogram records on success and the failure counter increments (duration still recorded) on an enclave error.

Completes the node-side item tracked in the PRIV-546 metrics comment; the enclave-side enclave.* metrics landed in confidential-compute #397/#403.

nadahalli added 2 commits July 7, 2026 17:31
ConfidentialModule.Execute emitted nothing, so there was no trusted signal for
the enclave round-trip. The enclave.* metrics are node-forwarded but non-attested;
this adds two node-measured (trusted) instruments around the doRequest call:

  platform_engine_confidential_execution_time_ms       (histogram)
  platform_engine_confidential_execution_failures      (counter)

labeled by workflowID/workflowOwner/workflowName. New metric names, so no overload
of existing classic dashboards/alerts.
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

Move the ConfidentialModule metrics into the enclave* namespace (enclave_execution_time_ms,
enclave_execution_failures) so all confidential-workflow metrics stay out of the
classic platform_engine_* namespace, per the separate-namespace decision.

Add TestConfidentialModule_Execute_Metrics: injects a ManualReader-backed meter
and asserts the duration histogram records on success and the failure counter
increments (with duration still recorded) on an enclave error.
@nadahalli
nadahalli marked this pull request as ready for review July 7, 2026 15:40
@nadahalli
nadahalli requested review from a team as code owners July 7, 2026 15:40
@trunk-io

trunk-io Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

bolekk
bolekk previously approved these changes Jul 10, 2026
jmank88
jmank88 previously approved these changes Jul 10, 2026
Resolve conflicts in confidential_module.go: keep the resolveOrgID nil-check
and metrics setup in NewConfidentialModule, and pass orgID to the timed
Execute doRequest call.
@nadahalli
nadahalli dismissed stale reviews from jmank88 and bolekk via 656b0f0 July 16, 2026 14:16
@nadahalli
nadahalli requested review from bolekk and jmank88 July 16, 2026 14:17
@cl-sonarqube-production

Copy link
Copy Markdown

@nadahalli
nadahalli enabled auto-merge July 22, 2026 14:35
@prashantkumar1982
prashantkumar1982 added this pull request to the merge queue Aug 8, 2026
Merged via the queue into develop with commit 003236a Aug 8, 2026
223 checks passed
@prashantkumar1982
prashantkumar1982 deleted the tejaswi/priv-546-confidential-roundtrip-metric branch August 8, 2026 20:05
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.

5 participants