Add domain traffic metrics and Grafana dashboard
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 13s

This commit is contained in:
2026-08-08 01:57:00 +03:00
parent 10888ac012
commit ca53b671ee
20 changed files with 612 additions and 17 deletions
+6 -3
View File
@@ -24,6 +24,8 @@ test('control uses the dataplane socket protocol', async () => {
assert.equal(devices.running, true);
const traffic = await client.observeTraffic();
assert.equal(traffic.running, true);
const domainTraffic = await client.observeDomainTraffic();
assert.equal(domainTraffic.running, true);
await client.observeDevicePolicy();
await client.applyDevicePolicies([{ id: 'dev_0011223344556677' }]);
await client.runConnectivityDiagnostics(
@@ -38,18 +40,19 @@ test('control uses the dataplane socket protocol', async () => {
'POST /apply /run/dataplane.sock',
'GET /devices /run/dataplane.sock',
'GET /device-traffic /run/dataplane.sock',
'GET /domain-traffic /run/dataplane.sock',
'GET /device-policy /run/dataplane.sock',
'PUT /device-policy /run/dataplane.sock',
'POST /diagnostics/connectivity /run/dataplane.sock',
'POST /restart /run/dataplane.sock',
'POST /stop /run/dataplane.sock',
]);
assert.deepEqual(requests[5].body, { devices: [{ id: 'dev_0011223344556677' }] });
assert.deepEqual(requests[6].body, {
assert.deepEqual(requests[6].body, { devices: [{ id: 'dev_0011223344556677' }] });
assert.deepEqual(requests[7].body, {
services: [{ id: 'custom-test', url: 'https://example.com' }],
target: 'site:custom-test',
});
assert.equal(requests[6].timeoutMs, 25_000);
assert.equal(requests[7].timeoutMs, 25_000);
});
test('connectivity diagnostics expose a retryable domain error', async () => {