fix region env variable, fix metric name typo

This commit is contained in:
Evan
2025-03-19 20:43:13 -07:00
parent f0734eb848
commit bfb1c4f138
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -30,21 +30,24 @@ fi
REGION=$1
VERSION_TAG="latest"
DOCKER_REPO=""
ENV=""
# Set environment-specific variables
if [ "$REGION" == "staging" ]; then
print_header "DEPLOYING TO STAGING ENVIRONMENT"
SERVER_HOST=$SERVER_HOST_STAGING
DOCKER_REPO=$DOCKER_REPO_STAGING
ENV="staging"
elif [ "$REGION" == "us" ]; then
print_header "DEPLOYING TO US ENVIRONMENT"
SERVER_HOST=$SERVER_HOST_US
DOCKER_REPO=$DOCKER_REPO_PROD # Uses prod Docker repo for alt environment
REGION="prod"
ENV="prod"
else
print_header "DEPLOYING TO EU ENVIRONMENT"
SERVER_HOST=$SERVER_HOST_EU
DOCKER_REPO=$DOCKER_REPO_PROD
ENV="prod"
fi
# Check required environment variables
+3 -3
View File
@@ -13,21 +13,21 @@ promClient.collectDefaultMetrics({ register });
// Add worker-specific metrics
const activeGamesGauge = new promClient.Gauge({
name: "openfont_active_games_count",
name: "openfront_active_games_count",
help: "Number of active games on this worker",
labelNames: ["region"],
registers: [register],
});
const connectedClientsGauge = new promClient.Gauge({
name: "openfont_connected_clients_count",
name: "openfront_connected_clients_count",
help: "Number of connected clients on this worker",
labelNames: ["region"],
registers: [register],
});
const memoryUsageGauge = new promClient.Gauge({
name: "openfont_memory_usage_bytes",
name: "openfront_memory_usage_bytes",
help: "Current memory usage of the worker process in bytes",
labelNames: ["region"],
registers: [register],