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

Filter ANSI escape codes for Sentry #1068

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

jmhobbs
Copy link
Contributor

@jmhobbs jmhobbs commented Oct 1, 2024

Removes ANSI escape codes from error and console log messages before being sent to Sentry.

Additionally, using environment for the cli/action distinction was incorrect. Move that to entrypoint and set a build time variable for SENTRY_ENVIRONMENT to bake it in appropriately.

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

✨ Test out this PR locally via:

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

@jmhobbs jmhobbs added patch Auto: Increment the patch version when merged skip-release Auto: Preserve the current version when merged labels Oct 1, 2024
@jmhobbs jmhobbs requested a review from a team October 1, 2024 21:26
@jmhobbs jmhobbs self-assigned this Oct 1, 2024
Copy link

codacy-production bot commented Oct 1, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.31% (target: -1.00%) 100.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d6f1e9d) 8432 4517 53.57%
Head commit (fb6b601) 8458 (+26) 4557 (+40) 53.88% (+0.31%)

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 (#1068) 27 27 100.00%

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

Copy link
Contributor

github-actions bot commented Oct 1, 2024

📦 Package Size: 4640 KB
✅ Compared to main: 0 KB b4fc0bf (4640 KB)

Copy link
Contributor

@jwir3 jwir3 left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work adding a test to make sure that stripAnsi does what we expect!

node-src/errorMonitoring.ts Show resolved Hide resolved
node-src/errorMonitoring.ts Show resolved Hide resolved
node-src/errorMonitoring.ts Outdated Show resolved Hide resolved
The dev/prod division belongs in `environment`, we will bake the
cli/action distinction as `entrypoint`
@jmhobbs jmhobbs force-pushed the jmhobbs/cap-2250-clean-up-errors-reported-strip-ansi branch from bad4dd1 to fb6b601 Compare October 2, 2024 15:42
@jmhobbs jmhobbs added this pull request to the merge queue Oct 2, 2024
Merged via the queue into main with commit ab380a0 Oct 2, 2024
20 checks passed
@jmhobbs jmhobbs deleted the jmhobbs/cap-2250-clean-up-errors-reported-strip-ansi branch October 2, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Auto: Increment the patch 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.

3 participants