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

EVG-21011: Remove BugSnag #2107

Merged
merged 5 commits into from
Oct 19, 2023
Merged

EVG-21011: Remove BugSnag #2107

merged 5 commits into from
Oct 19, 2023

Conversation

sophstad
Copy link
Contributor

@sophstad sophstad commented Oct 17, 2023

EVG-21011

Description

  • Remove BugSnag initialization
  • Update leaveBreadcrumb to use more Sentry-native types
  • Will remove BugSnag key from .env-cmdrc.json and Evergreen variables once changes are deployed

Testing

  • Remove BugSnag tests

@cypress
Copy link

cypress bot commented Oct 17, 2023

Passing run #13401 ↗︎

0 601 7 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge branch 'main' of https://github.com/evergreen-ci/spruce into EVG-21011
Project: Spruce Commit: 6963256f0c
Status: Passed Duration: 19:18 💡
Started: Oct 19, 2023 8:36 PM Ended: Oct 19, 2023 8:55 PM

Review all test suite changes for PR #2107 ↗︎

@sophstad sophstad requested a review from a team October 17, 2023 18:10
@sophstad sophstad marked this pull request as ready for review October 17, 2023 18:10
./scripts/deploy/app-version.sh && node ./scripts/deploy/upload-bugsnag-sourcemaps.js
echo "Source maps uploaded to Bugsnag"
echo "Exporting REACT_APP_VERSION variable"
./scripts/deploy/app-version.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

REACT_APP_VERSION can be removed since it's only used by Bugsnag

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like at some point this was also baked into the index.html but I no longer see the code there.
We should probably add it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the script and added the value to index.html!

Copy link
Contributor

Choose a reason for hiding this comment

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

I removed the script and added the value to index.html!

APP_VERSION will still need to be exported somewhere since it was exported in the script

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's now passed in directly as an environment variable via the build script in package.json. You can verify that it's present in the <head> right now on https://spruce-staging.corp.mongodb.com!

metadata: Breadcrumb["data"],
type: SentryBreadcrumb
) => {
if (!isProductionBuild()) {
Copy link
Contributor

@SupaJoon SupaJoon Oct 18, 2023

Choose a reason for hiding this comment

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

Why use isProductionBuild (NODE_ENV) instead of isProduction (RELEASE_STAGE)? Sentry replay relies on RELEASE_STAGE

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that this is so we get sentry logging for all environments including the staging and beta environments. isProductionBuild will be true as long as it is a production build.

We are limited on the amount of sentry replay playback so we probably wouldn't want it enabled in every environment, hence why we sample on prod.

@sophstad sophstad requested a review from SupaJoon October 19, 2023 20:32
@sophstad sophstad merged commit a7cb311 into evergreen-ci:main Oct 19, 2023
2 checks passed
@sophstad sophstad deleted the EVG-21011 branch October 19, 2023 21:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants