Skip to content
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

chore(server): remove sentry and only apply mixpanel middleware if enabled #2732

Merged
merged 8 commits into from
Aug 23, 2024

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Aug 22, 2024

Description & motivation

We are no longer using Sentry, we should purge it from our source code.

We should always respect the flag for enabling (or disabling) MixPanel.

Changes:

  • MixPanel middleware is only enabled where Mixpanel is configured to be enabled
  • All references to Sentry are removed.

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

# better software. Disabling this makes Speckle sad!
############################################################
# SENTRY_DSN="-> FILL IN <-"
# DISABLE_TRACING=""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are not being used at the moment, but can be reinstated if we ever add tracing.

Copy link
Member

Choose a reason for hiding this comment

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

TIL, I've been meaning to ask

@iainsproat iainsproat changed the title chore(server): remove sentry chore(server): remove sentry and only use mixpanel if enabled Aug 22, 2024
@iainsproat iainsproat marked this pull request as ready for review August 22, 2024 13:46
Copy link
Member

@cdriesler cdriesler left a comment

Choose a reason for hiding this comment

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

I believe the calls to mixpanel() are already protected by the if (client) block within it - as in the client won't exist if mixpanel is not enabled, and so these calls (should) no-op in that case.

It looks like you may have made this (more) correct with the changes in app.ts, though. Maybe worth at least including this behavior in the comment on mixpanel()?

@iainsproat iainsproat changed the title chore(server): remove sentry and only use mixpanel if enabled chore(server): remove sentry and only apply mixpanel middleware if enabled Aug 23, 2024
@iainsproat
Copy link
Contributor Author

I believe the calls to mixpanel() are already protected by the if (client) block within it - as in the client won't exist if mixpanel is not enabled, and so these calls (should) no-op in that case.

It looks like you may have made this (more) correct with the changes in app.ts, though. Maybe worth at least including this behavior in the comment on mixpanel()?

Thanks @cdriesler - I've reverted the change to the calls to mixpanel in automate. I see that it returns if the client doesn't exist:

And the client only exists if MixPanel is enabled:

if (client || !enableMixpanel()) return

@iainsproat iainsproat merged commit 26b0ecb into main Aug 23, 2024
22 of 24 checks passed
@iainsproat iainsproat deleted the iain/remove-sentry branch August 23, 2024 15:56
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