Commit Graph

15 Commits

Author SHA1 Message Date
Gergő Jedlicska c22e0dfe23 refactor(server scopes): use constants for profile email scope 2023-07-26 13:32:08 +02:00
Gergő Jedlicska 61c4869091 refactor(server scopes): use constants for profile read scopes 2023-07-26 13:29:54 +02:00
Gergő Jedlicska f1e64e3b83 refactor(server scopes): use constants for tokens read scopes 2023-07-26 13:27:33 +02:00
Gergő Jedlicska 9b09a2d1c8 refactor(server scopes): use constants for tokens write scopes 2023-07-26 13:26:49 +02:00
Gergő Jedlicska d12cb9d34a refactor(server scopes): use constants for users email scopes 2023-07-26 13:25:09 +02:00
Gergő Jedlicska 4d9078a6d7 refactor(server scopes): use constants for users read scopes 2023-07-26 13:15:09 +02:00
Gergő Jedlicska 878f97baa2 refactor(server scopes): use constants for streams write scopes 2023-07-26 13:13:09 +02:00
Gergő Jedlicska bb5778bf2d refactor(server scopes): use constants for streams read scopes 2023-07-26 13:09:34 +02:00
Gergő Jedlicska 9e66e66f8f fix(server): make sure to no use localhost, since node18 it defaults to ipv6 which is broken in CI (#1304) 2023-01-10 16:17:41 +01:00
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00
Iain Sproat 78ecaeffcb Revert structured logging 2 (#1240)
* Revert "'@' shortcut must come after it is configured in bootstrap (#1239)"

This reverts commit 967329473f.

* Revert "Structured logging (attempt 2) (#1234)"

This reverts commit 444d2ca7dd.
2022-12-05 15:46:09 +00:00
Iain Sproat 444d2ca7dd Structured logging (attempt 2) (#1234)
* Revert "Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)"

This reverts commit 63e6581162.

* Use pino-http instead of express pino logger
* Use correct reference to knex and do not instantiate HttpLogger prematurely
* Adds missing dependency for pino to webhook-service
* Do not instantiate middleware when passed to express
* Refactor to move logging into shared
* Copy shared packages into dockerfiles
* Build shared workspace in docker build-stage for fileimport & webhook
2022-12-05 14:49:52 +00:00
Iain Sproat 63e6581162 Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)
This reverts commit 84cb74e8b3.
2022-11-25 16:57:28 +00:00
Iain Sproat 84cb74e8b3 feat(structured logging): implements structured logging for backend (#1217)
* each log line is a json object
* structured logging allows logs to be ingested by machines and the logs to be indexed and queried addresses #1105
* structured logging allows arbitrary properties to be appended to each log line, and ingestion of logs to remain robust
* Structured logging provided by `pino` library
* Add `express-pino-logger` dependency
* Remove `debug`, `morgan`, and `morgan-debug` and replace with structured logging
* `console.log` & `console.error` replaced with structured logging in backend
* Remove `DEBUG` environment variable and replace with `LOG_LEVEL`
- Note that there is a test which reads from a logged line on `stdout`. This is not robust, it would be better to use the childProcess.pid to look up the port number.
* Log errors at points we explicitly send error to Sentry
* Amend indentation of a couple of log messages to align indentation with others
2022-11-25 16:05:05 +00:00
Gergő Jedlicska 43596e4509 refactor(server authz): refactor authz module to TypeScript (#907)
* refactor(server authz): refactor authz module to TypeScript

* improved roles types

* Update packages/server/modules/shared/errors/base.ts

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>

* refactor(server authz): fix PR comments

Co-authored-by: Fabians <fabis94@live.com>
2022-08-16 14:45:13 +02:00