nemo_gym.telemetry.gym_metrics
nemo_gym.telemetry.gym_metrics
Attributed OTel instruments that nemo.lens.instruments.gym.record_gym_metrics cannot express.
nemo_gym.telemetry.metrics forwards to the five fixed, undimensioned instruments nemo-lens
declares. Anything that needs an attribute (a provider, a site, a class) is created here,
directly on the lens meter, and cached per meter so a re-initialised telemetry handle gets
fresh instruments. Every recorder is a no-op unless telemetry is initialised and exporting,
and never raises into its caller; call sites still sit under a span-group gate so they cost
nothing when disabled.
Sandbox lifecycle
gym.sandbox.active (up-down counter): sandboxes this process currently holds, +1 when a
provider hands back a handle, -1 when Gym releases it. Summed by the backend across the
processes that hold sandboxes; a gauge would show whichever process wrote last.
gym.sandbox.startup_duration_ms / gym.sandbox.exec_duration_ms (histograms): wall-clock
of one provisioning and one command. Explicit bucket boundaries up to thirty minutes: the SDK
default stops at ten seconds and a sandbox start routinely takes a minute.
gym.sandbox.create_retry_total (counter): one per create attempt a provider retried.
Retrying is provider-internal, so each provider that retries records it from its own loop.
All four carry nemo.gym.sandbox.provider.
Module Contents
Functions
Data
SANDBOX_CREATE_RETRY_INSTRUMENT
SANDBOX_DURATION_BOUNDARIES_MS
API
Drop cached instruments. Test-only.
Add delta (+1 on start, -1 on stop) to gym.sandbox.active for provider.
Count one retried sandbox-create attempt, by provider.
Record one command’s wall-clock inside an already-provisioned sandbox, by provider.
Record one sandbox’s provisioning wall-clock, by provider.