End spans when calls are replaced by a different call
This commit is contained in:
		
					parent
					
						
							
								060a50d27a
							
						
					
				
			
			
				commit
				
					
						32476571fb
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -210,7 +210,12 @@ export class OTelGroupCallMembership {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (const callTrackingInfo of this.callsByCallId.values()) {
 | 
					    for (const callTrackingInfo of this.callsByCallId.values()) {
 | 
				
			||||||
      const userCalls = calls.get(callTrackingInfo.userId);
 | 
					      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();
 | 
					        callTrackingInfo.span.end();
 | 
				
			||||||
        this.callsByCallId.delete(callTrackingInfo.call.callId);
 | 
					        this.callsByCallId.delete(callTrackingInfo.call.callId);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue