rearrange metrics

This commit is contained in:
Grant 2024-06-18 16:23:44 -06:00
parent be0f53c0e2
commit f237d292be
1 changed files with 9 additions and 9 deletions

View File

@ -31,6 +31,15 @@ export const UserCount = new client.Gauge({
},
});
export const InstanceCount = new client.Gauge({
name: "instance_count",
help: "total number of unique instances",
async collect() {
this.set(await prisma.instance.count());
},
});
export const OnlineUsers = new client.Gauge({
name: "connected_count",
help: "total connected sockets",
@ -82,15 +91,6 @@ export const TotalPixels = new client.Gauge({
},
});
export const UniqueInstances = new client.Gauge({
name: "instance_count",
help: "total number of unique instances",
async collect() {
this.set(await prisma.instance.count());
},
});
export const handleMetricsEndpoint = async (
req: e.Request,
res: e.Response