Move call events to the call span
This commit is contained in:
@@ -205,13 +205,15 @@ export class OTelGroupCallMembership {
|
|||||||
const eventType = event.eventType as string;
|
const eventType = event.eventType as string;
|
||||||
if (!eventType.startsWith("m.call")) return;
|
if (!eventType.startsWith("m.call")) return;
|
||||||
|
|
||||||
|
const callTrackingInfo = this.callsByCallId.get(call.callId);
|
||||||
|
|
||||||
if (event.type === "toDevice") {
|
if (event.type === "toDevice") {
|
||||||
this.callMembershipSpan?.addEvent(
|
callTrackingInfo.span.addEvent(
|
||||||
`matrix.sendToDeviceEvent_${event.eventType}`,
|
`matrix.sendToDeviceEvent_${event.eventType}`,
|
||||||
flattenVoipEvent(event)
|
flattenVoipEvent(event)
|
||||||
);
|
);
|
||||||
} else if (event.type === "sendEvent") {
|
} else if (event.type === "sendEvent") {
|
||||||
this.callMembershipSpan?.addEvent(
|
callTrackingInfo.span.addEvent(
|
||||||
`matrix.sendToRoomEvent_${event.eventType}`,
|
`matrix.sendToRoomEvent_${event.eventType}`,
|
||||||
flattenVoipEvent(event)
|
flattenVoipEvent(event)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user