Skip to content

Commit d5b46f4

Browse files
chargomeclaude
andauthored
docs(deno): Add denoRuntimeMetricsIntegration documentation (#17168)
## DESCRIBE YOUR PR Document the new `denoRuntimeMetricsIntegration` added in getsentry/sentry-javascript#20023. Documents getsentry/sentry-javascript#20023 - Add integration documentation page with default/opt-in metrics table and configuration options - Add integration to the Deno platform integration table ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.) - [ ] Other deadline - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5735e7f commit d5b46f4

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: DenoRuntimeMetrics
3+
description: "Collect Deno runtime health metrics such as memory usage and process uptime."
4+
supported:
5+
- javascript.deno
6+
---
7+
8+
<Alert>
9+
10+
This integration only works in the Deno runtime.
11+
12+
</Alert>
13+
14+
_Import name: `Sentry.denoRuntimeMetricsIntegration`_
15+
16+
The `denoRuntimeMetricsIntegration` periodically collects Deno runtime health metrics and sends them to Sentry. Metrics include memory usage and process uptime.
17+
18+
```javascript
19+
import * as Sentry from "@sentry/deno";
20+
21+
Sentry.init({
22+
dsn: "___PUBLIC_DSN___",
23+
integrations: [Sentry.denoRuntimeMetricsIntegration()],
24+
});
25+
```
26+
27+
## Default Metrics
28+
29+
The following metrics are emitted every 30 seconds by default:
30+
31+
| Metric | Type | Unit | Description |
32+
| ------------------------------ | ------- | ------ | ---------------------------------------------------- |
33+
| `deno.runtime.mem.rss` | gauge | byte | Resident Set Size — actual process memory footprint |
34+
| `deno.runtime.mem.heap_used` | gauge | byte | V8 heap currently in use |
35+
| `deno.runtime.mem.heap_total` | gauge | byte | Total V8 heap allocated |
36+
| `deno.runtime.process.uptime` | counter | second | Cumulative process uptime |
37+
38+
<Alert>
39+
40+
Unlike the [Node.js equivalent](/platforms/javascript/guides/node/configuration/integrations/noderuntimemetrics), CPU and event loop metrics are not available because Deno does not expose `process.cpuUsage()`, `performance.eventLoopUtilization()`, or `monitorEventLoopDelay`.
41+
42+
</Alert>
43+
44+
## Options
45+
46+
### `collect`
47+
48+
_Type: `object`_
49+
50+
Configure which metrics to collect. You can enable opt-in metrics or disable default ones.
51+
52+
**Opt-in metrics (off by default):**
53+
54+
```javascript
55+
Sentry.denoRuntimeMetricsIntegration({
56+
collect: {
57+
memExternal: true, // deno.runtime.mem.external
58+
},
59+
});
60+
```
61+
62+
**Disabling default metrics:**
63+
64+
```javascript
65+
Sentry.denoRuntimeMetricsIntegration({
66+
collect: {
67+
uptime: false,
68+
},
69+
});
70+
```
71+
72+
### `collectionIntervalMs`
73+
74+
_Type: `number`_
75+
76+
The interval in milliseconds between metric collections. Defaults to `30000` (30 seconds).
77+
78+
```javascript
79+
Sentry.denoRuntimeMetricsIntegration({
80+
collectionIntervalMs: 60_000,
81+
});
82+
```

‎platform-includes/configuration/integrations/javascript.deno.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | |
1313
| [`captureConsoleIntegration`](./captureconsole) | | | | | ✓ |
1414
| [`denoCronIntegration`](./denocron) | | | | ✓ | |
15+
| [`denoRuntimeMetricsIntegration`](./denoruntimemetrics) | | | | | ✓ |
1516
| [`extraErrorDataIntegration`](./extraerrordata) | | | | | ✓ |
1617
| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | |
1718
| [`supabaseIntegration`](./supabase) | | ✓ | ✓ | | |

0 commit comments

Comments
 (0)