-
Notifications
You must be signed in to change notification settings - Fork 79
Http stats #163
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
base: master
Are you sure you want to change the base?
Http stats #163
Conversation
…display HTTP codes and backend latencies. It also allows contact for localhost:<>/debug/vars to see internal server information including requests. This is disabled by default. Also fixes a race condition found during testing. ```go build -o ~/bin/inverting-proxy ./server
go build -o ~/bin/proxy-forwarding-agent ./agent
go build -o ~/bin/inverting-proxy-run-local testing/runlocal/main.go
GOPATH=$HOME ~/bin/inverting-proxy-run-local --port 8081
cd ~/inverting-proxy
go test -race -v ./agent/sessions/...
go test -race -v ./agent/stats/...
go test -race -v ./agent/metrics/...
go test -race -v ./agent/utils/...
go test -race -v ./agent/websockets/...
go test -race -v ./agent/...``` used watch -n 5 "curl -s http://localhost:3000 | lynx -stdin -dump" and hey -z 1m -q 10 http://127.0.0.1:8081/
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Can you give more background on what the goal is with this change? In particular, I'm surprised that we would host these metrics on a local server rather than pushing them to StackDriver monitoring. |
|
@ojarjur the goal was to use the existing Health agent that pushes metrics via OpenTelemetry and can keep track of Proxy connection. The goal is to solve 2 problems: 1) Currently only by querying |
Add support for HTTP stats server that initialize a HTTP server and display HTTP codes and backend latencies. It also allows contact for localhost:<>/debug/vars to see internal server information including requests. This is disabled by default. Also fixes a race condition found during testing.
Build local server
Testing
To watch local page, used lynx:
and hey
to generate requests.
Example: