Skip to content

OxQL metrics explorer - #3312

Merged
fakemonster merged 34 commits into
mainfrom
oxql-page
Oct 8, 2026
Merged

fakemonster merged 34 commits into
mainfrom
oxql-page

Conversation

@fakemonster

Copy link
Copy Markdown
Contributor

Keeping in draft for a moment, because we may not want to merge this as-is, but this is a basic loop of "send a query, show it". There's the open design question of "do we prefer a builder form", which should be easier to discuss live. I'm also more than open to input on where we want to take the mock service worker for this. As-is it works just fine, but the OxQL results space is much wider than what the MSW is configured to deliver. You basically have to point at real data to see the fully variety of visualizations.

@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Oct 8, 2026 9:34pm UTC

Request Review

@david-crespo

Copy link
Copy Markdown
Collaborator

Idea: query= param so you can bookmark a query.

Base automatically changed from migrate-to-uplot to main August 15, 2026 00:23
This also makes some design decisions unilaterally, such as a rotating
color palette, and legends/what they look like.
I'm not entirely sure this is what we're going to love. As you drag the
mouse around, the alpha changes are quite noisy. I wonder if we can get
by with just highlighting the active point (instead of _all_ the points
on that X) and stick the color itself in the tooltip?

The other thought I'm having here: in the legend, there's not much to do
other than throw all the legend values in line like that (or come up
with aliases, but then you need some sort of hover). Within a tooltip,
though, this could be actually formatted!
Maybe we'll actually hang on to something like this in the long run, but
for now it's just plain handy.
MSW already supports a few specific queries, and we could expand that
support, but the challenge is less in adding more metrics/targets, and
more in needing increasingly rich parsing of queries to determine what
the query is actually asking for (multiple tables, alignments, joins,
groupings). For now, I think our bases are covered by just guaranteeing
it always returns _something._
Writing the query to the url is ugly, BUT it lets people bookmark!

This change also adds functionality for disabling the loading bar,
because by default it would begin _after_ successful queries (since I'm
electing to only write queries that succeeded to the URL), which just
looked weird.
uPlot is fast, but it's not "render 1500 charts at once" fast.
Still contrived, trying to show the different varieties of chart for the
sake of review. But at least these are somewhat reasonable examples.
Comment thread app/pages/system/OxqlPage.tsx Resolved
Comment thread app/util/path-builder.ts Resolved
@david-crespo

Copy link
Copy Markdown
Collaborator

Not completely obvious that this means copy the result, since it's next to the input rather than where the results are displayed. I can live with it but it feels a little off.

image

@david-crespo david-crespo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@fakemonster
fakemonster merged commit 00cc6bf into main Oct 8, 2026
7 checks passed
@fakemonster
fakemonster deleted the oxql-page branch October 8, 2026 22:00
david-crespo added a commit that referenced this pull request Oct 9, 2026
Converts the shell part of the API client gen into TS to go with the TS
we wrote in #3312 for pulling the timeseries schemas. Taken alone there
is not a huge reason to do this, but on top of this PR I have another
one adding some clever tests for the CSP and the Nexus console route
paths that fetch more stuff from omicron, and at that point it makes
more sense to have it all in TS.

This isn't a pure rewrite: it also changes the way we represent the
current version of the generated stuff on disk. Before, each generated
output had its own record of the omicron commit it came from:
`__generated__/OMICRON_VERSION` for the API client and an
`omicronVersion` const in `timeseries-metadata.ts`. The followup would
have added two more of those. Now that one script does everything, a
single version stamp file is enough. `__generated__/OMICRON_VERSION` is
written only after every step succeeds. The timeseries step skips
refetching when the stamp already matches, since it makes a lot of
requests to GitHub. The API client always regenerates because an
`openapi-gen-ts` upgrade can change the generated output even if we
didn't change the API version.

This branch was successfully deployed

1 active deployment
Preview — 35b07411 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants