DenoRuntimeMetrics

Collect Deno runtime health metrics such as memory usage and process uptime.

Import name: Sentry.denoRuntimeMetricsIntegration

The denoRuntimeMetricsIntegration periodically collects Deno runtime health metrics and sends them to Sentry. Metrics include memory usage and process uptime.

Copied
import * as Sentry from "@sentry/deno";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [Sentry.denoRuntimeMetricsIntegration()],
});

The following metrics are emitted every 30 seconds by default:

MetricTypeUnitDescription
deno.runtime.mem.rssgaugebyteResident Set Size — actual process memory footprint
deno.runtime.mem.heap_usedgaugebyteV8 heap currently in use
deno.runtime.mem.heap_totalgaugebyteTotal V8 heap allocated
deno.runtime.process.uptimecountersecondCumulative process uptime

Type: object

Configure which metrics to collect. You can enable opt-in metrics or disable default ones.

Opt-in metrics (off by default):

Copied
Sentry.denoRuntimeMetricsIntegration({
  collect: {
    memExternal: true, // deno.runtime.mem.external
  },
});

Disabling default metrics:

Copied
Sentry.denoRuntimeMetricsIntegration({
  collect: {
    uptime: false,
  },
});

Type: number

The interval in milliseconds between metric collections. Defaults to 30000 (30 seconds).

Copied
Sentry.denoRuntimeMetricsIntegration({
  collectionIntervalMs: 60_000,
});
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").