stats: rename enum to avoid shadow values

This commit is contained in:
Enrico Schwendig 2023-04-03 14:07:29 +02:00
parent c53dbfde27
commit 3b06258e40
2 changed files with 7 additions and 7 deletions

View file

@ -320,7 +320,7 @@ export class OTelGroupCallMembership {
public onConnectionStatsReport(
statsReport: GroupCallStatsReport<ConnectionStatsReport>
) {
const type = OTelStatsReportType.ConnectionStatsReport;
const type = OTelStatsReportType.ConnectionReport;
const data =
ObjectFlattener.flattenConnectionStatsReportObject(statsReport);
this.buildStatsEventSpan({ type, data });
@ -329,7 +329,7 @@ export class OTelGroupCallMembership {
public onByteSentStatsReport(
statsReport: GroupCallStatsReport<ByteSentStatsReport>
) {
const type = OTelStatsReportType.ByteSentStatsReport;
const type = OTelStatsReportType.ByteSentReport;
const data = ObjectFlattener.flattenByteSentStatsReportObject(statsReport);
this.buildStatsEventSpan({ type, data });
}
@ -337,7 +337,7 @@ export class OTelGroupCallMembership {
public onSummaryStatsReport(
statsReport: GroupCallStatsReport<SummaryStatsReport>
) {
const type = OTelStatsReportType.SummaryStatsReport;
const type = OTelStatsReportType.SummaryReport;
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
this.buildStatsEventSpan({ type, data });
}
@ -389,7 +389,7 @@ interface OTelStatsReportEvent {
}
enum OTelStatsReportType {
ConnectionStatsReport = "matrix.stats.connection",
ByteSentStatsReport = "matrix.stats.byteSent",
SummaryStatsReport = "matrix.stats.summary",
ConnectionReport = "matrix.stats.connection",
ByteSentReport = "matrix.stats.byteSent",
SummaryReport = "matrix.stats.summary",
}

View file

@ -48,7 +48,7 @@ export class ElementCallOpenTelemetry {
return sharedInstance;
}
constructor(collectorUrl: string) {
constructor(collectorUrl: string | undefined) {
const otlpExporter = new OTLPTraceExporter({
url: collectorUrl,
});