remove http_requests_by_endpoint into metrics

This commit is contained in:
2026-04-04 19:05:59 +02:00
parent fc8e0657a0
commit 92a700409d
+8 -8
View File
@@ -20,12 +20,12 @@ class ServerMetricsCollector:
'active_games_peak': 0,
'games_autocreated': 0,
'http_requests_total': 0,
'http_requests_by_endpoint': {
'info': 0,
'start': 0,
'move': 0,
'end': 0,
},
# 'http_requests_by_endpoint': {
# 'info': 0,
# 'start': 0,
# 'move': 0,
# 'end': 0,
# },
'move_direction_counts': {
'up': 0,
'down': 0,
@@ -53,8 +53,8 @@ class ServerMetricsCollector:
def record_http_request(self, endpoint:str) -> None:
self._metrics['http_requests_total'] += 1
endpoint_counts = self._metrics['http_requests_by_endpoint']
endpoint_counts[endpoint] = endpoint_counts.get(endpoint, 0) + 1
# endpoint_counts = self._metrics['http_requests_by_endpoint']
# endpoint_counts[endpoint] = endpoint_counts.get(endpoint, 0) + 1
async def record_game_started(self, active_count:int) -> None:
self._metrics['games_started'] += 1