Component(s)
studio
Component version
0.165.0
wgc version
N/A
controlplane version
0.218.1
router version
N/A
What happened?
Description
wg.cosmo.platform.v1.RequestSeriesItem.totalRequests and erroredRequests, plus OperationRequestCount.totalRequests, are typed int32 in proto/wg/cosmo/platform/v1/platform.proto. For high-throughput federated graphs, per-bucket aggregations exceed int32 max and Studio's federated-graph dashboard fails to load.
This is most likely to surface at the larger granules. getWeeklyRequestSeries aggregates with toStartOfDay (one bucket per day), and getRequestSeries uses 1-hour buckets for the 30-day Studio view. A graph sustaining ~600k RPS hits the int32 ceiling within a single hourly bucket; daily buckets cross it at ~25k RPS sustained.
The underlying ClickHouse columns are already UInt64 (migration line 10), so the int32 ceiling is a wire-format bottleneck only.
Reproduced on @wundergraph/cosmo-connect@0.140.0, controlplane 0.218.1, studio 0.165.0.
Steps to Reproduce
- Have a federated graph with traffic high enough that a single bucket in
cosmo.operation_request_metrics_5_30 aggregates over int32 max for one (FederatedGraphID, OrganizationID).
- As a quick reproduction without real traffic, insert a row directly:
INSERT INTO cosmo.operation_request_metrics_5_30
(Timestamp, OperationName, OperationHash, TotalRequests, TotalErrors, FederatedGraphID, OrganizationID, OperationType, RouterConfigVersion, IsSubscription, ClientName, ClientVersion)
VALUES
(now(), 'TestOp', 'hash', 2335440880, 0, '<your-fed-graph-id>', '<your-org-id>', 'query', 'v1', false, 'test', '1.0');
- Open Studio and load
/<orgSlug>/<namespace>/graph/<graphName> — the dashboard view that calls GetFederatedGraphs with includeMetrics: true.
Expected Result
The dashboard loads and renders the request-series chart with the correct value.
Actual Result
Studio fails to load with:
[unknown] cannot decode field wg.cosmo.platform.v1.RequestSeriesItem.totalRequests from JSON: 2335440880: invalid int 32: 2335440880
Proposed fix
Widen the fields to int64 and the generated typescript will type the fields as bigint.
message RequestSeriesItem {
string timestamp = 1;
int64 totalRequests = 2;
int64 erroredRequests = 3;
}
message OperationRequestCount {
string operationHash = 1;
string operationName = 2;
int64 totalRequests = 3;
}
Happy to send a PR.
Environment information
Environment
OS: (N/A
Package Manager: npm
Compiler(if manually compiled): N/A
Router configuration
Router execution config
Log output
Additional context
No response
Component(s)
studio
Component version
0.165.0
wgc version
N/A
controlplane version
0.218.1
router version
N/A
What happened?
Description
wg.cosmo.platform.v1.RequestSeriesItem.totalRequestsanderroredRequests, plusOperationRequestCount.totalRequests, are typedint32inproto/wg/cosmo/platform/v1/platform.proto. For high-throughput federated graphs, per-bucket aggregations exceed int32 max and Studio's federated-graph dashboard fails to load.This is most likely to surface at the larger granules.
getWeeklyRequestSeriesaggregates withtoStartOfDay(one bucket per day), andgetRequestSeriesuses 1-hour buckets for the 30-day Studio view. A graph sustaining ~600k RPS hits the int32 ceiling within a single hourly bucket; daily buckets cross it at ~25k RPS sustained.The underlying ClickHouse columns are already
UInt64(migration line 10), so the int32 ceiling is a wire-format bottleneck only.Reproduced on
@wundergraph/cosmo-connect@0.140.0, controlplane 0.218.1, studio 0.165.0.Steps to Reproduce
cosmo.operation_request_metrics_5_30aggregates over int32 max for one(FederatedGraphID, OrganizationID)./<orgSlug>/<namespace>/graph/<graphName>— the dashboard view that callsGetFederatedGraphswithincludeMetrics: true.Expected Result
The dashboard loads and renders the request-series chart with the correct value.
Actual Result
Studio fails to load with:
Proposed fix
Widen the fields to
int64and the generated typescript will type the fields asbigint.Happy to send a PR.
Environment information
Environment
OS: (N/A
Package Manager: npm
Compiler(if manually compiled): N/A
Router configuration
N/ARouter execution config
N/ALog output
Additional context
No response