Skip to content

feat(clients): live sandbox resource metrics#24

Closed
MDzaja wants to merge 1 commit into
mainfrom
clients/pr-5114-sandbox-live-metrics
Closed

feat(clients): live sandbox resource metrics#24
MDzaja wants to merge 1 commit into
mainfrom
clients/pr-5114-sandbox-live-metrics

Conversation

@MDzaja

@MDzaja MDzaja commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Original monorepo PR: daytonaio/daytona#5114

Summary

Client-side counterpart of live sandbox resource metrics: SDK methods to read CPU/memory/disk
metrics across the SDKs, plus regenerated toolbox clients and the toolbox spec.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Adds live sandbox resource metrics to all SDKs. Introduces Sandbox.getMetrics() to fetch CPU, memory, and disk usage via the toolbox /system/metrics endpoint; snapshots refresh every ~60s by default and are configurable via OTEL_METRIC_EXPORT_INTERVAL.

  • New Features
    • Toolbox API: added /system/metrics returning SystemMetrics (cpuCount, cpuUsedPct, memTotal/memUsed, memCache, diskTotal/diskUsed/diskFree, timestamp/timestampUnix).
    • SDKs and docs: added getMetrics to Sandbox in Go, Java, Python (sync/async), Ruby, and TypeScript; docs include examples and the sampling interval env var.
    • Tests: added e2e checks across SDKs validating metric ranges and non-empty timestamps.
    • Regenerated toolbox clients (toolbox-api-client-go, toolbox-api-client-java, toolbox-api-client-python, toolbox-api-client-python-async, toolbox-api-client-ruby, @daytona/toolbox-api-client) to include SystemApi and SystemMetrics.

Written for commit 938231b. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

5 issues found across 46 files

Tip: instead of fixing issues one by one fix them all with cubic
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread sdk-python/tests/test_async_e2e.py
Comment thread sdk-python/tests/test_e2e.py
Comment thread sdk-java/src/test/java/io/daytona/sdk/E2ETest.java
@MDzaja MDzaja force-pushed the clients/pr-5114-sandbox-live-metrics branch 2 times, most recently from b5199d4 to 1944003 Compare July 3, 2026 10:46
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
@MDzaja MDzaja force-pushed the clients/pr-5114-sandbox-live-metrics branch from 1944003 to 938231b Compare July 3, 2026 10:48
@MDzaja

MDzaja commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

closed in favour of #28

@MDzaja MDzaja closed this Jul 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant