Skip to content

Commit 4291363

Browse files
authored
docs(unreal): Add network performance monitoring metrics (#17167)
Related items: - getsentry/sentry-unreal#1321
1 parent 7d0429f commit 4291363

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

docs/platforms/unreal/metrics/index.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,51 @@ SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::Create
115115
}));
116116
```
117117
118+
### Network
119+
120+
<Alert>
121+
Network metrics require Unreal Engine 5.7 or later. On older engine versions, this setting has no effect.
122+
</Alert>
123+
124+
When **Collect network metrics** is enabled, the SDK periodically polls Unreal Engine's network metrics database (`UNetworkMetricsDatabase`) and emits gauge metrics for the active network session. These metrics are only collected when a `UNetDriver` is present — that is, during multiplayer sessions (client connected to a server, or a server with connected clients). In singleplayer games without networking, no metrics are emitted.
125+
126+
The engine only populates the network metrics database when the `net.EnableNetStats` console variable is set to `true`. Add the following to your `DefaultEngine.ini` to enable it:
127+
128+
```ini
129+
[SystemSettings]
130+
net.EnableNetStats=1
131+
```
132+
133+
| Metric | Type | Description |
134+
|--------|------|-------------|
135+
| `game.perf.net.in_rate` | Gauge (bytes/sec) | Incoming bandwidth |
136+
| `game.perf.net.out_rate` | Gauge (bytes/sec) | Outgoing bandwidth |
137+
| `game.perf.net.in_packets` | Gauge | Incoming packets per second |
138+
| `game.perf.net.out_packets` | Gauge | Outgoing packets per second |
139+
| `game.perf.net.in_packets_lost` | Gauge | Incoming packets lost |
140+
| `game.perf.net.out_packets_lost` | Gauge | Outgoing packets lost |
141+
| `game.perf.net.ping` | Gauge (ms) | Client ping to server |
142+
| `game.perf.net.jitter` | Gauge (ms) | Client connection jitter (latency variation) |
143+
| `game.perf.net.num_clients` | Gauge | Number of connected clients (server only) |
144+
| `game.perf.net.ping_client_avg` | Gauge (ms) | Average ping across all clients (server only) |
145+
| `game.perf.net.ping_client_max` | Gauge (ms) | Maximum ping across all clients (server only) |
146+
| `game.perf.net.in_rate_client_avg` | Gauge (bytes/sec) | Average incoming bandwidth per client (server only) |
147+
| `game.perf.net.out_rate_client_avg` | Gauge (bytes/sec) | Average outgoing bandwidth per client (server only) |
148+
| `game.perf.net.sat_connections` | Gauge | Connections skipped due to bandwidth saturation (server only) |
149+
150+
Not all metrics are available in every context — client-specific metrics (ping, jitter) are only populated on clients, while server-specific metrics (num_clients, per-client stats, saturation) are only populated on servers. Listen servers report both sets.
151+
152+
The **Network metrics sample interval** setting controls how often network stats are polled. The default value of 10 seconds provides good visibility into network health without excessive overhead.
153+
154+
```cpp
155+
SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::CreateLambda([=](USentrySettings* Settings)
156+
{
157+
Settings->EnableMetrics = true;
158+
Settings->EnableAutoNetworkMetrics = true;
159+
Settings->NetworkMetricsSampleInterval = 10; // Poll every 10 seconds (default)
160+
}));
161+
```
162+
118163
## Options
119164
120165
<PlatformContent includePath="metrics/options" />

0 commit comments

Comments
 (0)