chore(api)!: replace GraphQL observability API with gRPC, remove async-graphql dependencies#24364
Merged
chore(api)!: replace GraphQL observability API with gRPC, remove async-graphql dependencies#24364
Conversation
a317991 to
45e8d0e
Compare
d3b8168 to
5cec09b
Compare
216a7fc to
5b15df1
Compare
8 tasks
8 tasks
The comment now explicitly mentions that Log.metadata_full preserves event metadata during conversion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Migrate the vector_api integration tests from the deprecated GraphQL API to the new gRPC API. Changes: - Updated test infrastructure to use gRPC client instead of GraphQL - Migrated component queries from GraphQL to gRPC GetComponents RPC - Replaced GraphQL subscriptions with gRPC streaming for tap functionality - Added metrics population in gRPC GetComponents handler to support metrics tests - Fixed config reload tests to work around Vector behavior where components with unchanged names but modified connections don't appear during the reload transition - Increased startup timeout from 2s to 10s to handle slower test environments - Added 500ms delay before polling after SIGHUP to let Vector process the signal Test fixes: - Updated all assertions to use gRPC proto types (ComponentsResponse, ComponentType, etc.) - Changed tap tests to collect events inline instead of storing streams to avoid lifetime issues - Simplified reload tests to completely replace components instead of keeping old names - All 7 tests now pass: tap (4 tests), top (3 tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add breaking change changelog documenting the removal of the GraphQL Playground and replacement with gRPC API. Includes migration guide with grpcurl examples for common operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add compatibility note to changelog: 0.55+ clients require 0.55+ server - Add grpc.io link to api.md - Link proto file directly in api.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes unused import/dead_code warnings when building without the api feature (e.g. component-validation-tests). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…etrics
Consolidates StreamComponentReceivedEventsTotal,
StreamComponentSentEventsTotal, StreamComponentReceivedBytesTotal,
StreamComponentSentBytesTotal, StreamComponentErrorsTotal,
StreamComponentReceivedEventsThroughput,
StreamComponentSentEventsThroughput,
StreamComponentReceivedBytesThroughput, and
StreamComponentSentBytesThroughput into a single
StreamComponentMetrics(ComponentMetricStreamRequest) RPC.
The unified response type ComponentMetricResponse uses
oneof value { TotalMetric total; ThroughputMetric throughput; }
to carry per-output breakdowns alongside the aggregated value,
keeping the schema honest about which fields are populated.
StreamComponentAllocatedBytes remains a separate RPC since it is
semantically distinct and has no per-output breakdown.
Also moves ApiStarted internal event from grpc.rs (gated behind
sources-vector/opentelemetry) into a new api.rs module gated
behind the api feature flag.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ust updates - Add METRIC_NAME_ prefix to MetricName enum values (ENUM_VALUE_PREFIX) - Rename proto package to vector.observability.v1 (PACKAGE_VERSION_SUFFIX) - Rename service Observability -> ObservabilityService (SERVICE_SUFFIX) - Rename all request/response messages to match their RPC names per RPC_REQUEST_RESPONSE_UNIQUE convention (e.g. MetaRequest -> GetMetaRequest, HeartbeatRequest -> StreamHeartbeatRequest, etc.) - Add COMPONENT_TYPE_UNSPECIFIED zero value to ComponentType enum (ENUM_ZERO_VALUE_SUFFIX) - Cascade all renames through Rust: service.rs, client.rs, metrics.rs, vector-tap, and integration tests - Update grpcurl examples in changelog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fix api.md title - Client::new now takes http::Uri instead of String; Endpoint is built eagerly so connect() can no longer fail with InvalidUrl - Remove unused `url` dep from vector-api-client, add `http` - Remove test_invalid_url and test_connection_failure (assert nothing useful) - Update all callers to parse their string URL into Uri - Fix api.md title to "The Vector Observability API" and update stale grpcurl examples to use vector.observability.v1.ObservabilityService Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move `TapRunner`, `EventFormatter`, `OutputChannel`, and `TapExecutorError` into a new `runner` module gated by the `api` feature, and make the associated heavy deps (`vector-api-client`, `prost`, `bytes`, `serde_*`, etc.) optional. Also removes the unused `tokio-tungstenite` dep. Restores `vector-lib/api = ["vector-tap/api"]` so the feature activation chain is preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move `#[allow(clippy::print_stderr)]` to the `fn cmd` level in both
`src/top/cmd.rs` and `src/tap/cmd.rs` instead of per-statement blocks,
and inline `{url}` format captures where applicable. Also applies
rustfmt line-wrapping to service.rs and top.rs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The gRPC server already normalizes throughput values to per-second by dividing by `interval_secs` before streaming them. The `interval` field in the four `*Throughputs` EventType variants was therefore unused (`_interval`) and carried over from the old GraphQL client, which had to do the `v * (1000.0 / interval_ms)` normalization itself. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use OS entropy (thread RNG) instead of epoch-based seed for reservoir sampler RNG in service.rs; removes SystemTime/UNIX_EPOCH boilerplate - Return exitcode::USAGE (bad input) instead of exitcode::UNAVAILABLE when URL fails to parse in tap/top cmd - Rename tap_internal parameter initial_client -> mut client_opt, eliminating the intermediate local binding - Thread http::Uri through top::cmd -> subscription -> metrics::subscribe and metrics::init_components, removing the String -> Uri round-trip; re-export http::Uri from vector-api-client for callers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
thomasqueirozb
approved these changes
Mar 23, 2026
Contributor
thomasqueirozb
left a comment
There was a problem hiding this comment.
Very nice! Happy to see these abandoned graphql libraries being removed
…i-client Add http as a direct dep to vector-top and import http::Uri directly in metrics.rs and top/cmd.rs, rather than leaking it through a re-export in vector-api-client. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The multi_output_transform_reports_per_output_sent_events test uses a route transform, but the feature was not included in vector-api-tests, causing Vector to exit with CONFIG error (78) when starting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates Vector's internal API from GraphQL to gRPC, significantly reducing code complexity while maintaining full backward compatibility for
vector topandvector tap.Removed (GraphQL)
async-graphql,async-graphql-warpAdded (gRPC)
proto/vector/observability.prototonic/prost(already existing dependencies)vector topandvector tapto use gRPC streamingHow did you test this PR?
cargo run -- topcargo run -- tapvector_apiintegration tests (component discovery, config reload, multi-output per-output metrics, tap across reload)Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.