• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

graphprotocol / indexer-rs / 20437899950
68%

Build:
DEFAULT BRANCH: main
Ran 22 Dec 2025 04:37PM UTC
Jobs 1
Files 97
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Dec 2025 04:31PM UTC coverage: 63.998% (+0.4%) from 63.642%
20437899950

push

github

web-flow
fix(tap-agent): eagerly initialize metrics at startup (#888)

* fix(tap-agent): eagerly initialize Prometheus metrics at startup

   Prometheus metrics in tap-agent are defined using LazyLock,
   which means
   they are only registered with the Prometheus registry when
   first
   accessed. If no senders have escrow accounts or pending
   allocations at
   startup, no SenderAccount actors are spawned, the metrics are
    never
   accessed, and /metrics returns empty.

   This fix creates init_metrics() functions that force all
   LazyLock metric
   statics to initialize at startup, ensuring they are
   registered with
   Prometheus before any sender activity occurs.

   Changes:
   - Make all metric static definitions pub(crate) in
   sender_account.rs,
     sender_allocation.rs, and sender_accounts_manager.rs
   - Add init_metrics() function to each module that
   dereferences each
     LazyLock to force initialization
   - Add public init_metrics() to agent.rs that calls all
   module-level
     init_metrics functions
   - Call agent::init_metrics() in main.rs before spawning the
   metrics
     server
   - Add test to verify all metrics are properly registered

* fix(tap-agent): clean up Prometheus gauges when actors stop

   Clean up sender and allocation-level gauge metrics when
   actors stop to
   prevent stale values from accumulating in Prometheus.

   Changes:
   - Clean up UNAGGREGATED_FEES_BY_VERSION gauge on allocation
   stop
   - Clean up INVALID_RECEIPT_FEES gauge on allocation stop
   - Clean up sender-level gauges (SENDER_DENIED,
   ESCROW_BALANCE,
     SENDER_FEE_TRACKER, MAX_FEE_PER_SENDER,
   RAV_REQUEST_TRIGGER_VALUE)
     in SenderAccount post_stop
   - Add tests to verify metric cleanup behavior

218 of 246 new or added lines in 5 files covered. (88.62%)

9887 of 15449 relevant lines covered (64.0%)

79.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
0.0
0.0% crates/tap-agent/src/main.rs
8
84.66
1.05% crates/tap-agent/src/agent/sender_account.rs
18
27.46
27.46% crates/tap-agent/src/agent.rs
Jobs
ID Job ID Ran Files Coverage
1 20437899950.1 22 Dec 2025 04:37PM UTC 97
64.0
GitHub Action Run
Source Files on build 20437899950
  • Tree
  • List 97
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20437899950
  • a7bef7e4 on github
  • Prev Build on main (#20111305854)
  • Next Build on main (#20442173449)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc