From eff8847586fbe617f6a1b4d30033aaf2f22cb675 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:59:42 +0200 Subject: [PATCH] add splitbrain params to MediaReceived event (#1089) Signed-off-by: Timo K --- src/analytics/PosthogSpanProcessor.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/analytics/PosthogSpanProcessor.ts b/src/analytics/PosthogSpanProcessor.ts index 1edb5a2..effa643 100644 --- a/src/analytics/PosthogSpanProcessor.ts +++ b/src/analytics/PosthogSpanProcessor.ts @@ -126,6 +126,11 @@ export class PosthogSpanProcessor implements SpanProcessor { const maxPacketLoss = `${attributes["matrix.stats.summary.maxPacketLoss"]}`; const peerConnections = `${attributes["matrix.stats.summary.peerConnections"]}`; const percentageConcealedAudio = `${attributes["matrix.stats.summary.percentageConcealedAudio"]}`; + const opponentUsersInCall = `${attributes["matrix.stats.summary.opponentUsersInCall"]}`; + const opponentDevicesInCall = `${attributes["matrix.stats.summary.opponentDevicesInCall"]}`; + const diffDevicesToPeerConnections = `${attributes["matrix.stats.summary.diffDevicesToPeerConnections"]}`; + const ratioPeerConnectionToDevices = `${attributes["matrix.stats.summary.ratioPeerConnectionToDevices"]}`; + PosthogAnalytics.instance.trackEvent( { eventName: "MediaReceived", @@ -137,6 +142,10 @@ export class PosthogSpanProcessor implements SpanProcessor { maxPacketLoss: maxPacketLoss, peerConnections: peerConnections, percentageConcealedAudio: percentageConcealedAudio, + opponentUsersInCall: opponentUsersInCall, + opponentDevicesInCall: opponentDevicesInCall, + diffDevicesToPeerConnections: diffDevicesToPeerConnections, + ratioPeerConnectionToDevices: ratioPeerConnectionToDevices, }, // Send instantly because the window might be closing { send_instantly: true }