Merge pull request #998 from robintown/rageshake-processor

Include unended spans in rageshakes
This commit is contained in:
Robin
2023-04-14 11:55:16 -04:00
committed by GitHub
3 changed files with 26 additions and 22 deletions

View File

@@ -28,7 +28,7 @@ import { logger } from "matrix-js-sdk/src/logger";
import { PosthogSpanProcessor } from "../analytics/PosthogSpanProcessor";
import { Anonymity } from "../analytics/PosthogAnalytics";
import { Config } from "../config/Config";
import { RageshakeSpanExporter } from "../analytics/RageshakeSpanExporter";
import { RageshakeSpanProcessor } from "../analytics/RageshakeSpanProcessor";
const SERVICE_NAME = "element-call";
@@ -39,7 +39,7 @@ export class ElementCallOpenTelemetry {
private _tracer: Tracer;
private _anonymity: Anonymity;
private otlpExporter: OTLPTraceExporter;
public readonly rageshakeExporter?: RageshakeSpanExporter;
public readonly rageshakeProcessor?: RageshakeSpanProcessor;
static globalInit(): void {
const config = Config.get();
@@ -89,11 +89,8 @@ export class ElementCallOpenTelemetry {
}
if (rageshakeUrl) {
logger.info("Enabling rageshake collector");
this.rageshakeExporter = new RageshakeSpanExporter();
this._provider.addSpanProcessor(
new SimpleSpanProcessor(this.rageshakeExporter)
);
this.rageshakeProcessor = new RageshakeSpanProcessor();
this._provider.addSpanProcessor(this.rageshakeProcessor);
}
this._provider.addSpanProcessor(