Conversation
Summary of ChangesHello @fcancela, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces foundational observability capabilities across the MoQ demo stack. It provides a minimal yet reviewable surface for tracking key operational metrics, such as application-level byte usage and connection types, on both the relay and client sides. The changes aim to enable basic monitoring and performance analysis of the MoQ system, setting the groundwork for future, more comprehensive telemetry without adding excessive complexity at this stage. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR introduces a minimal but effective observability layer for both the client and relay, which is a great addition. The use of OpenTelemetry on the client and a Prometheus-style endpoint on the relay are solid choices. The Rust implementation for stats collection is well-designed, using a clean trait and RAII for session tracking. The TypeScript implementation is also good, but I've found a few issues with metric correctness on the client-side that should be addressed. Specifically, there's a redundant startup time metric, and the framesDecoded and framesDropped stats are not implemented correctly. I've left detailed comments on these points. Overall, this is a strong contribution that lays a good foundation for future observability work.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…port in connection file
…or better readability
Summary
This PR adds the smallest reviewable observability surface for the MoQ demo: a reusable application-level byte accounting hook in
moq-lite, minimal relay-side counters exposed via a Prometheus-style/metricsendpoint, and minimal browser-side OTLP metrics for connection type + time-to-first-frame.What’s included
moq-lite: optionalStatssink for application payload byte accountingStatstrait andconnect_with_stats/accept_with_statsplumbingmoq-native: addsRequest::accept_with_stats(...)to pass the sink through tomoq-litemoq-relay: minimal counters +/metricsmoq_relay_active_sessions{transport="webtransport|websocket"}(gauge)moq_relay_app_bytes_sent_total{transport=...}(counter)moq_relay_app_bytes_received_total{transport=...}(counter)js/hang: metrics-only OTLP HTTP export (no tracing)moq_client_connections_total{transport=...}(counter)moq_client_startup_time_seconds{track_type="audio|video"}(histogram, time-to-first-frame from track subscription start)js/lite: adds a tinyonConnectionType(cb)callback hook so hang can recordwebtransportvswebsocketjs/hangvideo stats:framesDecodedis counted on the decoder output path; removed the unimplementedframesDroppedWhat’s intentionally out of scope
How to test (local)
You should see
moq_relay_app_bytes_*increasing while playback is active.:4318, the browser will POST metrics to:http://<collector>:4318/v1/metricsNotes for reviewers
moq-lite::Statshook is intentionally generic and non-blocking (callers can implement with atomics)./metricsuses low-cardinality labels only (transport), matching Prometheus best practices.