Add Prometheus metrics endpoint #14
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/prometheus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +55,4 @@
name: `${prefix}ttn_gateway_receptions`,
help: "Total number of TTN Gateway receptions entries in database",
labelNames: ["database"],
});
Ich würde das in eine extra Datei auslagern
@ -0,0 +68,4 @@
wifiLocationTotal.set((await wifiLocationService.getAllWifiLocations()).length);
wifiLocationNotResolvable.set((await wifiLocationService.getAllWifiLocationsByNotResolvable()).length);
wifiLocationRequestLimitExceeded.set((await wifiLocationService.getAllWifiLocationsByRequestLimitExceeded()).length);
ttnGatewayReceptions.set((await ttnGatewayReceptionService.getAllGatewayReceptions()).length);
Ich würde auf jedenfall hier auf alle promises gleichzeitig warten mit Promise.all. Damit es wieder gleichzeitig abgearbeitet werden kann. Und dann weil sonst der Controller zu voll wird, würde ich das vermutlich in einen MetricService auslagern
WIP: Add Prometheus metrics endpointto Add Prometheus metrics endpoint