Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Add Sentry integration#25

Open
teners wants to merge 3 commits intodevelopfrom
feature/sentry
Open

Add Sentry integration#25
teners wants to merge 3 commits intodevelopfrom
feature/sentry

Conversation

@teners
Copy link
Copy Markdown
Member

@teners teners commented Mar 9, 2019

Closes #24

@teners teners requested a review from b0g3r March 9, 2019 12:37
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 9, 2019

Deploy preview for postpost-storybook ready!

Built with commit f96b27c

https://deploy-preview-25--postpost-storybook.netlify.com

Comment thread src/main.ts Outdated
Comment thread src/main.ts

Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Я бы всё таки вынес environment в .env.development и .env.production, чтобы случайно не придумать чего-то лишнего

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Не очень понял о чем ты конкретно

Copy link
Copy Markdown
Member

@b0g3r b0g3r Mar 16, 2019

Choose a reason for hiding this comment

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

SENTRY_ENVIRONMENT не меняется от комьютера к компьютеру, поэтому его можно вынести в
.env.production и .env.development

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

либо можно вообще использовать здесь process.env.NODE_ENV, как тебе такое?

@b0g3r
Copy link
Copy Markdown
Member

b0g3r commented Mar 10, 2019

Если уже настраивал автосборку с учётом сентри — то обрати внимание, я создал два проекта в сентри, один для фронта, другой для бекенда

@teners
Copy link
Copy Markdown
Member Author

teners commented Mar 14, 2019

@b0g3r пинг 😘

Comment thread .travis.yml
- export IMAGE_TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "dev"; fi`
- export IMAGE_NAME="piterpy/postpost-frontend"
- docker build -t $IMAGE_NAME:$IMAGE_TAG .
- docker build -e SENTRY_DSN=$SENTRY_DSN -e SENTRY_ENVIRONMENT=develop -t $IMAGE_NAME:$IMAGE_TAG .
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

а почему в билде develop? 🤔

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.

2 participants