feat: add responseWrapper to exclude errors (status codes >= 400) from being reported

This commit is contained in:
Oleh Astappiev 2024-12-08 21:46:35 +01:00
parent 02f9dd951c
commit a978d4921d
No known key found for this signature in database
GPG key ID: 37D7AC22589E9632
4 changed files with 78 additions and 6 deletions

View file

@ -86,6 +86,7 @@ entryPoints:
|---------------------|-------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `disabled` | false | `bool` | Set to `true` to disable the plugin |
| `debug` | false | `bool` | Something doesn't work? Set to `true` to see more logs (plugins doesn't have access to Traefik's log level) |
| `queueSize` | 1000 | `int` | The maximum number of events that can be queued before they are sent to the Umami server |
| `umamiHost` | - | `string` | Umami server url, reachable from within traefik (container), e.g. `http://umami:3000` |
| `umamiToken` | - | `string` | An API Token, used to automatize work with websites, not needed if you provide `websites` |
| `umamiUsername` | - | `string` | An alternative to `umamiToken`, you can provide an username and password |
@ -93,6 +94,7 @@ entryPoints:
| `umamiTeamId` | - | `string` | In order to organize websites, you can use Umami Teams |
| `websites` | - | `map` | A map of hostnames and their associated Umami IDs. Can also be used to override or extend fetched websites |
| `createNewWebsites` | false | `bool` | If set to `true`, will try to create a new website on Umami, if domain not found there |
| `trackErrors` | false | `bool` | If set to `true`, will track errors (status codes >= 400) |
| `trackAllResources` | false | `bool` | Defines whether all requests for any resource should be tracked. By default, only requests that are believed to contain content are tracked |
| `trackExtensions` | | `string[]` | Defines an alternative list of file extensions that should be tracked |
| `ignoreUserAgents` | | `string[]` | A list of user agents that should be ignored from tracking, e.g. `["Googlebot", "Uptime-Kuma"]` (matched with `strings.Contains`) |