ratelimit icon indicating copy to clipboard operation
ratelimit copied to clipboard

Add detailed metrics

Open jdamata opened this issue 2 years ago • 12 comments

This was partially implemented in https://github.com/envoyproxy/ratelimit/pull/242

Pretty much tried to massage the missing parts from this PR https://github.com/envoyproxy/ratelimit/pull/237 into main.

jdamata avatar Mar 18 '22 18:03 jdamata

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Apr 17 '22 20:04 github-actions[bot]

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Apr 25 '22 00:04 github-actions[bot]

@jdamata I am interested in this functionality. Is this PR ready to be reviewed or are more changes required?

bkthomps avatar Aug 03 '22 05:08 bkthomps

I think this is ready for review, was using the ratelimit with this PR for a few weeks in a load testing environment and it was working without issues.

I think some of the checks were failing because of linting but otherwise good to go

jdamata avatar Aug 03 '22 20:08 jdamata

Ok sounds good thanks. @jdamata just to confirm, when the flag is enabled, stats are created as if the config had each value in it for each value matched?

bkthomps avatar Aug 09 '22 03:08 bkthomps

Like lets say the config has descriptors: key: user rate_limit: ...

And user a and b both match, then the stats will be domain.user.a.total_hits and domain.user.b.total_hits, etc ?

bkthomps avatar Aug 09 '22 03:08 bkthomps

Yep exactly

jdamata avatar Aug 09 '22 03:08 jdamata

@mattklein123 @ysawa0 could one of you take a look at this PR please (to rerun the tests since the logs have been deleted)?

bkthomps avatar Aug 09 '22 04:08 bkthomps

Please merge main and make sure CI is passing, thanks!

mattklein123 avatar Aug 09 '22 14:08 mattklein123

@jdamata could you rebase from main please so the build checks pass? Thanks. Also, if you need help fixing the tests let me know.

bkthomps avatar Aug 09 '22 20:08 bkthomps

@jdamata you might need to force push with "Signed-off-by: Joel Damata [email protected]" as the commit message since the last commit didn't have it making the DCO check fail.

bkthomps avatar Aug 10 '22 00:08 bkthomps

@jdamata Just wanted to follow up on this. Could you force push to get DCO to pass? You'll have to also make the PR be from your feature branch to main, as right now it's the opposite. Thanks.

bkthomps avatar Aug 16 '22 08:08 bkthomps

hey any news on this?

medalliaerlich avatar Aug 19 '22 19:08 medalliaerlich

@jdamata looks good! Could check that failing test? I think it's formatting issues. Thanks.

bkthomps avatar Aug 23 '22 17:08 bkthomps

@jdamata did you see the above?

bkthomps avatar Aug 30 '22 21:08 bkthomps

Hi, is there any update on this?

junhuang-pin avatar Sep 21 '22 03:09 junhuang-pin

@jdamata Thanks for updating this. Looks to be a very in-demand PR. Could you fix the DCO check? You'll have to force push with "Signed-off-by: Joel Damata [email protected]" as the commit message. Thanks.

bkthomps avatar Sep 21 '22 17:09 bkthomps

@jdamata DCO seems to still be failing. The error message is: Author: damatj, Committer: damatj; Expected "damatj [[email protected]]", but got "Joel Damata [[email protected]]"

You'll need to change the author and force push again with the new audit of "damatj". Thanks!

bkthomps avatar Sep 21 '22 18:09 bkthomps

@mattklein123 Hi, could you run the build checks please?

bkthomps avatar Sep 21 '22 18:09 bkthomps

@jdamata hi, don't know if you saw but there's a failing test: ratelimit_test.go:207

bkthomps avatar Sep 22 '22 19:09 bkthomps

@jdamata Is there an update on the failing test? Thank you!

hardik42 avatar Sep 23 '22 17:09 hardik42

Hi, @jdamata! Can you, please, give us an estimate on when this can be merged, so we can plan accordingly? We're depending on this to move forward with our project. Appreciate it!

cathoderay avatar Sep 23 '22 18:09 cathoderay

@jdamata sorry to bother you, but many people are looking forward to your addition.

If you are not able to work on it, I can help if you want?

bkthomps avatar Sep 27 '22 18:09 bkthomps

@jdamata sorry to bother you, but many people are looking forward to your addition.

If you are not able to work on it, I can help if you want?

No worries! Sorry yah I've been busy with work lately. I'd appreciate the help if you got the time.

I don't care for the git commit credit so if you want to branch out, close this pr and open a new one by all means go for it!

jdamata avatar Sep 27 '22 21:09 jdamata

Ok sounds good, I'll do that. Just to confirm, you said this is working when you tested it for your purposes right?

bkthomps avatar Sep 27 '22 21:09 bkthomps

Ok sounds good, I'll do that. Just to confirm, you said this is working when you tested it for your purposes right?

Yep, I had built my own docker image from this branch and had it working in a performance environment. Didn't notice any issues. Was able to get Prometheus to display metrics for header values and grafana graphs. I think that's what people are after

jdamata avatar Sep 27 '22 22:09 jdamata

I will close this out and someone can open a new PR.

mattklein123 avatar Sep 29 '22 22:09 mattklein123