Skip to content

Metrics Sampling Interval#654

Merged
toksdotdev merged 8 commits intosuperradcompany:mainfrom
wellsbunk5:configureMetricsSampleInterval
May 5, 2026
Merged

Metrics Sampling Interval#654
toksdotdev merged 8 commits intosuperradcompany:mainfrom
wellsbunk5:configureMetricsSampleInterval

Conversation

@wellsbunk5
Copy link
Copy Markdown
Contributor

@wellsbunk5 wellsbunk5 commented May 3, 2026

Add the ability to configure the metrics sample interval in ms from the config or override in the sdk command to create a sandbox.

This is so that users can configure how frequently metric samples are collected. It could be faster or slower but the default remains 1 second or 1000 ms. If a user wants to disable sampling completely they set it to 0 and the entire metric sampling task is skipped.

If they disable metric sampling by setting the interval to 0 and then they try to read the metrics from cli/sdk, they will receive and error saying metrics are disabled for that sandbox.

Example config:

{
  "database": {
    "max_connections": 1
  },
  "sandbox_defaults": {
    "metrics_sample_interval_ms": 0
  }
}

…onfig or override in the sdk command to create a sandbox. Setting to 0 disables the metric sampling completely
Comment thread crates/microsandbox/lib/config/mod.rs Outdated
Comment thread crates/cli/lib/sandbox_cmd.rs Outdated
Comment thread docs/configuration.mdx Outdated
Comment thread crates/microsandbox/lib/sandbox/metrics.rs Outdated
@toksdotdev toksdotdev merged commit fdd257b into superradcompany:main May 5, 2026
20 of 22 checks passed
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.

2 participants