Move call events to the call span

This commit is contained in:
David Baker 2023-03-30 13:51:12 +01:00
parent e870188be3
commit 277081ee2a

View File

@ -205,13 +205,15 @@ export class OTelGroupCallMembership {
const eventType = event.eventType as string;
if (!eventType.startsWith("m.call")) return;
const callTrackingInfo = this.callsByCallId.get(call.callId);
if (event.type === "toDevice") {
this.callMembershipSpan?.addEvent(
callTrackingInfo.span.addEvent(
`matrix.sendToDeviceEvent_${event.eventType}`,
flattenVoipEvent(event)
);
} else if (event.type === "sendEvent") {
this.callMembershipSpan?.addEvent(
callTrackingInfo.span.addEvent(
`matrix.sendToRoomEvent_${event.eventType}`,
flattenVoipEvent(event)
);