Skip to content

feat(tracing): show boundary connection time during sandbox startup - #5243

Open
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:feat/5160-boundary-connect-span/shiju-nv
Open

shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:feat/5160-boundary-connect-span/shiju-nv

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Startup traces currently charge backend connection and authentication waits to policy discovery. Add a boundary.connect child span so operators can see that wait separately.

Related Issue

Closes #5160.

Changes

  • Trace the shared connection path for dial, backend-provided, runtime-initiated and routed transports.
  • Record a fixed transport label and preserve the discovery parent. Cached channel reuse creates no extra connection span.
  • Add two focused tests for authenticated waits, cached reuse, parent relationships, bounded fields, errors and cancellation.

Release Notes

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)
  • cargo test --locked -p openshell-sandbox-backend --lib connection_span_ -- --nocapture: both new tests passed in a fresh test build using real TLS/RPC transport fixtures.
  • cargo clippy --locked -p openshell-sandbox-backend --all-targets -- -D warnings: passed on the final candidate.
  • cargo fmt -p openshell-sandbox-backend -- --check and git diff --check: passed.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@shiju-nv shiju-nv added area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. test:e2e Requires end-to-end coverage topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export. labels Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Label test:e2e applied for b3d63c4. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@HarryMoss

HarryMoss commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Drafted by Codex; checked by @HarryMoss.

Thanks @shiju-nv. This looks like a useful way to address the startup timing confusion @rhuss described in #5160.

I checked b3d63c4 locally. Both connection-span tests passed, covering authenticated waits, parent relationships, cached reuse and cancellation.

One small integration point: main’s #5280 now disallows raw TcpStream::connect calls. The new test file adds two at lines 109 and 142. Could those use openshell_core::net::connect_tcp_nodelay_best_effort to satisfy the current Clippy rule?

I haven’t captured a fresh Kubernetes startup trace, so that E2E acceptance criterion remains unverified by this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. test:e2e Requires end-to-end coverage topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(supervisor): split the boundary wait out of supervisor.boundary.discover_policy with a boundary.connect span

2 participants