Skip to content
Extraits de code Groupes Projets
Valider 5a1edeee rédigé par Will Hunt's avatar Will Hunt
Parcourir les fichiers

Update metric types

parent 3f443297
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -57,20 +57,18 @@ export class MetricPeg { ...@@ -57,20 +57,18 @@ export class MetricPeg {
} }
export class PrometheusBridgeMetrics implements IBridgeMetrics { export class PrometheusBridgeMetrics implements IBridgeMetrics {
private matrixCallCounter: Counter; private matrixCallCounter: Counter<string>;
private remoteCallCounter: Counter; private remoteCallCounter: Counter<string>;
private storeCallCounter: Counter; private storeCallCounter: Counter<string>;
private presenceGauge: Gauge; private presenceGauge: Gauge<string>;
private remoteRequest: Histogram; private remoteRequest: Histogram<string>;
private matrixRequest: Histogram; private matrixRequest: Histogram<string>;
private requestsInFlight: Map<string, number>; private requestsInFlight: Map<string, number>;
private matrixRequestStatus: Map<string, "success"|"failed">; private matrixRequestStatus: Map<string, "success"|"failed">;
private httpServer: http.Server; private httpServer: http.Server;
public init(as: Appservice, config: DiscordBridgeConfigMetrics) { public init(as: Appservice, config: DiscordBridgeConfigMetrics) {
promClient.collectDefaultMetrics({ promClient.collectDefaultMetrics();
timeout: 15000,
});
// TODO: Bind this for every user. // TODO: Bind this for every user.
this.httpServer = http.createServer((req, res) => { this.httpServer = http.createServer((req, res) => {
if (req.method !== "GET" || req.url !== "/metrics") { if (req.method !== "GET" || req.url !== "/metrics") {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter