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

Observability: OpenTelemetry #172

Open
tsloughter opened this issue Oct 24, 2024 · 1 comment
Open

Observability: OpenTelemetry #172

tsloughter opened this issue Oct 24, 2024 · 1 comment

Comments

@tsloughter
Copy link

Hello! I was looking at https://elixir-webrtc.org/ again thanks to the streams that were going on and noticed the Observability feature link to a video about Phoenix Dashboards -- great to have (I want Otel Phoenix Dashboards :), but a limited observability solution). It had me think to check if the OpenTelemetry project (https://opentelemetry.io/) -- a vendor agnostic solution to instrumenting and exporting telemetry data conforming to a standard -- had any semantic conventions (standardized names and attributes for telemetry so the data can be understood) for WebRTC -- https://github.com/open-telemetry/semantic-conventions. The only thing I could find is this old issue, open-telemetry/opentelemetry-js-contrib#1216, that went no where.

This had me think it would be awesome if it was Elixir's WebRTC that pushed a standardization forward :).

I know next to nothing about WebRTC but a quick search it seemed there was standard metric names for some parts but that is it?

Note, we have telemetry integration, so this isn't to say, "you should use our libraries". A user could already hook OpenTelemetry into telemetry events from ex_webrtc. But these metrics and events will be different between webrtc implementations and not allow users and vendors to define reusable dashboards and alerts.

@mickel8
Copy link
Member

mickel8 commented Oct 24, 2024

Hi @tsloughter,

The main class in WebRTC is RTCPeerConnection and it exposes getStats. This functions returns a report with statistics about each audio and video track e.g. bitrate, retransmissions, packets sent, packets received, codec etc. The exact form of a report is standardized by W3C, e.g. statistics for a track that is sent to the other side has the follwoing form: https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats

The nature of WebRTC is that tracks can be added and removed in time, and in most cases you want to call getStats every X seconds (e.g. every second) to observer the bitrate, packet loss etc.

I don't know how this plays with OpenTelemetry. AFAIK, OpenTelemetry is more about some generic events e.g. track added, track removed, or about tracking function calls. In general, OpenTelemetry sounds to me like something pretty generic, and because of that, it's also pretty hard to me to understand it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants