Skip to content

enhancement(api top): show "disabled" in Memory Used when allocation tracing is off#25138

Merged
pront merged 4 commits intomasterfrom
pavlos/vector-top-inactive-memory-label
Apr 7, 2026
Merged

enhancement(api top): show "disabled" in Memory Used when allocation tracing is off#25138
pront merged 4 commits intomasterfrom
pavlos/vector-top-inactive-memory-label

Conversation

@pront
Copy link
Copy Markdown
Member

@pront pront commented Apr 7, 2026

Summary

Adds a GetAllocationTracingStatus gRPC endpoint that reports whether the connected Vector instance has --allocation-tracing active. vector top queries this on startup ( or when reconnecting) and shows disabled in the Memory Used column when tracing is off, instead of misleading zeros.

Motivation: This is part of a series of vector top UI improvements:

Previously, when --allocation-tracing was not passed, the Memory Used column showed "0 B" for all components with no indication that the feature was simply not enabled.

Changes

  • proto: Add GetAllocationTracingStatus RPC and messages to observability.proto
  • service.rs: Implement the endpoint using is_allocation_tracing_enabled()
  • client.rs: Add get_allocation_tracing_status() client method
  • metrics.rs: Query the endpoint on startup, store result in State
  • state.rs: Add allocation_tracing_active field to State
  • dashboard.rs: Show "disabled" when allocation_tracing_active is false

Vector configuration

Any config works. Compare:

  • cargo run -- -c <config.yml> then vector top (shows "disabled")
  • cargo run -- -c <config.yml> --allocation-tracing then vector top (shows actual bytes)

How did you test this PR?

  • Visual inspection of vector top with and without --allocation-tracing
  • make check-clippy and make check-fmt pass

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

🤖 Generated with Claude Code

@pront pront changed the title enhancement(vector top): show "inactive" in Memory Used when allocation tracing is off feat(api top): show "inactive" in Memory Used when allocation tracing is off Apr 7, 2026
@pront pront changed the title feat(api top): show "inactive" in Memory Used when allocation tracing is off feat(api top): show "disabled" under Memory Used when allocation tracing is off Apr 7, 2026
…on tracing is off

Add GetAllocationTracingStatus gRPC endpoint that reports whether
the connected Vector instance has --allocation-tracing active.
vector-top queries this on startup and shows "disabled" in the
Memory Used column when tracing is off, instead of misleading zeros.

Changes:
- proto: add GetAllocationTracingStatus RPC and messages
- service.rs: implement the endpoint using is_allocation_tracing_enabled()
- client.rs: add get_allocation_tracing_status() method
- metrics.rs: query the endpoint on startup, store result in State
- state.rs: add allocation_tracing_active field to State
- dashboard.rs: show "disabled" when allocation_tracing_active is false

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pront pront force-pushed the pavlos/vector-top-inactive-memory-label branch from f61072b to 010b9d3 Compare April 7, 2026 17:30
@pront pront changed the title feat(api top): show "disabled" under Memory Used when allocation tracing is off enhancement(vector top): show "disabled" in Memory Used when allocation tracing is off Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pront pront marked this pull request as ready for review April 7, 2026 17:39
@pront pront requested a review from a team as a code owner April 7, 2026 17:39
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea36843feb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/vector-top/src/metrics.rs
@pront pront changed the title enhancement(vector top): show "disabled" in Memory Used when allocation tracing is off enhancement(api top): show "disabled" in Memory Used when allocation tracing is off Apr 7, 2026
The `get_allocation_tracing_status` RPC handler unconditionally called
`is_allocation_tracing_enabled()`, which only exists behind the
`allocation-tracing` feature gate. This broke builds on feature sets
that lack it (e.g. `default-msvc`). Add cfg guards so the handler
returns `false` when the feature is absent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29782252a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/vector-top/src/metrics.rs
@pront pront enabled auto-merge April 7, 2026 19:24
@pront pront added this pull request to the merge queue Apr 7, 2026
Merged via the queue into master with commit 02f281d Apr 7, 2026
96 checks passed
@pront pront deleted the pavlos/vector-top-inactive-memory-label branch April 7, 2026 20:20
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants