stats: fix typo
This commit is contained in:
parent
cb0ba6d827
commit
889a31489b
5 changed files with 20 additions and 20 deletions
|
@ -53,7 +53,7 @@
|
|||
"i18next-browser-languagedetector": "^6.1.8",
|
||||
"i18next-http-backend": "^1.4.4",
|
||||
"lodash": "^4.17.21",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#d1cf98b1770d0282224e80bc9303609f6c156d3a",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#fe79a6fa7ca50fc7d078e11826b5539bb0822c45",
|
||||
"matrix-widget-api": "^1.3.1",
|
||||
"mermaid": "^8.13.8",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
|
|
@ -37,7 +37,7 @@ import {
|
|||
import {
|
||||
ConnectionStatsReport,
|
||||
ByteSentStatsReport,
|
||||
SummeryStatsReport,
|
||||
SummaryStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
import { setSpan } from "@opentelemetry/api/build/esm/trace/context-utils";
|
||||
|
||||
|
@ -334,11 +334,11 @@ export class OTelGroupCallMembership {
|
|||
this.buildStatsEventSpan({ type, data });
|
||||
}
|
||||
|
||||
public onSummeryStatsReport(
|
||||
statsReport: GroupCallStatsReport<SummeryStatsReport>
|
||||
public onSummaryStatsReport(
|
||||
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
||||
) {
|
||||
const type = OTelStatsReportType.SummeryStatsReport;
|
||||
const data = ObjectFlattener.flattenSummeryStatsReportObject(statsReport);
|
||||
const type = OTelStatsReportType.SummaryStatsReport;
|
||||
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
|
||||
this.buildStatsEventSpan({ type, data });
|
||||
}
|
||||
|
||||
|
@ -391,5 +391,5 @@ interface OTelStatsReportEvent {
|
|||
enum OTelStatsReportType {
|
||||
ConnectionStatsReport = "matrix.stats.connection",
|
||||
ByteSentStatsReport = "matrix.stats.byteSent",
|
||||
SummeryStatsReport = "matrix.stats.summery",
|
||||
SummaryStatsReport = "matrix.stats.summary",
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import { GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall";
|
|||
import {
|
||||
ByteSentStatsReport,
|
||||
ConnectionStatsReport,
|
||||
SummeryStatsReport,
|
||||
SummaryStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
export class ObjectFlattener {
|
||||
|
@ -48,14 +48,14 @@ export class ObjectFlattener {
|
|||
return flatObject;
|
||||
}
|
||||
|
||||
static flattenSummeryStatsReportObject(
|
||||
statsReport: GroupCallStatsReport<SummeryStatsReport>
|
||||
static flattenSummaryStatsReportObject(
|
||||
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
||||
) {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(
|
||||
statsReport.report,
|
||||
flatObject,
|
||||
"matrix.stats.summery.",
|
||||
"matrix.stats.summary.",
|
||||
0
|
||||
);
|
||||
return flatObject;
|
||||
|
|
|
@ -33,7 +33,7 @@ import { MatrixClient } from "matrix-js-sdk";
|
|||
import {
|
||||
ByteSentStatsReport,
|
||||
ConnectionStatsReport,
|
||||
SummeryStatsReport,
|
||||
SummaryStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { usePageUnload } from "./usePageUnload";
|
||||
|
@ -356,10 +356,10 @@ export function useGroupCall(
|
|||
groupCallOTelMembership?.onByteSentStatsReport(report);
|
||||
}
|
||||
|
||||
function onSummeryStatsReport(
|
||||
report: GroupCallStatsReport<SummeryStatsReport>
|
||||
function onSummaryStatsReport(
|
||||
report: GroupCallStatsReport<SummaryStatsReport>
|
||||
): void {
|
||||
groupCallOTelMembership?.onSummeryStatsReport(report);
|
||||
groupCallOTelMembership?.onSummaryStatsReport(report);
|
||||
}
|
||||
|
||||
groupCall.on(GroupCallEvent.GroupCallStateChanged, onGroupCallStateChanged);
|
||||
|
@ -388,7 +388,7 @@ export function useGroupCall(
|
|||
onByteSentStatsReport
|
||||
);
|
||||
|
||||
groupCall.on(GroupCallStatsReportEvent.SummeryStats, onSummeryStatsReport);
|
||||
groupCall.on(GroupCallStatsReportEvent.SummaryStats, onSummaryStatsReport);
|
||||
|
||||
updateState({
|
||||
error: null,
|
||||
|
@ -445,8 +445,8 @@ export function useGroupCall(
|
|||
onByteSentStatsReport
|
||||
);
|
||||
groupCall.removeListener(
|
||||
GroupCallStatsReportEvent.SummeryStats,
|
||||
onSummeryStatsReport
|
||||
GroupCallStatsReportEvent.SummaryStats,
|
||||
onSummaryStatsReport
|
||||
);
|
||||
leaveCall();
|
||||
};
|
||||
|
|
|
@ -10550,9 +10550,9 @@ matrix-events-sdk@0.0.1:
|
|||
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd"
|
||||
integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==
|
||||
|
||||
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#d1cf98b1770d0282224e80bc9303609f6c156d3a":
|
||||
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#fe79a6fa7ca50fc7d078e11826b5539bb0822c45":
|
||||
version "24.0.0"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/d1cf98b1770d0282224e80bc9303609f6c156d3a"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/fe79a6fa7ca50fc7d078e11826b5539bb0822c45"
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.5"
|
||||
|
|
Loading…
Add table
Reference in a new issue