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 {
}
export class PrometheusBridgeMetrics implements IBridgeMetrics {
private matrixCallCounter: Counter;
private remoteCallCounter: Counter;
private storeCallCounter: Counter;
private presenceGauge: Gauge;
private remoteRequest: Histogram;
private matrixRequest: Histogram;
private matrixCallCounter: Counter<string>;
private remoteCallCounter: Counter<string>;
private storeCallCounter: Counter<string>;
private presenceGauge: Gauge<string>;
private remoteRequest: Histogram<string>;
private matrixRequest: Histogram<string>;
private requestsInFlight: Map<string, number>;
private matrixRequestStatus: Map<string, "success"|"failed">;
private httpServer: http.Server;
public init(as: Appservice, config: DiscordBridgeConfigMetrics) {
promClient.collectDefaultMetrics({
timeout: 15000,
});
promClient.collectDefaultMetrics();
// TODO: Bind this for every user.
this.httpServer = http.createServer((req, res) => {
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.
Veuillez vous inscrire ou vous pour commenter