Series IDs
Many surfaces refer to a series_id (an unsigned 64-bit integer).
Implementation reference:
types.seriesIdFrom(series, tags_json)(HTTP hashing input)types.hash64(series)(CLI hashing input)
Hashing scheme
For HTTP ingest/query when specifying series (and optional tags), the series id is computed as:
xxhash64(series + "|" + tags_json)
Where tags_json is the JSON string for the tags object (or {} when absent).
Important implications
- The tags JSON representation is part of the hash input. If clients send the same tags with different key order, they may produce different
series_idvalues. sydradb ingest(CLI) currently hashes onlyseries(no|{}suffix), so its ids do not match the HTTPseries_idscheme unless explicitly aligned.
Where this happens in the implementation:
- HTTP ingest derives IDs in
handleIngest. - CLI ingest derives IDs in
cmdIngest.
Practical guidance
- Prefer using
/api/v1/ingestand/api/v1/query/rangeconsistently when working with tags. - If you already have a
series_id, prefer passing it directly (HTTP:series_id, CLI:query <series_id> ...).
See also: