From f0f2ffe9726a01f85db816ec32e4579f8bf7d981 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Sun, 14 May 2023 16:36:41 +0200 Subject: [PATCH] add audio concealment to posthog exporter (#1042) * add audio concealment to posthog exporter --- src/analytics/PosthogSpanProcessor.ts | 2 ++ src/otel/otel.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/analytics/PosthogSpanProcessor.ts b/src/analytics/PosthogSpanProcessor.ts index e9e287a2..8f883391 100644 --- a/src/analytics/PosthogSpanProcessor.ts +++ b/src/analytics/PosthogSpanProcessor.ts @@ -124,6 +124,7 @@ export class PosthogSpanProcessor implements SpanProcessor { const audioReceived = `${attributes["matrix.stats.summary.percentageReceivedAudioMedia"]}`; const maxJitter = `${attributes["matrix.stats.summary.maxJitter"]}`; const maxPacketLoss = `${attributes["matrix.stats.summary.maxPacketLoss"]}`; + const percentageConcealedAudio = `${attributes["matrix.stats.summary.percentageConcealedAudio"]}`; PosthogAnalytics.instance.trackEvent( { eventName: "MediaReceived", @@ -133,6 +134,7 @@ export class PosthogSpanProcessor implements SpanProcessor { videoReceived: videoReceived, maxJitter: maxJitter, maxPacketLoss: maxPacketLoss, + percentageConcealedAudio: percentageConcealedAudio, }, // Send instantly because the window might be closing { send_instantly: true } diff --git a/src/otel/otel.ts b/src/otel/otel.ts index e30e84a0..8fc80805 100644 --- a/src/otel/otel.ts +++ b/src/otel/otel.ts @@ -42,7 +42,7 @@ export class ElementCallOpenTelemetry { const config = Config.get(); // we always enable opentelemetry in general. We only enable the OTLP // collector if a URL is defined (and in future if another setting is defined) - // The posthog exporter is always enabled, posthog reporting is enabled or disabled + // Posthog reporting is enabled or disabled // within the posthog code. const shouldEnableOtlp = Boolean(config.opentelemetry?.collector_url);