Skip to content

Added initial VTUI implementation - #248

Merged
jiekun merged 4 commits into
masterfrom
vtui
Sep 28, 2026
Merged

jiekun merged 4 commits into
masterfrom
vtui

Conversation

@AndrewChubatiuk

@AndrewChubatiuk AndrewChubatiuk commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Describe Your Changes

It's based on PR #105
image
image

@AndrewChubatiuk
AndrewChubatiuk force-pushed the vtui branch 3 times, most recently from cb7493c to ee8cc6e Compare August 27, 2026 07:50

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

9 issues found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/vmui/packages/vmui/src/components/WebStorageCheck/types.ts">

<violation number="1" location="app/vmui/packages/vmui/src/components/WebStorageCheck/types.ts:12">
P3: The `fix` field omits the terminating semicolon and the space after the colon, while every other property and the enum members use semicolons. This breaks the file's own formatting consistency and the shared prettier config. Format it as `fix: string[];`.</violation>
</file>

<file name="app/vmui/packages/vmui/src/layouts/Footer/Footer.tsx">

<violation number="1" location="app/vmui/packages/vmui/src/layouts/Footer/Footer.tsx:19">
P3: When the selected trace timezone is on the other side of New Year's boundary, the footer shows the wrong copyright year because it follows the data timezone rather than the user's current date. Keep the copyright calculation in the browser's local timezone.</violation>
</file>

<file name="app/vmui/packages/vmui/src/components/Main/ShortcutKeys/ShortcutKeys.tsx">

<violation number="1" location="app/vmui/packages/vmui/src/components/Main/ShortcutKeys/ShortcutKeys.tsx:26">
P2: When `withHotkey` is false, the component still advertises `F1` in its tooltip even though the listener ignores it. Derive the tooltip title from `withHotkey` as well.</violation>

<violation number="2" location="app/vmui/packages/vmui/src/components/Main/ShortcutKeys/ShortcutKeys.tsx:27">
P2: On macOS, this removes the existing `Cmd + /` shortcut, leaving users dependent on F1 or the button. Preserve `Cmd + /` while adding or retaining the F1 shortcut.</violation>
</file>

<file name="app/vmui/packages/vmui/src/components/Main/Select/Select.tsx">

<violation number="1" location="app/vmui/packages/vmui/src/components/Main/Select/Select.tsx:180">
P2: When `disabled` becomes true while the dropdown is open, this unmounts `Autocomplete` without clearing `openList`; the arrow stays open and re-enabling immediately remounts the dropdown. Close `openList` whenever `disabled` becomes true.</violation>
</file>

<file name="app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/Timezones/TimezonesList.tsx">

<violation number="1" location="app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/Timezones/TimezonesList.tsx:48">
P2: The “Default time” option never appears in the current app: `initialTimeState` leaves `defaultTimezone` undefined, and this filter removes its row. Initialize or dispatch the default before rendering the picker.</violation>
</file>

<file name="app/vmui/packages/vmui/src/components/Table/TableHeaderCell/TableHeaderMenu/TableHeaderMenu.tsx">

<violation number="1" location="app/vmui/packages/vmui/src/components/Table/TableHeaderCell/TableHeaderMenu/TableHeaderMenu.tsx:50">
P2: The column-options button has no accessible name, so screen readers expose it as an unnamed button. Add an `aria-label` such as `Column options`.</violation>

<violation number="2" location="app/vmui/packages/vmui/src/components/Table/TableHeaderCell/TableHeaderMenu/TableHeaderMenu.tsx:70">
P2: Keyboard and assistive-technology users cannot invoke the column actions because each menu item is a non-focusable `div`. Render these actions as buttons or add equivalent menu-item focus and keyboard semantics.</violation>
</file>

<file name="app/vmui/packages/vmui/src/pages/TraceExplorer/components/FiltersSidebar/hooks/useFieldNames.ts">

<violation number="1" location="app/vmui/packages/vmui/src/pages/TraceExplorer/components/FiltersSidebar/hooks/useFieldNames.ts:45">
P2: When the time range or tenant changes during an in-flight request, the aborted request sets `loading` to false while the replacement request is still pending. Only clear loading for the active request, such as by guarding this update with `signal.aborted` or a request identity check.</violation>
</file>

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

@Loori-R Loori-R left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! Just left a few comments and questions.


for (const rs of resourceSpansList) {
const serviceName = resourceServiceName(rs.resource);
const processID = serviceName;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can multiple ResourceSpans have the same service.name but different resource attributes? Using the service name as processID would merge them and assign the first resource's attributes to all corresponding spans.

}

export function buildDurationRangeQuery(operation: string): string {
return `${OPERATION_FIELD}:${quoteLogsqlValue(operation)} | stats count() as total, min(duration) as min_duration, max(duration) as max_duration`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

count() counts matching span entries, but the result is presented in the UI as the number of traces. Should this use a trace-level aggregation, such as grouping by trace_id, instead?

Comment on lines +40 to +41
const counts = bandConditions.map((cond, i) => `count() if (${cond}) b${i}`);
const errors = bandConditions.map((cond, i) => `count() if (${cond} AND status_code:="${ERROR_STATUS_CODE}") e${i}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

count() counts individual span entries here, while the heatmap presents the values as traces. Should the data be aggregated by trace_id before calculating the time and duration buckets?

@hagen1778

Copy link
Copy Markdown
Contributor

Thank you for PR @AndrewChubatiuk !

@Loori-R @AndrewChubatiuk @jiekun I think before accepting the PR we should define who will become a maintainer for vtui - victoriatraces ui. I can't ask this from @AndrewChubatiuk as he is a member of another team.

@Loori-R do you think it is possible for you to become a maintaner? Is the current PR a way how you will do it, based on your expereince with vm/vlui?

I am not expecting for vtui to have that much work that vl has - it should cover only basic functionality of filtering and visualizing traces. Please consider this before responding whether you can become its maintainer.

@AndrewChubatiuk
AndrewChubatiuk force-pushed the vtui branch 4 times, most recently from d45dd08 to 57e18eb Compare September 7, 2026 16:05

@arturminchukov arturminchukov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. It looks great!

here are few bugs that I found:

More important (I think it should be fixed):

  1. The Trace Explorer heatmap crashed the playground's storage node on long time ranges (but for me it also crashed on 5min range). The query grouped every span by trace_id, which meant about 3.5 million groups for 30 days. It then checked 36 count() if conditions on every row. The partial-trace subquery made it worse, because it had no lower time bound and scanned the whole retention.
Screen.Recording.2026-09-24.at.18.50.26.mov
Image

I tried to fix it in this PR - #259. You can check it and merge to your branch. It works more better. But I think we should find a better solution in the future.

Maybe the reason could be low cluster resources. Maybe @jiekun could help with this issue.

Image

Minor annoying visual bugs, could be fixed in other PR:

  1. settings modal have the same index as the header of trace table. The same related to keyboard hints.
Image 2. I cannot delete `*` in the query. Maybe it is intentionally. But I could write some text and after it delete it.
Screen.Recording.2026-09-24.at.18.43.56.mov

- The heatmap now aggregates the rows vtinsert writes to
  {trace_id_idx_stream!=""}, one per trace, instead of grouping all spans
  by trace_id. On 30 days of playground data the old query crashed the
  vtstorage node, the new one returns in 2-6 s.
- A single math expression computes the duration band and replaces the
  18 count() if (...) conditions per row. It produces the same bands.
- The user query and the sidebar extra_filters run against spans inside
  a join by trace_id_idx, because index rows have no span fields and a
  global extra_filters arg matches nothing.
- A second request counts traces with error spans, so the traces layer
  renders before the errors layer.
- Time buckets use `_time:step offset`, so server buckets match the
  client columns and rows no longer land one column to the left.
- excludePartialTraces excludes traces that have spans in the minute
  before start, instead of grouping every trace in the retention. It wraps
  user filters in parentheses and moves user pipes to the end, and the
  heatmap preview query uses the new addFilterClause helper.
@AndrewChubatiuk

Copy link
Copy Markdown
Contributor Author

hey @arturminchukov
thank you for your time first of all.
I've merged your PR and addressed other bugs, also disabled query execution while typing

@arturminchukov arturminchukov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@arturminchukov

arturminchukov commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

@jiekun @AndrewChubatiuk, we discussed in the UI sync that if VTUI looks good, we can merge it because this is a huge PR. So I think we can merge it. It would be better to do the extra work in a separate PR.

I will be the maintainer of VTUI, so @jiekun, could you please assign the UI-related features and bugs to me?

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor Author

hey @hagen1778
who is responsible for merging it? @arturminchukov as UI owner or @jiekun as repo owner?

@arturminchukov

Copy link
Copy Markdown
Member

Who is responsible for merging it? @arturminchukov as UI owner or @jiekun as repo owner?

I think @jiekun

@hagen1778

Copy link
Copy Markdown
Contributor

@jiekun is responsible for merging as maintainer. @arturminchukov can become a person who @jiekun can rely on in regard of UI changes, fixing bugs and continous support.

Thanks for your contribution @AndrewChubatiuk !

@jiekun

jiekun commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Hello thanks for the headsup and review from @arturminchukov . I'm playing with the UI and 'm going to merge it since it's approved from frontend team.

I will be the maintainer of VTUI, so @jiekun, could you please assign the UI-related features and bugs to me?

@arturminchukov Sure. Thanks for helping the project! I've update the permission so you should be able to do the merge for future changes. For this VTUI initialization please leave it to me for one more day.

@jiekun jiekun mentioned this pull request Sep 28, 2026
2 tasks done
@jiekun

jiekun commented Sep 28, 2026

Copy link
Copy Markdown
Member

@AndrewChubatiuk Thank you for the contribution, and thanks to everyone who participated.

I pushed the follow-up commit for docs 16f1a68. And the static files will be updated afterward.

@jiekun
jiekun merged commit 1fee48b into master Sep 28, 2026
3 checks passed
@jiekun
jiekun deleted the vtui branch September 28, 2026 13:31
@weisdd

weisdd commented Sep 29, 2026

Copy link
Copy Markdown

@AndrewChubatiuk Although it's a nice change (thx!), I feel like something important is missing now. - Previously, the UI would clearly show ingestion spikes and their distribution amongst services, whereas now it's only about the trace durations meaning the admin side of things is overlooked.

@AndrewChubatiuk

AndrewChubatiuk commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@weisdd
Feel free to submit a feature request for this change

hbjydev pushed a commit to hbjydev/phoebe that referenced this pull request Oct 5, 2026
…1 → v0.12.0) (#847)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [victoriametrics/victoria-traces](https://github.com/VictoriaMetrics/VictoriaTraces) | minor | `v0.11.1` → `v0.12.0` |

---

### Release Notes

<details>
<summary>VictoriaMetrics/VictoriaTraces (victoriametrics/victoria-traces)</summary>

### [`v0.12.0`](https://github.com/VictoriaMetrics/VictoriaTraces/releases/tag/v0.12.0)

[Compare Source](VictoriaMetrics/VictoriaTraces@v0.11.1...v0.12.0)

Released at 2026-09-29

**Update note:** the `/internal/force_merge`, `/internal/force_flush`, `/internal/log_new_streams` and `/internal/partition/*` HTTP endpoints now require the `POST` method. Update any scripts or automation calling these endpoints via `GET` to use `POST`.

- SECURITY: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtselect in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): restrict the `/delete/run_task` endpoint to the `POST` method only in order to prevent some [SSRF](https://en.wikipedia.org/wiki/Server-side_request_forgery)-based log deletion attacks. See [this issue #&#8203;225](VictoriaMetrics/VictoriaTraces#225). Thank [@&#8203;Vandit1604](https://github.com/Vandit1604) for [the pull request #&#8203;236](VictoriaMetrics/VictoriaTraces#236).

- SECURITY: require the `POST` method for the `/internal/force_merge`, `/internal/force_flush`, `/internal/log_new_streams` and `/internal/partition/*` HTTP endpoints in order to prevent GET-based [SSRF](https://en.wikipedia.org/wiki/Server-side_request_forgery) attacks. See [this issue #&#8203;225](VictoriaMetrics/VictoriaTraces#225). Thank [@&#8203;Vandit1604](https://github.com/Vandit1604) for [the pull request #&#8203;236](VictoriaMetrics/VictoriaTraces#236).

- FEATURE: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtselect in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): provide built-in trace explore UI (VTUI). The existing log-based UI (VLUI) is replaced. Raw spans/logs can be queried via [the LogSQL APIs](https://docs.victoriametrics.com/victoriatraces/querying/#http-api). Thank [@&#8203;AndrewChubatiuk](https://github.com/AndrewChubatiuk) for [the pull request #&#8203;248](VictoriaMetrics/VictoriaTraces#248).

- FEATURE: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtselect in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): apply the latency offset (`-search.latencyOffset`, default `30s`) to most of the LogsQL APIs except the live-tailing API. Previously, only the Jaeger and Tempo APIs had this latency offset. The latency offset for LogsQL APIs can be disabled via the `disable_latency_offset=true` query argument.

- BUGFIX: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtselect in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): return `startTimeUnixNano` as a JSON string in the Tempo `/api/search` response. Previously it was a JSON number, which broke clients that decode the field as a string. Thank [@&#8203;clain23](https://github.com/clain23) for [the pull request #&#8203;256](VictoriaMetrics/VictoriaTraces#256).

- BUGFIX: vtselect in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): apply `-search.allowPartialResponse` for Tempo and Jaeger query APIs. Previously the flag affected only LogsQL query handlers, so Tempo and Jaeger requests still failed when a queried `vtstorage` node was unavailable. See [this issue #&#8203;157](VictoriaMetrics/VictoriaTraces#157).

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/London)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/847
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.

7 participants