Send data stats when using event handlers #3126
Merged
+60
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was made aware that, when using event handlers, we send stats for all medium instances except the one used for data channels, so only audio and video. Considering we do expose info on received/sent DTLS data (in terms of packets and bytes) in the Admin API, I thought I'd use that to send stats for the datachannel medium instance too, when available. Of course, considering there's no RTCP involved, the event is much more barebones:
That said, it should still be useful for monitoring purposes. It's worth pointing out that, if you have an event handler recipient, and you're doing validation on received payloads, you should now be prepared to receive events with type
32
that have less info, since we're not using it for audio and video alone.Planning to merge soon: when that happens, I'll update
0.x
with the same fix too.