generated from nholtware/service-template-react
feat: JSON access log in the platform logging contract
This commit is contained in:
parent
fc7ebd5798
commit
444044b99a
5 changed files with 46 additions and 1 deletions
|
|
@ -34,6 +34,13 @@ Everything in `config.js` is public. Never put secrets there.
|
|||
- nginx listens on 8080: `/healthz` returns 200, unknown paths fall back to
|
||||
`index.html`, `/assets/*` are cached as immutable, and `index.html` and
|
||||
`config.js` are not cached.
|
||||
- Access log: one JSON line per request in the platform logging contract
|
||||
(`level`, `time`, `service` = `APP_NAME`, `version` = `GIT_SHA`, `req.id`
|
||||
(echoes `X-Request-Id`), `req.method`, `req.url`, `res.statusCode`,
|
||||
`responseTime` in ms, `msg: "request completed"`), the same shape as the backend
|
||||
template. In Kibana (http://kibana.192.168.1.83.nip.io, data view `kube-*`):
|
||||
`service:"hello-web" and res.statusCode >= 400`. `/healthz` isn't logged.
|
||||
nginx's own startup/error lines stay plain text (field `log`).
|
||||
|
||||
## Deploy
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue