Skip to content

feat: add network label to prometheus metrics#569

Open
silent-cipher wants to merge 5 commits into
refactor/add-network-to-schemafrom
feat/prometheum-network-label
Open

feat: add network label to prometheus metrics#569
silent-cipher wants to merge 5 commits into
refactor/add-network-to-schemafrom
feat/prometheum-network-label

Conversation

@silent-cipher
Copy link
Copy Markdown
Collaborator

Built on top of #463

@FilOzzy FilOzzy added this to FOC May 23, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 23, 2026
@silent-cipher silent-cipher requested a review from Copilot May 23, 2026 08:44
@silent-cipher silent-cipher self-assigned this May 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Dealbot’s Prometheus metrics to include a network label, aligning metrics emission with the multi-network schema work introduced in #463 and preventing cross-network metric collisions.

Changes:

  • Adds network to Prometheus label sets for check metrics, job/queue metrics, wallet balance, and storage provider gauges.
  • Updates metric label builders and call sites to consistently include network.
  • Adjusts unit tests to assert the new label behavior.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/backend/src/retrieval/retrieval.service.ts Adds network to retrieval check metric labels.
apps/backend/src/pull-check/pull-check.service.ts Adds network to pull-check metric labels.
apps/backend/src/metrics-prometheus/wallet-balance.collector.ts Emits wallet balance metrics labeled by network.
apps/backend/src/metrics-prometheus/metrics-prometheus.module.ts Updates Prometheus metric definitions to include network in labelNames.
apps/backend/src/metrics-prometheus/check-metrics.service.ts Ensures deal-derived labels include network.
apps/backend/src/metrics-prometheus/check-metric-labels.ts Extends label types/builder to require and return network.
apps/backend/src/jobs/jobs.service.ts Adds network to storage provider gauges and pg-boss/job metrics emissions.
apps/backend/src/jobs/jobs.service.spec.ts Updates job metric expectations to include network.
apps/backend/src/deal/deal.service.ts Adds network to data storage + dataset creation metric labels.
apps/backend/src/deal/deal.service.spec.ts Updates deal metric label expectations to include network.
apps/backend/src/deal-addons/strategies/ipni.strategy.spec.ts Updates IPNI strategy tests to include network in metric labels.
apps/backend/src/data-retention/data-retention.service.ts Adds network to data-retention metric labels and standardizes config access.
apps/backend/src/data-retention/data-retention.service.spec.ts Updates data-retention metric assertions to include network.

Comment thread apps/backend/src/metrics-prometheus/check-metric-labels.ts Outdated
Comment thread apps/backend/src/deal-addons/strategies/ipni.strategy.spec.ts Outdated
@silent-cipher silent-cipher requested a review from SgtPooki May 25, 2026 03:54
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FOC May 25, 2026
@rjan90 rjan90 added this to the M4.2: mainnet GA milestone May 25, 2026
Comment thread apps/backend/src/pull-check/pull-check.service.ts Outdated
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✔️ Approved by reviewer

Development

Successfully merging this pull request may close these issues.

5 participants