- 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
A stale browser tab tried to join a deleted project.
Emitting 'project not found'/'ProjectNotFound' will trigger a page
reload in the frontend, upon web can render a 404.
See frontend: ConnectionManager.joinProject callback
Users will get redirected to the login page and will see a 'restricted'
page after logging in again.
See frontend: ConnectionManager.reportConnectionError
ioredis may reuse the error instance for multiple callbacks. E.g. when
the connection to redis fails, the queue is flushed with the same
MaxRetriesPerRequestError instance.
See the docs of OError.tag:
https://github.com/overleaf/o-error#long-stack-traces-with-oerrortag
(currently at 221dd902e7bfa0ee92de1ea5a3cbf3152c3ceeb4)
I am tagging all errors at each async hop. Most of the controller code
will only ever see already tagged errors -- or new errors created in
our app code. They should have enough info that we do not need to tag
them again.
...and fix the stubbing of `io.sockets.clients`.
We were running the assertions prior to the actual completion of the
leaveProject. Which in turn shadowed the broken test setup --
`io.sockets.clients()` was returning the `this.clientsInRoom=[]` from a
previous context.