oxidecomputer / oxidecomputer/omicron

Should support naming the metric in OxQL queries, in addition to the special `datum` identifier

Open
#6,761 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

oxql
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Today, one can write OxQL queries like get foo:bar | datum > 100, where datum is a "special identifier" that we cons up to mean "the value at each point in the resulting timeseries". This behavior is implicit, which isn't great, and also falls over the moment we do joins: which element of the resulting multi-dimensional value does that refer to? We currently say, "neither" and return an error.

We could instead let folks write an identifier that is the metric name itself. From the above example, that'd be get foo:bar | bar > 100. If we join multiple tables together, then you can still refer to each one separately in your query, assuming they have different names. We could also consider "fully-qualified" syntax like { get foo:bar; get baz:quux } | align mean_within(1h) | filter foo:bar > 100, which would let us completely disambiguate which one the filter should apply to.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are mentioned. Start by locating the OxQL parser and name-resolution logic, then clarify whether metric-name identifiers, joined metrics, or fully qualified names are in scope; done means the chosen syntax is unambiguous and covered by query tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.