diff --git a/.changeset/stale-windows-remember.md b/.changeset/stale-windows-remember.md new file mode 100644 index 000000000..9716bb7d9 --- /dev/null +++ b/.changeset/stale-windows-remember.md @@ -0,0 +1,5 @@ +--- +"github.com/livekit/protocol": patch +--- + +Include analytics event ids diff --git a/livekit/livekit_analytics.pb.go b/livekit/livekit_analytics.pb.go index 335d9dcc2..46f484287 100644 --- a/livekit/livekit_analytics.pb.go +++ b/livekit/livekit_analytics.pb.go @@ -456,6 +456,8 @@ type AnalyticsStat struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // unique id for this stat + Id string `protobuf:"bytes,14,opt,name=id,proto3" json:"id,omitempty"` AnalyticsKey string `protobuf:"bytes,1,opt,name=analytics_key,json=analyticsKey,proto3" json:"analytics_key,omitempty"` Kind StreamType `protobuf:"varint,2,opt,name=kind,proto3,enum=livekit.StreamType" json:"kind,omitempty"` TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` @@ -503,6 +505,13 @@ func (*AnalyticsStat) Descriptor() ([]byte, []int) { return file_livekit_analytics_proto_rawDescGZIP(), []int{2} } +func (x *AnalyticsStat) GetId() string { + if x != nil { + return x.Id + } + return "" +} + func (x *AnalyticsStat) GetAnalyticsKey() string { if x != nil { return x.AnalyticsKey @@ -758,6 +767,8 @@ type AnalyticsEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // unique id for this event + Id string `protobuf:"bytes,25,opt,name=id,proto3" json:"id,omitempty"` Type AnalyticsEventType `protobuf:"varint,1,opt,name=type,proto3,enum=livekit.AnalyticsEventType" json:"type,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` RoomId string `protobuf:"bytes,3,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` @@ -814,6 +825,13 @@ func (*AnalyticsEvent) Descriptor() ([]byte, []int) { return file_livekit_analytics_proto_rawDescGZIP(), []int{5} } +func (x *AnalyticsEvent) GetId() string { + if x != nil { + return x.Id + } + return "" +} + func (x *AnalyticsEvent) GetType() AnalyticsEventType { if x != nil { return x.Type @@ -1302,8 +1320,9 @@ var file_livekit_analytics_proto_rawDesc = []byte{ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, - 0xc2, 0x03, 0x0a, 0x0d, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x5f, 0x6b, + 0xd2, 0x03, 0x0a, 0x0d, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, @@ -1358,8 +1377,9 @@ var file_livekit_analytics_proto_rawDesc = []byte{ 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x69, 0x73, 0x70, 0x41, 0x73, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x65, 0x6f, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x69, 0x73, 0x70, 0x5f, 0x61, 0x73, 0x6e, 0x22, 0xb6, 0x07, 0x0a, 0x0e, 0x41, 0x6e, - 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x04, + 0x08, 0x5f, 0x69, 0x73, 0x70, 0x5f, 0x61, 0x73, 0x6e, 0x22, 0xc6, 0x07, 0x0a, 0x0e, 0x41, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, diff --git a/protobufs/livekit_analytics.proto b/protobufs/livekit_analytics.proto index 5f8e97bd0..62b67203e 100644 --- a/protobufs/livekit_analytics.proto +++ b/protobufs/livekit_analytics.proto @@ -57,6 +57,8 @@ message AnalyticsStream { } message AnalyticsStat { + // unique id for this stat + string id = 14; string analytics_key = 1; StreamType kind = 2; google.protobuf.Timestamp time_stamp = 3; @@ -70,6 +72,8 @@ message AnalyticsStat { string mime = 11; float min_score = 12; float median_score = 13; + + // NEXT_ID: 15 } message AnalyticsStats { @@ -123,6 +127,8 @@ message AnalyticsClientMeta { } message AnalyticsEvent { + // unique id for this event + string id = 25; AnalyticsEventType type = 1; google.protobuf.Timestamp timestamp = 2; string room_id = 3; @@ -146,7 +152,7 @@ message AnalyticsEvent { int32 video_layer = 22; string node_id = 24; - // NEXT_ID: 25 + // NEXT_ID: 26 } message AnalyticsEvents {