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

Add basic sentry integration to cli #1036

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

jmhobbs
Copy link
Contributor

@jmhobbs jmhobbs commented Sep 11, 2024

This adds Sentry for error monitoring only, with opt-out through the environment variable DISABLE_ERROR_MONITORING.

The insertion of Sentry.close was required because most errors lead to immediate end of execution.

Additional tagging and annotation will come later.

📦 Published PR as canary version: 11.11.1--canary.1036.11128782068.0

✨ Test out this PR locally via:

npm install chromatic@11.11.1--canary.1036.11128782068.0
# or 
yarn add chromatic@11.11.1--canary.1036.11128782068.0

@jmhobbs jmhobbs added enhancement Classification: New feature or request minor Auto: Increment the minor version when merged skip-release Auto: Preserve the current version when merged labels Sep 11, 2024
@jmhobbs jmhobbs requested a review from a team September 11, 2024 15:07
@jmhobbs jmhobbs self-assigned this Sep 11, 2024
Copy link

codacy-production bot commented Sep 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.16% (target: -1.00%) 8.70% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6fe6065) 8399 4513 53.73%
Head commit (d6f1e9d) 8432 (+33) 4517 (+4) 53.57% (-0.16%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1036) 46 4 8.70%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

node-src/errorMonitoring.ts Outdated Show resolved Hide resolved
action-src/main.ts Outdated Show resolved Hide resolved
@jmhobbs jmhobbs force-pushed the jmhobbs/cap-2191-add-basic-sentry-integration-to-cli branch 2 times, most recently from 15d92eb to 1e50d74 Compare September 12, 2024 20:41
@jmhobbs
Copy link
Contributor Author

jmhobbs commented Sep 12, 2024

process.env.npm_package_version is working, I manually edited package.json and threw an error

Screenshot 2024-09-12 at 3 58 08 PM

Copy link
Contributor

@codykaup codykaup left a comment

Choose a reason for hiding this comment

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

LGTM!

@jmhobbs jmhobbs force-pushed the jmhobbs/cap-2191-add-basic-sentry-integration-to-cli branch from 908594a to e29e66e Compare September 13, 2024 19:38
Copy link
Contributor

github-actions bot commented Sep 13, 2024

📦 Package Size: 4640 KB
⚠️ Compared to main: +480 KB 6fe6065 (4160 KB)

@jmhobbs
Copy link
Contributor Author

jmhobbs commented Sep 13, 2024

Sentry adds about 480kb to the build.

@jmhobbs jmhobbs force-pushed the jmhobbs/cap-2191-add-basic-sentry-integration-to-cli branch from f131286 to 484ad64 Compare September 30, 2024 20:46
@jmhobbs jmhobbs force-pushed the jmhobbs/cap-2191-add-basic-sentry-integration-to-cli branch from 484ad64 to d6f1e9d Compare October 1, 2024 15:41
@jmhobbs jmhobbs merged commit 980e0c1 into main Oct 1, 2024
19 of 20 checks passed
@jmhobbs jmhobbs deleted the jmhobbs/cap-2191-add-basic-sentry-integration-to-cli branch October 1, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Classification: New feature or request minor Auto: Increment the minor version when merged skip-release Auto: Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants