Skip to content

Comments

test(ui): Set environment on master branch + CI#46547

Merged
scttcper merged 3 commits intomasterfrom
scttcper/jest-production-env
Mar 29, 2023
Merged

test(ui): Set environment on master branch + CI#46547
scttcper merged 3 commits intomasterfrom
scttcper/jest-production-env

Conversation

@scttcper
Copy link
Member

CI data can be messy since it includes everyone's PR's that may or may not be up to date. Filtering by branch samples the data.

This would reduce sampling for the master branch by setting the environment to production and reducing the sample rate for the dev environment.

CI data can be messy since it includes everyone's PR's. This would reduce sampling for the master branch by setting the environment to production and reducing the sample rate for the dev environment.
@scttcper scttcper requested review from a team March 29, 2023 20:52
@scttcper scttcper changed the title test(ui): Set CI environment to production on master branch test(ui): Set environment to production on master branch + CI Mar 29, 2023
Copy link
Contributor

@mattgauntseo-sentry mattgauntseo-sentry left a comment

Choose a reason for hiding this comment

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

Overall love this change as making sense of the data in the javascript project is tough without this.

I've been using the branch tag, but it seems like this isn't going to work for alerting in the near future.

tracesSampleRate: 1,
// Use production env to reduce sampling of commits on master
environment: CI ? (IS_MASTER_BRANCH ? 'ci:master' : 'ci:pull_request') : 'local',
tracesSampleRate: CI ? 1 : 0.5,
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to change sample rate by CI or IS_MASTER_BRANCH?

Copy link
Member Author

Choose a reason for hiding this comment

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

attempting to prioritize CI for now by sending fewer in dev/local. but i might do that too

@scttcper scttcper changed the title test(ui): Set environment to production on master branch + CI test(ui): Set environment on master branch + CI Mar 29, 2023
@scttcper scttcper merged commit 8571f04 into master Mar 29, 2023
@scttcper scttcper deleted the scttcper/jest-production-env branch March 29, 2023 22:09
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2023
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