* Add a default 30s timeout for `delayShutdownMs`
`settings.delayShutdownMs` doesn't seem to be defined anywhere
Logs typically often this pair of entries:
```
INFO 2024-11-21T15:51:42.115Z [resource.labels.containerName: filestore] received interrupt, cleaning up
INFO 2024-11-21T15:51:42.120Z [resource.labels.containerName: filestore] shutdown timed out, exiting
```
This indicates that there is no delay between the interrupt signal and the shutdown. The 100ms delay also doesn't happen. We believe that the `server.close` callback is called after `server.closeAllConnections()`, and the `server closed` log is usually lost because of the process exiting immediately.
See: https://cloudlogging.app.goo.gl/WJQ6mc3gWwotVQya7
* Add timeout before exiting
* Replace `delayShutdownMs` by `gracefulShutdownDelayInMs`.
Looks like the error came from a wrong merge in https://github.com/overleaf/internal/pull/18756
We don't want a default 30s timeout for the shutdown, per https://github.com/overleaf/internal/pull/16888
GitOrigin-RevId: c1bdc8986f78a6e18e8b8b1fe60b33aa6ffef909
* Add `unicorn/prefer-node-protocol`
* Fix `unicorn/prefer-node-protocol` ESLint errors
* Run `npm run format:fix`
* Add sandboxed-module sourceTransformers in mocha setups
Fix `no such file or directory, open 'node:fs'` in `sandboxed-module`
* Remove `node:` in the SandboxedModule requires
* Fix new linting errors with `node:`
GitOrigin-RevId: 68f6e31e2191fcff4cb8058dd0a6914c14f59926
* Add some JSDoc types to `@overleaf/logger`
* Update `logger.error` calls
* Fixup `logger.err` JSDoc
* Update `logger.err` calls
* Fix `args` type
* Remove "Error message" description
* Replace `arguments` by actual arguments of the method
* Fix: "ESLint: Unnecessary '.apply()'.(no-useless-call)"
* Add JSDoc params to `debug` `info` `warn`
* Remove extra `args` param in JSDoc so developers aren't invited to use it
Not sure if this is the best thing to do because it creates a warning in the IDE: "Parameter args is not described in JSDoc"
* Add comment about serialization of `err` `req` `res`
* Allow strings as first param in `debug` `info` `warn`
* Fix syntax for optional parameters in JSDoc
* Add 2 signatures, to avoid "string, string" params
* Fix `@signature` names copy-pastes
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Revert the double `@param attributes`. It doesn't work
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 086dee8bbf30d577c5e1f844a9df5e518c46aca7
- renamed package from `metrics-sharelatex` to `@overleaf/metrics`
- drop support for statsd backend
- decaffeinate
- compress `/metrics` response using gzip
- bump debugging agents to latest versions
- expose prometheus interfaces for custom metrics (custom tags)
- cleanup of open sockets metrics
- fix deprecation warnings for header access