-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathlivekit_analytics.proto
More file actions
311 lines (284 loc) · 8.89 KB
/
Copy pathlivekit_analytics.proto
File metadata and controls
311 lines (284 loc) · 8.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
// Copyright 2023 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package livekit;
import "google/protobuf/timestamp.proto";
import "livekit_egress.proto";
import "livekit_ingress.proto";
import "livekit_models.proto";
import "livekit_room.proto";
import "livekit_sip.proto";
import "logger/options.proto";
option csharp_namespace = "LiveKit.Proto";
option go_package = "github.com/livekit/protocol/livekit";
option ruby_package = "LiveKit::Proto";
enum StreamType {
UPSTREAM = 0;
DOWNSTREAM = 1;
}
message AnalyticsVideoLayer {
int32 layer = 1;
uint32 packets = 2;
uint64 bytes = 3;
uint32 frames = 4;
}
message AnalyticsStream {
uint32 ssrc = 1;
uint32 primary_packets = 2;
uint64 primary_bytes = 3;
uint32 retransmit_packets = 4;
uint64 retransmit_bytes = 5;
uint32 padding_packets = 6;
uint64 padding_bytes = 7;
uint32 packets_lost = 8;
uint32 frames = 9;
uint32 rtt = 10;
uint32 jitter = 11;
uint32 nacks = 12;
uint32 plis = 13;
uint32 firs = 14;
repeated AnalyticsVideoLayer video_layers = 15;
google.protobuf.Timestamp start_time = 17;
google.protobuf.Timestamp end_time = 18;
uint32 packets_out_of_order = 19;
}
message AnalyticsStat {
// unique id for this stat
string id = 14;
string analytics_key = 1;
StreamType kind = 2;
google.protobuf.Timestamp time_stamp = 3;
string node = 4;
string room_id = 5 [(logger.name) = "roomID"];
string room_name = 6;
string participant_id = 7 [(logger.name) = "participantID"];
string track_id = 8 [(logger.name) = "trackID"];
float score = 9; // average score
repeated AnalyticsStream streams = 10;
string mime = 11;
float min_score = 12;
float median_score = 13;
// NEXT_ID: 15
}
message AnalyticsStats {
repeated AnalyticsStat stats = 1;
}
enum AnalyticsEventType {
ROOM_CREATED = 0;
ROOM_ENDED = 1;
PARTICIPANT_JOINED = 2;
PARTICIPANT_LEFT = 3;
PARTICIPANT_CONNECTION_ABORTED = 45;
TRACK_PUBLISHED = 4;
TRACK_PUBLISH_REQUESTED = 20;
TRACK_UNPUBLISHED = 5;
TRACK_SUBSCRIBED = 6;
TRACK_SUBSCRIBE_REQUESTED = 21;
TRACK_SUBSCRIBE_FAILED = 25;
TRACK_UNSUBSCRIBED = 7;
TRACK_PUBLISHED_UPDATE = 10;
TRACK_MUTED = 23;
TRACK_UNMUTED = 24;
TRACK_PUBLISH_STATS = 26;
TRACK_SUBSCRIBE_STATS = 27;
PARTICIPANT_ACTIVE = 11;
PARTICIPANT_RESUMED = 22;
EGRESS_STARTED = 12;
EGRESS_ENDED = 13;
EGRESS_UPDATED = 28;
TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY = 14;
RECONNECTED = 15;
INGRESS_CREATED = 18;
INGRESS_DELETED = 19;
INGRESS_STARTED = 16;
INGRESS_ENDED = 17;
INGRESS_UPDATED = 29;
SIP_INBOUND_TRUNK_CREATED = 30;
SIP_INBOUND_TRUNK_DELETED = 31;
SIP_OUTBOUND_TRUNK_CREATED = 32;
SIP_OUTBOUND_TRUNK_DELETED = 33;
SIP_DISPATCH_RULE_CREATED = 34;
SIP_DISPATCH_RULE_DELETED = 35;
SIP_PARTICIPANT_CREATED = 36;
SIP_CALL_INCOMING = 37;
SIP_CALL_STARTED = 38;
SIP_CALL_ENDED = 39;
SIP_TRANSFER_REQUESTED = 43;
SIP_TRANSFER_COMPLETE = 44;
SIP_CALL_UPDATE = 46;
REPORT = 40;
API_CALL = 41;
WEBHOOK = 42;
// NEXT_ID: 47
}
message AnalyticsClientMeta {
string region = 1;
string node = 2;
string client_addr = 3;
uint32 client_connect_time = 4;
// udp, tcp, turn
string connection_type = 5;
ReconnectReason reconnect_reason = 6;
optional string geo_hash = 7;
optional string country = 8;
optional uint32 isp_asn = 9;
}
message AnalyticsEvent {
// unique id for this event
string id = 25;
AnalyticsEventType type = 1;
google.protobuf.Timestamp timestamp = 2;
string room_id = 3 [(logger.name) = "roomID"];
Room room = 4;
string participant_id = 5 [(logger.name) = "participantID"];
ParticipantInfo participant = 6;
string track_id = 7 [(logger.name) = "trackID"];
TrackInfo track = 8;
string analytics_key = 10;
ClientInfo client_info = 11;
AnalyticsClientMeta client_meta = 12;
string egress_id = 13 [(logger.name) = "egressID"];
string ingress_id = 19 [(logger.name) = "ingressID"];
VideoQuality max_subscribed_video_quality = 14;
ParticipantInfo publisher = 15;
string mime = 16;
EgressInfo egress = 17;
IngressInfo ingress = 18;
string error = 20;
RTPStats rtp_stats = 21;
int32 video_layer = 22;
string node_id = 24 [(logger.name) = "nodeID"];
string sip_call_id = 26 [(logger.name) = "sipCallID"];
SIPCallInfo sip_call = 27;
string sip_trunk_id = 28 [(logger.name) = "sipTrunkID"];
SIPInboundTrunkInfo sip_inbound_trunk = 29;
SIPOutboundTrunkInfo sip_outbound_trunk = 30;
string sip_dispatch_rule_id = 31 [(logger.name) = "sipDispatchRuleID"];
SIPDispatchRuleInfo sip_dispatch_rule = 32;
SIPTransferInfo sip_transfer = 36;
ReportInfo report = 33;
APICallInfo api_call = 34;
WebhookInfo webhook = 35;
// NEXT_ID: 37
}
message AnalyticsEvents {
repeated AnalyticsEvent events = 1;
}
message AnalyticsRoomParticipant {
string id = 1;
string identity = 2;
string name = 3;
ParticipantInfo.State state = 4;
google.protobuf.Timestamp joined_at = 5;
}
message AnalyticsRoom {
string id = 1;
string name = 2;
string project_id = 5 [(logger.name) = "projectID"];
google.protobuf.Timestamp created_at = 3;
repeated AnalyticsRoomParticipant participants = 4;
// NEXT_ID: 6
}
message AnalyticsNodeRooms {
string node_id = 1 [(logger.name) = "nodeID"];
uint64 sequence_number = 2;
google.protobuf.Timestamp timestamp = 3;
repeated AnalyticsRoom rooms = 4;
}
message ReportInfo {
oneof message {
FeatureUsageInfo feature_usage = 1;
}
}
message TimeRange {
google.protobuf.Timestamp started_at = 1;
google.protobuf.Timestamp ended_at = 2;
}
message FeatureUsageInfo {
enum Feature {
KRISP_NOISE_CANCELLATION = 0;
KRISP_BACKGROUND_VOICE_CANCELLATION = 1;
AIC_AUDIO_ENHANCEMENT = 2;
KRISP_VIVA = 3;
}
Feature feature = 1;
string project_id = 2 [(logger.name) = "projectID"];
string room_name = 3;
string room_id = 4 [(logger.name) = "roomID"];
string participant_identity = 5;
string participant_id = 6 [(logger.name) = "participantID"];
string track_id = 7 [(logger.name) = "trackID"];
// time ranges during which the feature was enabled.
// for e. g., noise cancellation may not be applied when a media track is paused/muted,
// this allows reporting only periods during which a feature is active.
repeated TimeRange time_ranges = 8;
// Feature specific metadata included in the report
map<string, string> feature_info = 9;
}
message APICallRequest {
oneof message {
CreateRoomRequest create_room_request = 1;
ListRoomsRequest list_rooms_request = 2;
DeleteRoomRequest delete_room_request = 3;
ListParticipantsRequest list_participants_request = 4;
RoomParticipantIdentity room_participant_identity = 5;
MuteRoomTrackRequest mute_room_track_request = 6;
UpdateParticipantRequest update_participant_request = 7;
UpdateSubscriptionsRequest update_subscriptions_request = 8;
SendDataRequest send_data_request = 9;
UpdateRoomMetadataRequest update_room_metadata_request = 10;
}
}
message APICallInfo {
string project_id = 1 [(logger.name) = "projectID"];
APICallRequest request = 2;
string service = 3;
string method = 4;
string node_id = 5 [(logger.name) = "nodeID"];
int32 status = 6;
string twirp_error_code = 7;
string twirp_error_message = 8;
string room_name = 9;
string room_id = 10 [(logger.name) = "roomID"];
string participant_identity = 11;
string participant_id = 12 [(logger.name) = "participantID"];
string track_id = 13 [(logger.name) = "trackID"];
google.protobuf.Timestamp started_at = 14;
int64 duration_ns = 15;
}
message WebhookInfo {
string event_id = 1 [(logger.name) = "eventID"];
string event = 2;
string project_id = 3 [(logger.name) = "projectID"];
string room_name = 4;
string room_id = 5 [(logger.name) = "roomID"];
string participant_identity = 6;
string participant_id = 7 [(logger.name) = "participantID"];
string track_id = 8 [(logger.name) = "trackID"];
string egress_id = 9 [(logger.name) = "egressID"];
string ingress_id = 10 [(logger.name) = "ingressID"];
google.protobuf.Timestamp created_at = 11;
google.protobuf.Timestamp queued_at = 12;
int64 queue_duration_ns = 13;
google.protobuf.Timestamp sent_at = 14;
int64 send_duration_ns = 15;
string url = 16;
int32 num_dropped = 17;
bool is_dropped = 18;
string service_status = 19;
int32 service_error_code = 20;
string service_error = 21;
string send_error = 22;
int32 http_status_code = 23; // HTTP response status code for the delivery attempt (0 if no response).
}