Skip to content

Commit

Permalink
Add simple metrics endpoint for rageshake.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkaye committed Nov 8, 2023
1 parent 9eea434 commit 1f05236
Show file tree
Hide file tree
Showing 4 changed files with 556 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ Optional parameters:
[rageshake.sample.yaml](rageshake.sample.yaml) for more information.
* `-listen <address>`: TCP network address to listen for HTTP requests
on. Example: `:9110`.
* `-metrics <address>`: TCP network address to listen for HTTP requests
for prometheus metrics on. Example: `:9111`. Defaults to not being served.

## HTTP endpoints

The following HTTP endpoints are exposed:

### GET `/health`

Returns a simple "ok" if the server is healthy, for use with automated healthchecks.

### GET `/api/listing/`

Serves submitted bug reports. Protected by basic HTTP auth using the
Expand Down Expand Up @@ -100,6 +106,10 @@ The response (if successful) will be a JSON object with the following fields:
* `report_url`: A URL where the user can track their bug report. Omitted if
issue submission was disabled.

### /metrics

If the metrics address is configured with `-metrics` then prometheus metrics are visible here.

## Notifications

You can get notifications when a new rageshake arrives on the server.
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ go 1.16
require (
github.com/google/go-github v0.0.0-20170401000335-12363ffc1001
github.com/jordan-wright/email v4.0.1-0.20200824153738-3f5bafa1cd84+incompatible
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/xanzy/go-gitlab v0.50.2
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288
gopkg.in/yaml.v2 v2.2.8
golang.org/x/oauth2 v0.8.0
gopkg.in/yaml.v2 v2.4.0
)
Loading

0 comments on commit 1f05236

Please sign in to comment.