diff --git a/api/app/influx.py b/api/app/influx.py index cc693a0..f7a048c 100644 --- a/api/app/influx.py +++ b/api/app/influx.py @@ -31,7 +31,9 @@ def write_event(event, game: str) -> bool: p = Point(event.type).time(event.time * 1_000_000_000) p.tag("game", game) for k, v in (event.data or {}).items(): - if isinstance(v, (int, float, str, bool)): + if k.startswith("tag_"): + p.tag(k[4:], str(v)) + elif isinstance(v, (int, float, str, bool)): p.field(k, v) write_api.write(bucket=INFLUX_BUCKET, record=p) return True