Track new analytics metrics in backend (#5895)

* Allow filtering by project IDs in analytics route

* Download meta info in header

* add recursion limit

* Track playtime country

* fix clickhouse migrations
This commit is contained in:
aecsocket
2026-04-24 16:43:25 +01:00
committed by GitHub
parent 42cdcc7df9
commit e3d6a498d0
7 changed files with 89 additions and 11 deletions

View File

@@ -214,6 +214,8 @@ async fn playtime_ingest(
)
.await?;
let headers = req.headers();
for (id, playtime) in playtimes {
if playtime.seconds > 300 {
continue;
@@ -230,6 +232,9 @@ async fn playtime_ingest(
loader: playtime.loader,
game_version: playtime.game_version,
parent: playtime.parent.map_or(0, |x| x.0),
country: headers
.get("cf-ipcountry")
.and_then(|c| c.to_str().map(|s| s.to_string()).ok()),
});
}
}