Skip to content

Conversation

@red-0ne
Copy link
Contributor

@red-0ne red-0ne commented May 24, 2025

Summary

Implement service usage metrics tracking for applications and suppliers

Primary Changes:

  • Add service_usage_metrics field to both Application and Supplier proto messages
  • Create efficient storage mechanism for metrics with separate index stores
  • Implement hydration/dehydration pattern to optimize performance when metrics aren't needed
  • Update claim processing to track relay volume and compute units per service

Secondary changes:

  • Add helper methods to update metrics during claim settlement
  • Update application and supplier test fixtures
  • Create merge functions for metrics during application transfers

Issue

Type of change

Select one or more from the following:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Sanity Checklist

  • I have updated the GitHub Issue Metadata: assignees, reviewers, labels, project, iteration and milestone
  • For docs: make docusaurus_start
  • For small changes: make go_develop_and_test and make test_e2e
  • For major changes: devnet-test-e2e label to run E2E tests in CI
  • For migration changes: make test_e2e_oneshot
  • 'TODO's, configurations and other docs

@red-0ne red-0ne added this to the MainNet Readiness & Launch milestone May 24, 2025
@red-0ne red-0ne self-assigned this May 24, 2025
@red-0ne red-0ne added application Changes related to the Application actor supplier Changes related to the Supplier actor labels May 24, 2025
@red-0ne red-0ne added this to Shannon May 24, 2025
@red-0ne red-0ne added on-chain On-chain business logic Metrics Any work or effort related to onchain metrics labels May 24, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon May 24, 2025
@github-actions github-actions bot added the consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. label May 24, 2025
@red-0ne red-0ne moved this from 📋 Backlog to 👀 In review in Shannon May 24, 2025
Copy link
Collaborator

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

@red-0ne Publishing a very preliminary review.

Relying on @bryanchriswhite to review this as well.

@Olshansk Olshansk changed the title [Metrics] Implement onchain cumulative relay_count and compute_units per service_id [Metrics] Implement onchain cumulative relay_count and compute_units per service_id May 29, 2025
@github-actions
Copy link

github-actions bot commented Jun 1, 2025

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 1365)
Grafana network dashboard for devnet-issue-1365

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Jun 1, 2025
@red-0ne red-0ne requested a review from Olshansk June 9, 2025 13:04
Copy link
Collaborator

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

@red-0ne This PR:

  1. Has gotten huge
  2. Is definitely "good enough" for us to iterate
  3. Too big for me to give any good feedback at this point
  4. I'm getting "PR fatigue" and just want to get it over the finish line.

My only remaining question/concern is about the protocol upgrade.

I'm approving the PR, but is there anything we need to do in vNext?

I realize we're only adding things, so my gut says "no", but I want to be ultra careful about this.

@red-0ne red-0ne requested review from Olshansk and jorgecuesta June 30, 2025 11:17
@red-0ne
Copy link
Contributor Author

red-0ne commented Jun 30, 2025

@Olshansk

My only remaining question/concern is about the protocol upgrade.

I'm approving the PR, but is there anything we need to do in vNext?

I realize we're only adding things, so my gut says "no", but I want to be ultra careful about this.

I tested it against a localnet migration, worked well by starting to show onchain metrics

@Olshansk
Copy link
Collaborator

@red-0ne Per this plan, let's prioritize this in v0.1.28.

Screenshot 2025-07-17 at 11 45 46 AM

@Olshansk Olshansk changed the title [Metrics] Implement onchain cumulative relay_count and compute_units per service_id [WIP][Metrics] Implement onchain cumulative relay_count and compute_units per service_id Sep 24, 2025
@Olshansk Olshansk marked this pull request as draft September 24, 2025 21:51
@Olshansk
Copy link
Collaborator

@red-0ne Moved this to WIP, but we will prioritize getting this in sooner rather than later.

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 1365)
Grafana network dashboard for devnet-issue-1365

@github-actions github-actions bot added the devnet label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application Changes related to the Application actor consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. devnet devnet-test-e2e Metrics Any work or effort related to onchain metrics on-chain On-chain business logic push-image CI related - pushes images to ghcr.io supplier Changes related to the Supplier actor

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

6 participants