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

Client report #385

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions livekit/livekit_analytics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion livekit/livekit_analytics_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit/livekit_egress.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit/livekit_ingress.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit/livekit_internal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2,369 changes: 1,864 additions & 505 deletions livekit/livekit_models.pb.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions livekit/livekit_room.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit/livekit_rtc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit/livekit_webhook.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 111 additions & 0 deletions livekit_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ message ClientInfo {
string address = 9;
// wifi, wired, cellular, vpn, empty if not known
string network = 10;
int32 concurrency = 11;
}

// server provided client configuration
Expand Down Expand Up @@ -391,8 +392,118 @@ enum ReconnectReason {
RR_SWITCH_CANDIDATE = 4;
}

enum SubscriptionStatus {
Unsubscribed = 0;
Desired = 1;
Subscribed = 2;
}

enum SubscriptionError {
SE_UNKNOWN = 0;
SE_CODEC_UNSUPPORTED = 1;
SE_TRACK_NOTFOUND = 2;
}

message ClientReport {
lukasIO marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

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?

Copy link
Contributor Author

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 {
davidzhao marked this conversation as resolved.
Show resolved Hide resolved
// ice-candidate-pair
uint32 available_outgoing_bitrate = 1;
Copy link
Member

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

Copy link
Contributor Author

@lukasIO lukasIO Aug 7, 2023

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?

// local-candidate
string network_type = 2;
// outbound-rtp
uint32 nack_count = 3;
uint64 timestamp = 4;
string stream_id = 5;
}

message RTCAudioSenderStats {
RTCSenderStats common_stats = 1;
// media-source
double total_audio_energy = 2;
double total_samples_duration = 3;
}

message RTCVideoSenderStats {
RTCSenderStats common_stats = 1;
// outbound-rtp
map<string, uint32> quality_limitation_durations = 2;
Copy link
Member

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.

Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

string quality_limitation_reason = 3;
uint32 quality_limitation_resolution_changes = 4;
string scalability_mode = 5;
uint32 frames_per_second = 6;
uint64 frames_sent = 7;
uint32 huge_frames_sent = 8;
string encoder_implementation = 9;
bool power_efficient_encoder = 10;
}

message RTCReceiverStats {
// inbound-rtp
double last_packet_received_timestamp = 1;
double jitter = 2;
int64 packets_lost = 3;
uint64 timestamp = 4;
string stream_id = 5;
}

message RTCVideoReceiverStats {
RTCReceiverStats common_stats = 1;

// inbound-rtp
uint32 pli_count = 2;
uint32 sli_count = 3;
uint32 frames_decoded = 4;
uint32 frames_dropped = 5;
double total_decode_time = 6;
uint32 pause_count = 7;
double total_pauses_duration = 8;
uint32 freeze_count = 9;
double total_freezes_duration = 10;
uint32 fir_count = 11;
string decoder_implementation = 12;
bool power_efficient_decoder = 13;
}

message RTCAudioReceiverStats {
RTCReceiverStats common_stats = 1;
uint64 total_samples_received = 2;
uint64 concealed_samples = 3;
}

message AudioPublicationReport {
string sid = 1;
RTCAudioSenderStats rtc_stats = 2;
int32 ready_state = 3;
bool muted = 4;
}

message VideoPublicationReport {
string sid = 1;
RTCVideoSenderStats rtc_stats = 2;
int32 ready_state = 3;
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we don't expect it to be ended, but it might be good debugging insight to know that for sure?
  2. not sure why I wanted to include this in the first place, I guess we can drop it for v1 at least
  3. it's looking at our mute property.

bool muted = 4;
}

message AudioSubscriptionReport {
string sid = 1;
RTCAudioReceiverStats rtc_stats = 2;
int32 ready_state = 3;
SubscriptionStatus subscription_status = 4;
bool allowed = 5;
}

message VideoSubscriptionReport {
string sid = 1;
RTCVideoReceiverStats rtc_stats = 2;
int32 ready_state = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above

SubscriptionStatus subscription_status = 4;
bool allowed = 5;
}

repeated AudioPublicationReport audioPublications = 1;
repeated VideoPublicationReport videoPublications = 2;
repeated AudioSubscriptionReport audioSubscriptions = 3;
repeated VideoSubscriptionReport videoSubscriptions = 4;

}
16 changes: 15 additions & 1 deletion rpc/egress.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading