diff --git a/docs/config.md b/docs/config.md index 437341b..b4d3b05 100644 --- a/docs/config.md +++ b/docs/config.md @@ -3,7 +3,9 @@ Configuration is handled by [Spring Boot](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html), which supports properties files, YAML files, environment variables and command-line arguments for setting config values. -As a general rule, Prebid Cache will immediately fails on startup if any of required properties is missing or invalid. +Both `_` and `-` can be used as a delimiters. As an example, both `api.cache_path` and `api.cache-path` refer to the same parameter. + +As a general rule, Prebid Cache will immediately fail on startup if any of required properties is missing or invalid. The next sections describes how to set up project configuration. @@ -14,6 +16,8 @@ The next sections describes how to set up project configuration. - `api.cache_path` - set path for cache endpoint. - `api.module_storage_path` - set path for storage endpoint. - `api.api_key` - set API key. +- `api.cache_write_secured` - if `true`, POST requests to `/cache` will require a valid API key. +- `api.external_UUID_secured` - if `true`, providing external UUID will additionally require a valid API key. #### Cors - `cors.enabled` - toggle for cors. diff --git a/docs/metrics.md b/docs/metrics.md new file mode 100644 index 0000000..84fc8e7 --- /dev/null +++ b/docs/metrics.md @@ -0,0 +1,21 @@ +# Metrics + +`{prefix}` can be `read` or `write` but doesn't automatically mean that metric will appear in both. + +- `pbc.{prefix}.request.duration` - the time it took to store or retrieve creative in ns. +- `pbc.{prefix}.request` - the count of incoming requests. +- `pbc.{prefix}.trustedRequest` - the count of incoming requests carrying a matching API key. +- `pbc.request.invalid` - the count of incoming requests using invalid endpoint or method. +- `pbc.{prefix}.err.timedOut` - the count of timed out requests. Usually indicates an issue with the storage backend. +- `pbc.{prefix}.err.missingId` - the count of requests that carried a UUID that was not present in storage backend. +- `pbc.{prefix}.err.badRequest` - the count of malformed or otherwise invalid requests. +- `pbc.{prefix}.err.unauthorized` - the count of unauthorized requests. +- `pbc.{prefix}.err.unknown` - the count of unknown (not falling into the defined categories) errors. +- `pbc.{prefix}.err.db` - the count of storage backend errors. +- `pbc.{prefix}.json` - the count of JSON (banner) creatives. +- `pbc.{prefix}.xml` - the count of XML (video) creatives. +- `pbc.err.secondaryWrite` - the count of secondary write errors. +- `pbc.err.existingId` - the count of errors due to existing UUID key in the storage backend. +- `pbc.err.rejectedExternalId` - the count of rejected writes due to specifying external UUID not being allowed. +- `pbc.proxy.success` - the count of successful proxying requests. +- `pbc.proxy.failure` - the count of failed proxying requests.