-
Notifications
You must be signed in to change notification settings - Fork 17
Adding frontend metrics #46
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
base: main
Are you sure you want to change the base?
Conversation
…serving. Updated application to remove console printing. Added dockerignore to ignore build paths. Updated docker compose to point to pushed images. Updated grafana dashboard to be more relevant to sps metrics being reported.
… the .env file can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor feedback about restructuring and providing some more info here and there.
Some additional changes to the PR description so it can stand on its own without you needing to explain it when you are busy on other tasks, can I ask you add the following to the PR description:
- Problem statement more detailed (bringing over parts of the spec description)
- Create a diagram in PR description that describes the components of the final system and how they interplay (basically an architecture diagram).
- Given a brief explanation of how stats are stored and how they are labelled per application/session.
- Limitations and next steps, e.g. what can it not do? Also what would have to happen to land it as part of SPS (e.g. SPSFramework would have to stand up components X, Y, Z and expose and stable endpoint to push to).
- How to run what is here today using the docker compose and the steps to see stats show up in the dashboard
- Screenshot of the final result
library/src/SPSApplication.ts
Outdated
const sessionId: string = uuidv4(); | ||
|
||
// register end of session event | ||
window.addEventListener('beforeunload', () => this.endSession(sessionId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this capture the stats if the UE side or the SS side terminates? E.g. Websocket disconnect case? If not can you try to capture the case where the session ends but the browser has not navigated away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might as simple as something like
this.stream.addEventListener('webRtcDisconnected', () => this.endSession(sessionId) );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, can we add a special stat to track websocket disconnect (or better yet, to track session end reason)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that's similar to something I've been thinking about today. Things like loading time, user agent and this aren't reported currently because they're not ongoing gauge metrics like bit rate etc. They're more like events. Well this disconnect event is, but user agent and loading time are one time metrics. I'm not sure how they should be handled.
I know the buccaneer setup uses loki for event like stats that show up as annotations on the grafana graphs.. but is that how we want to handle each of these stats? As events?
library/src/MetricsReporter.ts
Outdated
enum StatOperation { | ||
Reset = 1, | ||
Add, | ||
Average |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good have stat operations for min, max, stddev too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking of bitrate for example where we would be interested in knowing not just the average but the best/worst and spread too.
…loki in an attempt to make graphing easier. I don't think it helped.
Relevant components:
Problem statement:
Lack of metrics
Solution
Adds a bunch of metrics that are collected over a session and posts them to Buccaneer, a push gateway for Prometheus to scrape and store for Grafana to visualise.
Documentation
Test Plan and Compatibility