WebSocketInstrumentationConfiginterface
Configuration for the WebSocket instrumentation.
Properties (11)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| bytesMetric⚓︎ | boolean | string | null | false | x | If |
| connectDurationMetric⚓︎ | boolean | string | null | false | x | If |
| connectDurationMetricBuckets⚓︎ | number[] | [0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10] | x | Explicit histogram bucket boundaries for connectDurationMetric, in seconds, ascending. |
| enabled⚓︎ | boolean | x | Whether the WebSocket instrumentation is enabled. |
|
| ignoreGateway⚓︎ | boolean | false | x | If Cost note: with the message/byte metrics enabled, the gateway socket contributes a sample per gateway message - volume that describes io.Connect itself rather than the application. Enable those metrics deliberately, or set this flag to exclude the gateway. Sockets explicitly handed to the pre-init recorder via its trackWebSocket hook (e.g. the core-js gateway transport handing over its own connection) bypass this flag even when set - explicit handover is a deliberate opt-in. ignorePattern still applies to them and remains the veto. |
| ignorePattern⚓︎ | string | x | x | Optional regex pattern for WebSocket URLs that should be excluded from instrumentation - e.g. infrastructure sockets beyond the gateway connection (which can be excluded using ignoreGateway). |
| matchPattern⚓︎ | string | x | x | Optional regex pattern; if specified, only matching WebSocket URLs are instrumented. |
| messagesMetric⚓︎ | boolean | string | null | false | x | If |
| platform⚓︎ | boolean | false | x | If |
| preInit⚓︎ | boolean | true | x | Unless |
| trace⚓︎ | boolean | true | x | If If |