Skip to content

feat(worker): Add sentry to xapian worker scope and angular update #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shadowbas
Copy link
Contributor

@shadowbas shadowbas commented Nov 13, 2024

Add sentry to the Xapian worker.

  • Update node version compatibility
  • Update packages to make them compatible with angular v16
  • Update ng v15 to v16 to unlock sentry integration
  • Add sentry's console integration
  • Rebase

Related: #1617

@shadowbas shadowbas requested a review from castaway November 13, 2024 12:21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@castaway , this approach of code gen and using git to revert is very messy and was causing me issues. I suggest we have this one env file that is generated using the ./gen-env.js script. We use this module instead of interpolating writing and reverting with git.

@shadowbas shadowbas force-pushed the shadowbas/feat-worker-add-sentry-toxapian-worker-scope branch 3 times, most recently from fae7ce7 to 2674e2a Compare November 14, 2024 14:18
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: environment.SENTRY_DSN
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add to capture console.error messages:

  integrations: [Sentry.captureConsoleIntegration()],

Copy link
Contributor Author

@shadowbas shadowbas May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got this working after an update of typescript, angular and sentry. Integrations are not supported by the Sentry version we are using. The newer version of Sentry required a later version of Typescript. Hence the typescript and angular update.

@shadowbas shadowbas force-pushed the shadowbas/feat-worker-add-sentry-toxapian-worker-scope branch 5 times, most recently from 61f8cf9 to 35262b5 Compare May 20, 2025 12:12
@shadowbas shadowbas changed the title feat(worker): Add sentry to xapian worker scope feat(worker): Add sentry to xapian worker scope and angular update Jun 4, 2025
@castaway
Copy link
Contributor

hi @shadowbas do the account setting tests (first e2e one) run on your dev box? mine keep failing (tho they've never been terribly stable)..
2025-06-10-105844_868x924_scrot

Copy link
Contributor

@castaway castaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good and seems to run .. only issue I have is with the access-settings (first e2e test) failing locally

@shadowbas
Copy link
Contributor Author

One might have noticed that we currently have console. calls registered as breadcrumbs. This behavior is only part of Sentry@5. Later versions of Sentry no longer do this by default and require the console integration.

@shadowbas shadowbas force-pushed the shadowbas/feat-worker-add-sentry-toxapian-worker-scope branch from 35262b5 to 606b48e Compare July 15, 2025 16:00
shadowbas and others added 3 commits July 15, 2025 19:26
Add Sentry to the worker context.

Also log console logs to sentry.

This required Update sentry and required deps.

A newer version of sentry requireded an update
of typescript. A newer version of typescript
required an update of angular.
@shadowbas shadowbas force-pushed the shadowbas/feat-worker-add-sentry-toxapian-worker-scope branch 2 times, most recently from 48112d6 to a46d3b7 Compare July 15, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants