You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+36-1
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@
61
61
-[Installation](#installation)
62
62
-[Usage](#usage)
63
63
-[Configuration](#configuration)
64
+
-[Metrics](#metrics)
64
65
-[Docker](#docker)
65
66
-[Development](#development)
66
67
-[See Also](#see-also)
@@ -122,9 +123,15 @@ logJson: false
122
123
# Set the host where the application should bind to.
123
124
host: localhost
124
125
# Set the port where the application should bind to.
125
-
port: 3000
126
+
port: 1414
126
127
# Set the context path (aka base-url) portkey is hosted under. Must not be specified unless you're using a reverse proxy and are hosting portkey under a directory. If that's the case then you can set this value to e.g. /portkey or whatever the directory is called. Note that the forward slash (/) in the beginning is required!
127
128
contextPath: ""
129
+
# Enables the HTTP server that serves metrics that can be scraped by e.g. Prometheus.
130
+
enableMetrics: false
131
+
# Set the host where the metrics server should bind to.
132
+
metricsHost: localhost
133
+
# Set the port where the metrics server should bind to.
134
+
metricsPort: 1515
128
135
```
129
136
130
137
### Styling
@@ -190,6 +197,34 @@ pages:
190
197
It also supports using <strong>HTML</strong>!
191
198
```
192
199
200
+
## Metrics
201
+
202
+
Metrics can be enabled with the `enableMetrics` configuration key and are served on a dedicated HTTP server. By default they are served on `http://localhost:1515/metrics`. Use this address to configure your tool of choice (e.g. [Prometheus](https://prometheus.io/)) to scrape the exported metrics.
203
+
204
+
Besides the default metrics provided by the [Prometheus instrumentation library for Go applications ](https://github.com/prometheus/client_golang), the following additional metrics are provided:
205
+
206
+
```plain
207
+
# HELP portkey_page_handler_requests_total Total number of HTTP requests by page.
208
+
# TYPE portkey_page_handler_requests_total counter
0 commit comments