Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support operator APIs #987

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Conversation

jianoaix
Copy link
Contributor

@jianoaix jianoaix commented Dec 11, 2024

Why are these changes needed?

Implementing dataapi v2 (#955)

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@jianoaix jianoaix requested review from pschork, ian-shim and dmanc and removed request for pschork December 11, 2024 23:59
func (s *ServerV2) FetchOperatorsStake(c *gin.Context) {
errorResponse(c, errors.New("FetchOperatorsStake unimplemented"))
timer := prometheus.NewTimer(prometheus.ObserverFunc(func(f float64) {
s.metrics.ObserveLatency("FetchOperatorsStake", f*1000) // make milliseconds
Copy link
Contributor

Choose a reason for hiding this comment

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

These can be replaced with grpc interceptor?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wait dataapi is http, but I think similar concept might apply?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks a hobby project, otherwise we could drop these primitive level metrics in application layer.

@jianoaix jianoaix merged commit cfdf4fd into Layr-Labs:master Dec 13, 2024
6 checks passed
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