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:
@@ -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()),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user