Skip to content

Commit fca3e40

Browse files
committed
Introduce some metrics about endpoints and their arguments/outcomes
1 parent 1fa7453 commit fca3e40

File tree

5 files changed

+683
-51
lines changed

5 files changed

+683
-51
lines changed

ui/Cargo.lock

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ router = "0.6.0"
2929
openssl-probe = "0.1.2"
3030
dotenv = "0.15.0"
3131
snafu = "0.6.0"
32+
prometheus = "0.12.0"
33+
strum = { version = "0.20.0", features = ["derive"] }
3234

3335
[dependencies.playground-middleware]
3436
git = "https://github.com/integer32llc/playground-middleware"

ui/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ disk in this directory.
66
In production, these should be set according to your deployment method
77
of choice.
88

9-
| Key | Required | Default Value | Description |
10-
| --------------------------|----------|-----------------|-------------------------------------------------------------------------|
11-
| `PLAYGROUND_UI_ROOT` | **Yes** | | The path to the HTML, CSS, and Javascript files |
12-
| `PLAYGROUND_GITHUB_TOKEN` | **Yes** | | The [GitHub API token][gist] to read and write Gists |
13-
| `PLAYGROUND_UI_ADDRESS` | No | 127.0.0.1 | The address to listen on |
14-
| `PLAYGROUND_UI_PORT` | No | 5000 | The port to listen on |
15-
| `PLAYGROUND_LOG_FILE` | No | access-log.csv | The file to record accesses |
16-
| `PLAYGROUND_CORS_ENABLED` | No | | If set, will enable CORS support |
17-
| `TMPDIR` | No | system-provided | Where compilation artifacts will be saved. Must be accessible to Docker |
9+
| Key | Required | Default Value | Description |
10+
| -------------------------- | ---------- | ----------------- | ------------------------------------------------------------------------- |
11+
| `PLAYGROUND_UI_ROOT` | **Yes** | | The path to the HTML, CSS, and Javascript files |
12+
| `PLAYGROUND_GITHUB_TOKEN` | **Yes** | | The [GitHub API token][gist] to read and write Gists |
13+
| `PLAYGROUND_UI_ADDRESS` | No | 127.0.0.1 | The address to listen on |
14+
| `PLAYGROUND_UI_PORT` | No | 5000 | The port to listen on |
15+
| `PLAYGROUND_LOG_FILE` | No | access-log.csv | The file to record accesses |
16+
| `PLAYGROUND_METRICS_TOKEN` | No | | If set, will require authentication for the metrics endpoint |
17+
| `PLAYGROUND_CORS_ENABLED` | No | | If set, will enable CORS support |
18+
| `TMPDIR` | No | system-provided | Where compilation artifacts will be saved. Must be accessible to Docker |
1819

1920
[dotenv]: https://crates.io/crates/dotenv
2021
[gist]: https://developer.github.com/v3/gists/#authentication

0 commit comments

Comments
 (0)