docs: simplify Docker commands in README and enhance logging in WebRTC stats exporter
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s

This commit is contained in:
2025-02-13 16:41:09 +01:00
parent 752cea15d4
commit d4f1048e6f
3 changed files with 12 additions and 8 deletions

View File

@@ -48,13 +48,11 @@ ufw allow 27107/tcp
4. Start the Docker containers:
```sh
docker compose up \
--pull always \
--abort-on-container-exit
docker compose up --abort-on-container-exit
```
or in detached mode:
```sh
docker compose up --pull always -d
docker compose up -d
```
The collector will start gathering WebRTC stats from the Selenium container and sending them to the Telegraf service.

View File

@@ -14,6 +14,7 @@ services:
interval: 5s
timeout: 10s
retries: 5
pull_policy: always
network_mode: host
telegraf:
@@ -30,6 +31,7 @@ services:
interval: 5s
timeout: 10s
retries: 5
pull_policy: always
networks:
- backend
@@ -50,6 +52,7 @@ services:
- "9092:9092"
extra_hosts:
- "host.docker.internal:host-gateway"
pull_policy: always
networks:
- backend

View File

@@ -92,10 +92,12 @@ class WebrtcInternalExporter {
window.postMessage(
{
event: "webrtc-internal-exporter:peer-connection-stats",
stats
stats: [stats]
},
stats
[stats]
);
log(`Single stat collected:`, [stats]);
}
async collectAllStats() {
@@ -112,11 +114,12 @@ class WebrtcInternalExporter {
window.postMessage(
{
event: "webrtc-internal-exporter:peer-connections-stats",
data: JSON.parse(JSON.stringify(stats)),
data: stats
},
stats
);
log(`Stats collected:`, JSON.parse(JSON.stringify(stats)));
log(`Stats collected:`, stats);
setTimeout(this.collectAllStats.bind(this), this.updateInterval);
return stats;