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

Add Metrics() to HTTP an GRPC proxies #274

Merged
merged 6 commits into from
Aug 18, 2023
Merged

Add Metrics() to HTTP an GRPC proxies #274

merged 6 commits into from
Aug 18, 2023

Conversation

roobre
Copy link
Member

@roobre roobre commented Aug 2, 2023

Description

This PR introduces a new Metrics method to the Proxy interface. The main motivation for this is provide proxies a way to keep track of and record the number of requests they handle, which then can be used to aid in troubleshooting functionality such as #223.

The newly added method is very slim and proxy implementations that do not support metrics can simply return nil.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make test) and all tests pass.
  • I have run relevant e2e test locally (make e2e-xxx for agent, disruptors, kubernetes or cluster related changes)
  • Any dependent changes have been merged and published in downstream modules

@roobre roobre changed the title Proxy metrics Add Metrics() to Proxy interface Aug 2, 2023
@roobre roobre marked this pull request as ready for review August 3, 2023 14:03
@roobre roobre force-pushed the http-proxy-refactor branch 2 times, most recently from d42d0b5 to 0517bd8 Compare August 5, 2023 17:57
Base automatically changed from http-proxy-refactor to main August 7, 2023 11:12
@roobre roobre force-pushed the proxy-metrics branch 3 times, most recently from 385151c to a77e949 Compare August 17, 2023 14:53
@roobre roobre changed the title Add Metrics() to Proxy interface Add Metrics() to HTTP an GRPC proxies Aug 17, 2023
pkg/agent/protocol/protocol.go Show resolved Hide resolved
pkg/agent/protocol/protocol.go Outdated Show resolved Hide resolved
metrics: add MetricMap as a helper to work with metrics
@pablochacin pablochacin merged commit b3a1ae1 into main Aug 18, 2023
6 checks passed
@pablochacin pablochacin deleted the proxy-metrics branch August 18, 2023 12:38
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