Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
74f4283
Circuit Breakers on Subgraph Execution
ardatan Apr 8, 2026
505dd34
docs: update documentation
theguild-bot Apr 8, 2026
17d2853
fixes
ardatan Apr 8, 2026
42ec510
docs: update documentation
theguild-bot Apr 8, 2026
541f998
Update lib/executor/src/executors/map.rs
ardatan Apr 8, 2026
e147a33
..
ardatan Apr 8, 2026
8a54b57
.
ardatan Apr 8, 2026
c18b1c3
docs: update documentation
theguild-bot Apr 8, 2026
a38a733
Changeset
ardatan Apr 9, 2026
8d4d2c1
..
ardatan Apr 9, 2026
647c8c6
Update lib/router-config/src/traffic_shaping.rs
ardatan Apr 9, 2026
ef7300e
Update lib/executor/Cargo.toml
ardatan Apr 9, 2026
0f9b01e
docs: update documentation
theguild-bot Apr 9, 2026
0f2c88a
Update docs/README.md
ardatan Apr 9, 2026
6602155
Address
ardatan Apr 9, 2026
fbec585
addressed
ardatan Apr 9, 2026
18de8ce
docs: update documentation
theguild-bot Apr 9, 2026
dda0978
Go
ardatan Apr 9, 2026
1da6569
..
ardatan Apr 9, 2026
5797f34
docs: update documentation
theguild-bot Apr 9, 2026
967fbb2
Fix typo
ardatan Apr 9, 2026
965ddde
docs: update documentation
theguild-bot Apr 9, 2026
0fb7484
Improvements
ardatan Apr 9, 2026
b249e93
Merge origin/main into circuit-breaker-subgraph: resolve conflicts in…
Copilot Apr 15, 2026
7a15ead
docs: regenerate README from merged schema
Copilot Apr 15, 2026
fcacdb7
Merge main into circuit-breaker-subgraph and resolve conflicts
Copilot Apr 15, 2026
e547ed8
Merge branch 'main' into circuit-breaker-subgraph
ardatan Apr 15, 2026
fca1aa9
Merge origin/main into circuit-breaker-subgraph: resolve conflicts
Copilot Apr 29, 2026
7489919
Address Devin comment
ardatan Apr 29, 2026
f63509c
docs: update documentation
theguild-bot Apr 29, 2026
40c27f0
fix: clone circuit breaker before await to avoid DashMap lock held ac…
Copilot Apr 29, 2026
8f852f7
..
ardatan Apr 30, 2026
237a3e4
5XX as errors tests
ardatan Apr 30, 2026
e3daccf
More
ardatan Apr 30, 2026
ce48ba7
docs: update documentation
theguild-bot Apr 30, 2026
d05da9c
Update JSON schema
ardatan Apr 30, 2026
24908e6
docs: update documentation
theguild-bot Apr 30, 2026
9ae8038
Lets go
ardatan May 4, 2026
22f32d6
Merge branch 'main' into circuit-breaker-subgraph
ardatan May 8, 2026
1cb1e24
docs: update documentation
theguild-bot May 8, 2026
7a5f42a
Reorder percentage module in mod.rs
ardatan May 8, 2026
ac63b56
Merge branch 'main' into circuit-breaker-subgraph
ardatan May 8, 2026
7d15c8f
Merge branch 'main' into circuit-breaker-subgraph
ardatan May 11, 2026
7458b74
More
ardatan May 13, 2026
f10bcc7
5xx
ardatan May 13, 2026
de18b34
Merge branch 'main' into circuit-breaker-subgraph
ardatan May 13, 2026
589848a
Merge branch 'main' into circuit-breaker-subgraph
ardatan May 13, 2026
fa1714e
Half-open
ardatan May 13, 2026
dc56559
fix: update inaccurate comments in error.rs and circuit_breaker.rs
Copilot May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/circuit-breaker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
hive-router: patch
hive-router-plan-executor: patch
hive-router-config: patch
hive-console-sdk: patch
---

# Implement Circuit Breaker for Subgraph Requests

This change introduces a circuit breaker mechanism for subgraph requests in the Hive Router. The circuit breaker will monitor the success and failure rates of requests to each subgraph and will prevent future requests if the failure rate exceeds a certain threshold. When the circuit breaker is opened, subsequent requests to that subgraph will fail immediately without attempting to send the request.

This implementation helps improve the resilience and stability of the Hive Router when dealing with unreliable subgraphs.
24 changes: 24 additions & 0 deletions .changeset/record-subgraph-execution-errors-on-span.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
hive-router: patch
hive-router-plan-executor: patch
---

# Record subgraph execution errors on the `graphql.subgraph.operation` span

Errors raised while preparing or executing a subgraph fetch
(`PlanExecutionError`) are now attached to the corresponding
`graphql.subgraph.operation` span instead of only surfacing on the
top-level `graphql.operation` span via the response-error pipeline.

For each failing fetch the span now carries:
- `hive.graphql.error.count = 1`,
- `hive.graphql.error.codes` set to the error code (e.g.
`SUBGRAPH_REQUEST_TIMEOUT`, `HEADER_PROPAGATION_FAILURE`,
`SUBGRAPH_CIRCUIT_BREAKER_REJECTED`, …), and
- a `graphql.error` event with `error.type`, `error.message`, and
`hive.error.subgraph_name`.

Previously these subgraph-level spans looked "ok" even when the fetch
never produced a response, which was misleading in tracing UIs that
highlight failing spans. The error is now visible at the subgraph hop
where it actually originated.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ strum = { version = "0.28.0", features = ["derive"] }
mockito = "1.7.0"
futures-util = "0.3.31"
axum = "0.8.4"
recloser = "1.3.1"
notify = "8.2.0"
ipnet = "2.12.0"

Expand Down
136 changes: 134 additions & 2 deletions docs/README.md

Large diffs are not rendered by default.

Loading
Loading