Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

matrix.org's sentry is full of logcontext errors #10702

Closed
richvdh opened this issue Aug 26, 2021 · 4 comments
Closed

matrix.org's sentry is full of logcontext errors #10702

richvdh opened this issue Aug 26, 2021 · 4 comments
Assignees
Labels
A-Logging Synapse's logs (structured or otherwise). Not metrics. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@richvdh
Copy link
Member

richvdh commented Aug 26, 2021

See https://sentry.matrix.org/sentry/synapse-matrixorg/issues/15805, for example. They mostly seem to be due to varanustra, though that should have been fixed in https://gitlab.matrix.org/new-vector/varunastra/-/merge_requests/20, so we need to investigate why it's still full of spam.

@richvdh richvdh added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Aug 26, 2021
@callahad
Copy link
Contributor

callahad commented Sep 2, 2021

Link to contextmanager issues in Sentry: https://sentry.matrix.org/sentry/synapse-matrixorg/issues/?query=logger%3Asynapse.logging.scopecontextmanager

Seems to have changed profile recently; needs further investigation

@callahad callahad added the P1 label Sep 2, 2021
@MadLittleMods MadLittleMods added the A-Logging Synapse's logs (structured or otherwise). Not metrics. label Sep 4, 2021
@squahtx
Copy link
Contributor

squahtx commented Sep 13, 2021

The errors we're seeing in Sentry are:

  • "Tried to activate scope outside of loggingcontext", which stopped on September 1st
  • "Tried to close a non-active scope!", which started on September 1st

These could very well be caused by logging contexts being lost / not being correctly restored.

@richvdh has pointed out that we have a known issue where this can happen during federation send timeouts: #5604

@anoadragon453 has found that synapse-spamcheck-badlist causes logging contexts to be lost, which we have a fix for: matrix-org/synapse-spamcheck-badlist#24

I've opened a PR to try to prevent logging contexts going missing during federation send timeouts: #10810

@squahtx
Copy link
Contributor

squahtx commented Sep 22, 2021

The spam in Sentry has disappeared now that matrix-org/synapse-spamcheck-badlist#24 and #10810 have been deployed.

Thanks to @anoadragon453 and @reivilibre for pointing me in the right direction!

@richvdh
Copy link
Member Author

richvdh commented Sep 22, 2021

yay, thanks for sorting this!

@kittykat kittykat added the z-p1 label Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Logging Synapse's logs (structured or otherwise). Not metrics. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

6 participants