Overview
Daytona provides built-in OpenTelemetry (OTEL) integration for monitoring sandbox resource utilization. Export metrics to popular observability platforms like Grafana Cloud, New Relic, or any OTLP-compatible backend.Available Metrics
Daytona sandboxes expose the following resource metrics:CPU Metrics
| Metric | Prometheus Name | Description | Unit |
|---|---|---|---|
daytona.sandbox.cpu.utilization | daytona_sandbox_cpu_utilization_percent | CPU usage percentage | % (0-100) |
daytona.sandbox.cpu.limit | daytona_sandbox_cpu_limit_cores | CPU cores limit | cores |
Memory Metrics
| Metric | Prometheus Name | Description | Unit |
|---|---|---|---|
daytona.sandbox.memory.utilization | daytona_sandbox_memory_utilization_percent | Memory usage percentage | % (0-100) |
daytona.sandbox.memory.usage | daytona_sandbox_memory_usage_bytes | Memory used | bytes |
daytona.sandbox.memory.limit | daytona_sandbox_memory_limit_bytes | Memory limit | bytes |
Disk Metrics
| Metric | Prometheus Name | Description | Unit |
|---|---|---|---|
daytona.sandbox.filesystem.utilization | daytona_sandbox_filesystem_utilization_percent | Disk usage percentage | % (0-100) |
daytona.sandbox.filesystem.usage | daytona_sandbox_filesystem_usage_bytes | Disk space used | bytes |
daytona.sandbox.filesystem.available | daytona_sandbox_filesystem_available_bytes | Available disk space | bytes |
daytona.sandbox.filesystem.total | daytona_sandbox_filesystem_total_bytes | Total disk space | bytes |
Labels
All metrics include theservice_name label identifying the sandbox.
Quick Start
1. Configure OTLP Export
Enable OpenTelemetry metric export in your Daytona dashboard:- Go to Daytona Dashboard
- Navigate to Settings → Experimental
- Configure OTLP settings:
- OTLP Endpoint: Your collector endpoint (e.g.,
https://otlp-gateway-prod-eu-central-0.grafana.net/otlp) - OTLP Headers: Authorization header (e.g.,
Authorization=Basic <token>)
- OTLP Endpoint: Your collector endpoint (e.g.,
- Click Save
2. Verify Metrics Flow
Create a sandbox and verify metrics are being exported:daytona_sandbox_*.
Integration Guides
Grafana Cloud
Step 1: Create Grafana Cloud Account- Go to grafana.com and create a free account
- Create a new stack (choose a region close to you)
- In Grafana Cloud Portal, go to Connections → Add new connection
- Search for OpenTelemetry (OTLP) and select it
- Follow setup wizard:
- Choose OpenTelemetry SDK
- Choose Linux infrastructure
- Create a Grafana Cloud Access token:
- Name:
daytona-otel-token - Scopes: All scopes
- Save the token securely
- Name:
- Note your configuration values:
OTEL_EXPORTER_OTLP_ENDPOINT(e.g.,https://otlp-gateway-prod-eu-central-0.grafana.net/otlp)OTEL_EXPORTER_OTLP_HEADERS(e.g.,Authorization=Basic MTUxNzAz...)
- OTLP Endpoint: The endpoint URL from Grafana
- OTLP Headers: The Authorization header from Grafana
- Download the Grafana dashboard template
- In Grafana Cloud, click Dashboards → New → Import
- Upload
dashboard.json - Select your Prometheus data source
- Click Import
- Resource Overview: High-level metrics across all sandboxes
- CPU Details: Detailed CPU utilization, limits, and heatmaps
- Memory Details: Memory usage patterns and limits
- Disk Details: Filesystem usage and space breakdown
- Alert Thresholds: Pre-configured warning and critical levels
Prometheus + Grafana (Self-Hosted)
Step 1: Deploy OpenTelemetry Collector- Add Prometheus data source in Grafana
- Import the Daytona dashboard template
- Start monitoring sandbox metrics
New Relic
- Get your New Relic OTLP endpoint and API key
- Configure in Daytona Dashboard:
- Endpoint:
https://otlp.nr-data.net:4318 - Headers:
api-key=<YOUR_NEW_RELIC_LICENSE_KEY>
- Endpoint:
- View metrics in New Relic under Metrics & Events
Query Examples
PromQL Queries
CPU Utilization Over Time:Alert Rules
Programmatic Monitoring
Query Metrics via API
Custom Metrics Collection
Best Practices
Alert Thresholds
Recommended warning and critical levels:| Resource | Warning | Critical |
|---|---|---|
| CPU | 70% | 85% |
| Memory | 80% | 90% |
| Disk | 75% | 85% |
Retention Policies
High Cardinality
For environments with many sandboxes:- Use longer aggregation intervals
- Filter to specific service names
- Reduce retention period
- Consider downsampling old data
Monitoring Multi-Agent Systems
Troubleshooting
No Metrics Appearing
- Verify OTLP configuration in Daytona Dashboard
- Create test sandbox and run workload
- Check endpoint connectivity:
- Verify time range in your observability platform
High Cardinality Warnings
- Filtering to active sandboxes only
- Using recording rules
- Increasing aggregation intervals
Missing Labels
Related Resources
- Multi-Agent Systems - Monitor agent coordination
- Data Analysis - Track analysis workflows
- SDK Reference - Programmatic metric access
- OpenTelemetry Docs - OTEL specification