Add optional statistics to API and web UI.
A new option (--web.statistics) enables the collection of some basic information about requests and responses. This currently consists of the most recent 10 requests that resulted in HTTP 4xx or 5xx errors.
This commit is contained in:
parent
14db2343c9
commit
05f6b79e29
10 changed files with 199 additions and 11 deletions
|
@ -228,3 +228,8 @@ type Digest struct {
|
|||
func CanonicalDomain(domain string) string {
|
||||
return strings.ToLower(strings.TrimSpace(domain))
|
||||
}
|
||||
|
||||
// Statistics provides options for monitoring request and response stats
|
||||
type Statistics struct {
|
||||
RecentErrors int `description:"Number of recent errors logged"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue