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

Rack run example fixed #270

Merged
merged 4 commits into from
Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ run ->(_) { [200, {'content-type' => 'text/html'}, ['OK']] }
```

Start the server and have a look at the metrics endpoint:
[http://localhost:5000/metrics](http://localhost:5000/metrics).
[http://localhost:5123/metrics](http://localhost:5123/metrics).

For further instructions and other scripts to get started, have a look at the
integrated [example application](examples/rack/README.md).
Expand Down
4 changes: 2 additions & 2 deletions examples/rack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ bundle install
bundle exec unicorn -c ./unicorn.conf
```

You can now open the [example app](http://localhost:5000/) and its [metrics
page](http://localhost:5000/metrics) to inspect the output. The running
You can now open the [example app](http://localhost:5123/) and its [metrics
page](http://localhost:5123/metrics) to inspect the output. The running
Prometheus server can be used to [play around with the metrics][rate-query].

[rate-query]: http://localhost:9090/graph#%5B%7B%22range_input%22%3A%221h%22%2C%22expr%22%3A%22rate(http_server_requests_total%5B1m%5D)%22%2C%22tab%22%3A0%7D%5D
Expand Down
2 changes: 1 addition & 1 deletion examples/rack/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ scrape_configs:
- job_name: "rack-example"
static_configs:
- targets:
- "localhost:5000"
- "localhost:5123"
6 changes: 3 additions & 3 deletions examples/rack/run
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ if ! installed vegeta; then
fatal "Could not find go. Either run the examples manually or install"
fi

go get github.com/tsenart/vegeta
go install github.com/tsenart/vegeta
go get github.com/tsenart/vegeta # versions of Go < 1.18
go install github.com/tsenart/vegeta@latest # versions of Go >= 1.18
fi

PORT=5000
PORT=5123
URL=http://127.0.0.1:${PORT}/

log "starting example server"
Expand Down
2 changes: 1 addition & 1 deletion examples/rack/unicorn.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
listen 5000
listen 5123
worker_processes 1
preload_app true