Skip to content

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

Open
nadahalli wants to merge 3 commits into
developfrom
tejaswi/priv-546-confidential-roundtrip-metric
Open

PRIV-546: node-measured round-trip metrics for ConfidentialModule#23037
nadahalli wants to merge 3 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 BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production

Copy link
Copy Markdown

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.

1 participant