stats: rename enum to avoid shadow values
This commit is contained in:
parent
c53dbfde27
commit
3b06258e40
2 changed files with 7 additions and 7 deletions
|
@ -320,7 +320,7 @@ export class OTelGroupCallMembership {
|
||||||
public onConnectionStatsReport(
|
public onConnectionStatsReport(
|
||||||
statsReport: GroupCallStatsReport<ConnectionStatsReport>
|
statsReport: GroupCallStatsReport<ConnectionStatsReport>
|
||||||
) {
|
) {
|
||||||
const type = OTelStatsReportType.ConnectionStatsReport;
|
const type = OTelStatsReportType.ConnectionReport;
|
||||||
const data =
|
const data =
|
||||||
ObjectFlattener.flattenConnectionStatsReportObject(statsReport);
|
ObjectFlattener.flattenConnectionStatsReportObject(statsReport);
|
||||||
this.buildStatsEventSpan({ type, data });
|
this.buildStatsEventSpan({ type, data });
|
||||||
|
@ -329,7 +329,7 @@ export class OTelGroupCallMembership {
|
||||||
public onByteSentStatsReport(
|
public onByteSentStatsReport(
|
||||||
statsReport: GroupCallStatsReport<ByteSentStatsReport>
|
statsReport: GroupCallStatsReport<ByteSentStatsReport>
|
||||||
) {
|
) {
|
||||||
const type = OTelStatsReportType.ByteSentStatsReport;
|
const type = OTelStatsReportType.ByteSentReport;
|
||||||
const data = ObjectFlattener.flattenByteSentStatsReportObject(statsReport);
|
const data = ObjectFlattener.flattenByteSentStatsReportObject(statsReport);
|
||||||
this.buildStatsEventSpan({ type, data });
|
this.buildStatsEventSpan({ type, data });
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ export class OTelGroupCallMembership {
|
||||||
public onSummaryStatsReport(
|
public onSummaryStatsReport(
|
||||||
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
||||||
) {
|
) {
|
||||||
const type = OTelStatsReportType.SummaryStatsReport;
|
const type = OTelStatsReportType.SummaryReport;
|
||||||
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
|
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
|
||||||
this.buildStatsEventSpan({ type, data });
|
this.buildStatsEventSpan({ type, data });
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ interface OTelStatsReportEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum OTelStatsReportType {
|
enum OTelStatsReportType {
|
||||||
ConnectionStatsReport = "matrix.stats.connection",
|
ConnectionReport = "matrix.stats.connection",
|
||||||
ByteSentStatsReport = "matrix.stats.byteSent",
|
ByteSentReport = "matrix.stats.byteSent",
|
||||||
SummaryStatsReport = "matrix.stats.summary",
|
SummaryReport = "matrix.stats.summary",
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ export class ElementCallOpenTelemetry {
|
||||||
return sharedInstance;
|
return sharedInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(collectorUrl: string) {
|
constructor(collectorUrl: string | undefined) {
|
||||||
const otlpExporter = new OTLPTraceExporter({
|
const otlpExporter = new OTLPTraceExporter({
|
||||||
url: collectorUrl,
|
url: collectorUrl,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue