Separate calls to Telemetry vs Prometheus room lifecycle (#935)

* Separate calls to Telemetry vs Prometheus room lifecycle

* remove unused import
This commit is contained in:
David Zhao
2022-08-20 20:22:16 -07:00
committed by GitHub
parent 26ba69c506
commit b8bda3f14b
2 changed files with 6 additions and 7 deletions
@@ -15,8 +15,6 @@ import (
)
func (t *telemetryServiceInternal) RoomStarted(ctx context.Context, room *livekit.Room) {
prometheus.RoomStarted()
t.notifyEvent(ctx, &livekit.WebhookEvent{
Event: webhook.EventRoomStarted,
Room: room,
@@ -30,8 +28,6 @@ func (t *telemetryServiceInternal) RoomStarted(ctx context.Context, room *liveki
}
func (t *telemetryServiceInternal) RoomEnded(ctx context.Context, room *livekit.Room) {
prometheus.RoomEnded(time.Unix(room.CreationTime, 0))
t.notifyEvent(ctx, &livekit.WebhookEvent{
Event: webhook.EventRoomFinished,
Room: room,
@@ -53,6 +49,7 @@ func (t *telemetryServiceInternal) ParticipantJoined(
clientMeta *livekit.AnalyticsClientMeta,
) {
prometheus.IncrementParticipantJoin(1)
prometheus.AddParticipant()
newWorker := newStatsWorker(
ctx,
@@ -81,8 +78,6 @@ func (t *telemetryServiceInternal) ParticipantJoined(
}
t.workersMu.Unlock()
prometheus.AddParticipant()
t.analytics.SendEvent(ctx, &livekit.AnalyticsEvent{
Type: livekit.AnalyticsEventType_PARTICIPANT_JOINED,
Timestamp: timestamppb.Now(),