Merge pull request #1024 from vector-im/dbkr/otel_detect_call_changed
End spans when calls are replaced by a different call
This commit is contained in:
		
				commit
				
					
						4ddf9ce29c
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -210,7 +210,12 @@ export class OTelGroupCallMembership {
 | 
			
		|||
 | 
			
		||||
    for (const callTrackingInfo of this.callsByCallId.values()) {
 | 
			
		||||
      const userCalls = calls.get(callTrackingInfo.userId);
 | 
			
		||||
      if (!userCalls || !userCalls.has(callTrackingInfo.deviceId)) {
 | 
			
		||||
      if (
 | 
			
		||||
        !userCalls ||
 | 
			
		||||
        !userCalls.has(callTrackingInfo.deviceId) ||
 | 
			
		||||
        userCalls.get(callTrackingInfo.deviceId).callId !==
 | 
			
		||||
          callTrackingInfo.call.callId
 | 
			
		||||
      ) {
 | 
			
		||||
        callTrackingInfo.span.end();
 | 
			
		||||
        this.callsByCallId.delete(callTrackingInfo.call.callId);
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue