Merge pull request #981 from vector-im/dbkr/call_events_to_call_span
Move call events to the call span
This commit is contained in:
commit
28196a2e9d
1 changed files with 8 additions and 2 deletions
|
@ -209,13 +209,19 @@ export class OTelGroupCallMembership {
|
|||
const eventType = event.eventType as string;
|
||||
if (!eventType.startsWith("m.call")) return;
|
||||
|
||||
const callTrackingInfo = this.callsByCallId.get(call.callId);
|
||||
if (!callTrackingInfo) {
|
||||
logger.error(`Got call send event for unknown call ID ${call.callId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
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)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue