Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Properly handle metrics aggregation with room data #224

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Oct 14, 2024

  • Join a room
  • Requets the metrics endpoint

Before

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at file:///app/websocket_server/SystemMonitor.js:36:78
    at Array.reduce (<anonymous>)
    at SystemMonitor.getRoomStats (file:///app/websocket_server/SystemMonitor.js:36:43)
    at SystemMonitor.getSystemOverview (file:///app/websocket_server/SystemMonitor.js:16:20)
    at PrometheusDataManager.updateMetrics (file:///app/websocket_server/PrometheusDataManager.js:37:39)
    at AppManager.metricsHandler (file:///app/websocket_server/AppManager.js:36:23)
    at Layer.handleRequest (/app/node_modules/router/lib/layer.js:145:17)
    at next (/app/node_modules/router/lib/route.js:159:13)
    at Route.dispatch (/app/node_modules/router/lib/route.js:119:3)

After

No more error

Follow up

  • Cleanup storage manager to properly prefix rooms as now also other data is stored (token/socket data)

@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Oct 14, 2024
@juliusknorr juliusknorr added this to the 1.0.4 milestone Oct 14, 2024
@grnd-alt grnd-alt merged commit beb1b08 into main Oct 14, 2024
26 checks passed
@grnd-alt grnd-alt deleted the fix/metrics-with-rooms branch October 14, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants