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

Update metric service to get aggregated metrics #472

Merged
merged 17 commits into from
Apr 26, 2024

Conversation

munishchouhan
Copy link
Member

closes #469
This PR will add the following

  1. This PR will add a function in counterProvider to get all matching data data using hscan
  2. This will add a method in metric service to get the count per org and total count
  3. Add new model for the response

When no date or ord is provided then metrics endpoint will return the above

@munishchouhan munishchouhan linked an issue Apr 24, 2024 that may be closed by this pull request
@munishchouhan munishchouhan self-assigned this Apr 24, 2024
@munishchouhan munishchouhan marked this pull request as draft April 24, 2024 12:43
@munishchouhan
Copy link
Member Author

Tested successfully in local
Screenshot 2024-04-24 at 16 34 38
Screenshot 2024-04-24 at 16 44 27

Screenshot 2024-04-24 at 16 42 28

@munishchouhan
Copy link
Member Author

Working on only getting the /metrics/o records from redis

@munishchouhan
Copy link
Member Author

Working on only getting the /metrics/o records from redis

Hscan uses glob pattern, so we need to get all the records in metrics/o/ and then filter out the relevant ones

@munishchouhan munishchouhan marked this pull request as ready for review April 25, 2024 11:07
@munishchouhan
Copy link
Member Author

@pditommaso its ready for review

@pditommaso
Copy link
Collaborator

Got an error trying this

» curl -u foo:bar http://localhost:9090/v1alpha2/metrics/fusion/pulls
{"message":"Cannot invoke \"java.util.Map.entrySet()\" because \"self\" is null - Error ID: 375c044c6d5f"}

@munishchouhan
Copy link
Member Author

Got an error trying this

» curl -u foo:bar http://localhost:9090/v1alpha2/metrics/fusion/pulls
{"message":"Cannot invoke \"java.util.Map.entrySet()\" because \"self\" is null - Error ID: 375c044c6d5f"}

fixed

Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso
Copy link
Collaborator

Ok, nice

Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso pditommaso merged commit 8ee9309 into master Apr 26, 2024
1 check passed
@pditommaso pditommaso deleted the 469-aggregate-metrics branch April 26, 2024 06:47
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.

Aggregate metrics
2 participants