Field level usage metrics with errors#8062
Open
jdolle wants to merge 67 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This migration adds tables and materialized views for tracking GraphQL coordinate errors. Feedback focuses on schema optimizations and consistency, specifically: removing LowCardinality from the short-lived source table, standardizing ZSTD(1) codecs for hash columns, applying LowCardinality to coordinate strings in aggregated tables, ensuring consistent UUID types for target columns, and adding missing database prefixes to materialized view names.
Contributor
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
Contributor
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.48.2-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.60.2-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.22.0-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.7-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-plugin-console-sdk |
0.1.0-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.48.2-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
hive |
11.4.0-alpha-20260612231313-3b03aa0a1cfd7c59e95bf2849f17005ca7b6817e |
npm ↗︎ unpkg ↗︎ |
jdolle
commented
May 29, 2026
…n count column to operations table
…e-errors.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…e-errors.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…e-errors.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…e-errors.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…stion works with new plugin
1a2d10d to
7fd451f
Compare
n1ru4l
reviewed
Jun 9, 2026
n1ru4l
reviewed
Jun 9, 2026
…d if to include a warning
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Background
Part of the subgraph visibility initiative. This PR adds coordinate level resolution count tracking, and tracks errors for coordinates by error code.
This can be broken down into several components:
Description
The tables and materialized views are in Clickhouse. These support two query patterns -- only centered around the coordinates and another that is hash (operation) specific.
This supports our two current usage patterns -- the first being in use today on the explorer page, and the other being a proposed new feature to show the success/error results by field inside an operation. In either case, we want to support filtering by other metrics such as the error code.
The Hive client has been adjusted to add a subgraph call between starting and sending the request data to be batched. Field counts are added to the existing operations data and a new structure is being submitted for errors.
Rather than use a materialized view from the source table for every time period, I've introduced cascading updates. This can impact insert time, but these materialized views are inexpensive (no joins or costly functions), so I do not anticipate an issue. Regardless, it may be best to enable async inserts in the future if we've not already done so.
Gateway Benchmark Comparison
To ensure gateway performance is not impacted too heavily, a benchmark was ran. This was ran locally, in constant mode, with 10 cpu. Here are the results:
No Usage Reporting
With Usage Reporting
With Gateway Plugin Usage Reporting