Address review feedback
This commit is contained in:
parent
711cdf9a60
commit
928f1c1d6f
2 changed files with 12 additions and 3 deletions
|
@ -126,6 +126,10 @@ export class OTelGroupCallMembership {
|
||||||
|
|
||||||
public onJoinCall() {
|
public onJoinCall() {
|
||||||
if (!ElementCallOpenTelemetry.instance) return;
|
if (!ElementCallOpenTelemetry.instance) return;
|
||||||
|
if (this.callMembershipSpan !== undefined) {
|
||||||
|
logger.warn("Call membership span is already started");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Create the main span that tracks the time we intend to be in the call
|
// Create the main span that tracks the time we intend to be in the call
|
||||||
this.callMembershipSpan =
|
this.callMembershipSpan =
|
||||||
|
@ -152,9 +156,14 @@ export class OTelGroupCallMembership {
|
||||||
}
|
}
|
||||||
|
|
||||||
public onLeaveCall() {
|
public onLeaveCall() {
|
||||||
this.callMembershipSpan!.addEvent("matrix.leaveCall");
|
if (this.callMembershipSpan === undefined) {
|
||||||
|
logger.warn("Call membership span is already ended");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.callMembershipSpan.addEvent("matrix.leaveCall");
|
||||||
// and end the span to indicate we've left
|
// and end the span to indicate we've left
|
||||||
this.callMembershipSpan!.end();
|
this.callMembershipSpan.end();
|
||||||
this.callMembershipSpan = undefined;
|
this.callMembershipSpan = undefined;
|
||||||
this.groupCallContext = undefined;
|
this.groupCallContext = undefined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import { useMediaStream } from "./useMediaStream";
|
||||||
interface Props {
|
interface Props {
|
||||||
tileDescriptor: TileDescriptor;
|
tileDescriptor: TileDescriptor;
|
||||||
audioOutput: string;
|
audioOutput: string;
|
||||||
otelGroupCallMembership: OTelGroupCallMembership;
|
otelGroupCallMembership?: OTelGroupCallMembership;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Renders and <audio> element on the page playing the given stream
|
// Renders and <audio> element on the page playing the given stream
|
||||||
|
|
Loading…
Add table
Reference in a new issue