Skip to content

feat: add fanout failure and target health metrics and v0.1.2 - #56

Open
Kemperino wants to merge 8 commits into
mainfrom
kempy/tx-proxy-fanout-health-metrics
Open

feat: add fanout failure and target health metrics and v0.1.2#56
Kemperino wants to merge 8 commits into
mainfrom
kempy/tx-proxy-fanout-health-metrics

Conversation

@Kemperino

@Kemperino Kemperino commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
  • Complete failures are now counted correctly, including when fan_request() returns an error.
  • Builder and L2 failures are distinguishable via fanout.
  • Every target gets a current-health gauge keyed by sanitized host:port.
  • We can alert specifically on:- High absolute count of requests where all targets failed. One target continuously reporting 0 for 20 minutes.

Note

Cursor Bugbot is generating a summary for commit 40c8c03. Configure here.

Comment thread src/cli.rs Outdated
Comment thread src/fanout.rs
Comment thread src/metrics.rs
Comment on lines +27 to +34
describe_counter!(
"fanout_total_failures",
"Fanout requests where every target failed"
);
describe_gauge!(
"fanout_target_healthy",
"Whether the latest request to a fanout target succeeded"
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is inconsistent with the current setup

I think we should move these as fields into the ProxyMetrics struct

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also this made me notice that:

  1. We're not calling ProxyMetrics::describe anywhere - and we should

As per the Metrics macro docs:

creates a [Default](https://doc.rust-lang.org/stable/core/default/trait.Default.html) implementation for the struct registering all of
the metrics.

so we should just remove ProxyMetrics::new entirely and just call ::default()

Comment thread src/metrics.rs Outdated
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.

2 participants