Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static init(bridge: any) {
this.metrics = new PrometheusMetrics();
this.metrics.registerMatrixSdkMetrics();
this.metrics.registerBridgeGauges(() => this.bridgeGauges);
this.metrics.addAppServicePath(bridge);
this.remoteCallCounter = this.metrics.addCounter({
name: "remote_api_calls",
help: "Count of the number of remote API calls made",
labels: ["method"],
});
this.matrixRequest = this.metrics.addTimer({
name: "matrix_request_seconds",
help: "Histogram of processing durations of received Matrix messages",
labels: ["outcome"],
});
this.remoteRequest = this.metrics.addTimer({
name: "remote_request_seconds",
help: "Histogram of processing durations of received remote messages",
public init(bridge: Bridge) {
this.metrics = new PrometheusMetrics();
this.metrics.registerMatrixSdkMetrics();
this.metrics.registerBridgeGauges(() => this.bridgeGauges);
this.metrics.addAppServicePath(bridge);
this.remoteCallCounter = this.metrics.addCounter({
help: "Count of remote API calls made",
labels: ["method"],
name: "remote_api_calls",
});
this.storeCallCounter = this.metrics.addCounter({
help: "Count of store function calls made",
labels: ["method", "cached"],
name: "store_calls",
});
this.presenceGauge = this.metrics.addGauge({
help: "Count of users in the presence queue",
labels: [],