Skip to content

feat(api): add GetCapabilities RPC to expose allocation tracing status and metric names#25427

Open
thomasqueirozb wants to merge 11 commits into
masterfrom
feat/api-get-capabilities
Open

feat(api): add GetCapabilities RPC to expose allocation tracing status and metric names#25427
thomasqueirozb wants to merge 11 commits into
masterfrom
feat/api-get-capabilities

Conversation

@thomasqueirozb
Copy link
Copy Markdown
Member

@thomasqueirozb thomasqueirozb commented May 13, 2026

Summary

Adds a GetCapabilities RPC to the Vector observability gRPC API. This gives vector top (and any other client) a single call at connection time to discover:

  • Whether allocation tracing is active on the running instance
  • All registered metric names with their kind (counter / gauge / histogram), sourced from the canonical CounterName, GaugeName, and HistogramName enums

The InternalMetricKind enum is defined in vector-common (co-located with the name enums) and mirrored in the proto. vector top calls GetCapabilities once per connection in init_components(), populating State::available_metrics. On older servers that don't implement this RPC, it falls back to GetAllocationTracingStatus for the allocation tracing flag and populates available_metrics from the compiled-in metric name enums.

Vector configuration

NA

How did you test this PR?

NA

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

NA

@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label May 13, 2026
@thomasqueirozb thomasqueirozb removed the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label May 13, 2026
}

enum InternalMetricKind {
INTERNAL_METRIC_KIND_UNSPECIFIED = 0;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure if this is needed. Maybe we remove this and shift INTERNAL_METRIC_KIND_COUNTER to be 0 instead

@thomasqueirozb thomasqueirozb marked this pull request as ready for review May 13, 2026 21:27
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner May 13, 2026 21:27
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: 8971fc3af7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread lib/vector-common/src/internal_event/metric_name.rs Outdated
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: a03d056a4f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/api/grpc/service.rs
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.

1 participant