-
Notifications
You must be signed in to change notification settings - Fork 66
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
Client report #385
base: main
Are you sure you want to change the base?
Client report #385
Conversation
…o lukas/client-report
…o lukas/client-report
…o lukas/client-report
livekit_models.proto
Outdated
|
||
message RTCSenderStats { | ||
// none, cpu, bandwidth, or other | ||
string qualityLimitationReason = 1; |
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 think quality limitation might be more useful to keep track as events.. since there's a clear start & finish point (and a clear cause). The webrtc-internals display is only reflecting current state, so sending it as a stat would require us to send the entire payload whenever that field is detected to have changed.
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.
we have qualitylimitationDurations
directly from the stats, without dedicated events and only reading from stats, I guess that's the best we can do for now. We'll have the current limitation reason regularly whenever we send a report.
livekit_models.proto
Outdated
} | ||
|
||
message RTCReceiverStats { | ||
int32 jitter = 1; |
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.
is this looking at total jitter?
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 was meant as a snapshot. but maybe makes sense to sample multiple values over time until the next report gets sent out?
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's total jitter as defined here
livekit_models.proto
Outdated
} | ||
|
||
message DeviceInfo { | ||
string ua = 1; |
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.
ua is already captured by the server during the initial session establishment (even though we only store a parsed version of it). since concurrency is unlikely to change, could that also be passed up at the same time?
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.
makes sense.
thinking more about this, it seems to me like DeviceInfo
would also conceptually be a one-off message as it won't change over time. Even if we include other properties here, those will be hardware bound, so adding them one time when connection establishes probably makes the most sense.
Do you agree to remove this entirely from here and rather add concurrency
to the already existing ClientInfo
?
…o lukas/client-report
livekit_models.proto
Outdated
|
||
message RTCAudioReceiverStats { | ||
RTCReceiverStats common_stats = 1; | ||
uint32 concealed_samples = 2; |
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 think we'll also need total_samples
for concealed samples to be useful.
message RTCVideoSenderStats { | ||
RTCSenderStats common_stats = 1; | ||
// outbound-rtp | ||
map<string, uint32> quality_limitation_durations = 2; |
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'm not sure if webrtc-internals tracks this differently between layers. for some reasons I remember the duration being the same across layers.
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.
Is RTCVideoSenderStats
per track? or per simulcast layer?
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's per sender, which should be equivalent to per track.
I think you're right, that it will not track different layers, but how would we do that in the first place?
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.
Regarding the type, it's a map that includes reason
and duration
and not different layers.
livekit_models.proto
Outdated
// local-candidate | ||
string networkType = 3; | ||
// outbound-rtp | ||
uint64 packetsSent = 4; |
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 suggest snake_case
for field names.
though I'm not sure if network level stats would be helpful, since we do get these on the server side. For v1, let's start with minimal stats?
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.
missed snake case here. Will remove packets_sent
entirely then.
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 you also want to exclude nack_count
for now as we see that on the server, too?
enum SubscriptionError { | ||
SE_UNKNOWN = 0; | ||
SE_CODEC_UNSUPPORTED = 1; | ||
SE_TRACK_NOTFOUND = 2; | ||
} | ||
|
||
message ClientReport { |
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.
perhaps we should move this outside of livekit_models? since it's used by a very specific request.. maybe into RoomService?
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.
will move it to RoomService as a last step, so that keeping track of the discussions is easier until then
|
||
message RTCSenderStats { | ||
// ice-candidate-pair | ||
uint32 available_outgoing_bitrate = 1; |
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.
this seems like at the transport layer, and doesn't fit too well within each sender
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.
makes sense, is your suggestion to leave it out entirely or to move it to a higher level, that's not sender related?
livekit_models.proto
Outdated
string quality_limitation_reason = 3; | ||
uint32 quality_limitation_resolution_changes = 4; | ||
string scalability_mode = 5; | ||
uint32 frame_height = 6; |
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.
which layer would dimension stats be referencing? I think we also already have these pieces of data on the server side.
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.
the original dimension. Makes sense to omit them, if we have them already.
message VideoPublicationReport { | ||
string sid = 1; | ||
RTCVideoSenderStats rtc_stats = 2; | ||
int32 ready_state = 3; |
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.
trying to understand these a bit:
- ready_state - I think this is just live or ended. do we expect to be ended?
- label - this seems a better fit as an event, since we do not expect this to change?
- muted - is this tracking MediaStreamTrack.muted property ? i.e. has data, or is it looking at our mute property? would be good to use a diff name here if it's former.
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.
- we don't expect it to be
ended
, but it might be good debugging insight to know that for sure? - not sure why I wanted to include this in the first place, I guess we can drop it for v1 at least
- it's looking at our
mute
property.
livekit_models.proto
Outdated
int32 ready_state = 3; | ||
SubscriptionStatus subscription_status = 4; | ||
bool allowed = 5; | ||
uint32 width = 6; |
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 think this should move into RTCVideoReceiverStats
? since the width and height of receiver can change dynamically.
though I'm also not sure what value it is to keep this on the client.. since the server knows exactly what width/height is sent down
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.
you're right, we would have dimension in RTC stats as well. Seems like leaving them out is the way to go!
message VideoSubscriptionReport { | ||
string sid = 1; | ||
RTCVideoReceiverStats rtc_stats = 2; | ||
int32 ready_state = 3; |
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.
same question as above
livekit_models.proto
Outdated
uint32 packetsLost = 5; | ||
uint32 nack_count = 6; | ||
uint32 retransmitted_packets_sent = 7; | ||
uint64 timestamp = 8; |
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.
which timestamp is this referencing? I only noticed it in the sender stats.. do we need a similar timestamp in the receiver side too? maybe this should be moved into the *Report
message itself?
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.
timestamp
is referring to
A DOMHighResTimeStamp object indicating the time at which the sample was taken for this statistics object.
For receiver stats I included last_packet_received_timestamp
, but probably makes sense to add the processing timestamp, too!
No description provided.