Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Adicionando sentry no projeto #48

Merged
merged 11 commits into from
Sep 4, 2021

Conversation

matheusrocha89
Copy link
Collaborator

Esse PR adiciona o sentry ao projeto para capturar os erros.

closes #24

@matheusrocha89 matheusrocha89 self-assigned this Sep 3, 2021
@netlify
Copy link

netlify bot commented Sep 3, 2021

✔️ Deploy Preview for dadosabertosdefeira ready!

🔨 Explore the source changes: 996222b

🔍 Inspect the deploy log: https://app.netlify.com/sites/dadosabertosdefeira/deploys/6133fe367de29700080e8169

😎 Browse the preview: https://deploy-preview-48--dadosabertosdefeira.netlify.app

@anapaulagomes
Copy link
Contributor

Tem que ver pq os checks estão falhando @matheusrocha89 Bom trabalho aqui!

@matheusrocha89
Copy link
Collaborator Author

@anapaulagomes são as configurações para o netlify, por isso te pedi acesso. Já aceitei e estou corrigindo, vai ficar muito bem 😄

@matheusrocha89
Copy link
Collaborator Author

@anapaulagomes desculpa te incomodar outra vez 😄 preciso adicionar a integração do sentry com o netlify mas para isso pede que a pessoa tenha permissão de Owner ou Manager no Sentry 😄 Você pode fazer essa integração ou me dar esse acesso?

@anapaulagomes
Copy link
Contributor

anapaulagomes commented Sep 3, 2021 via email

@matheusrocha89
Copy link
Collaborator Author

@anapaulagomes certeza? Continua igual
image

@anapaulagomes
Copy link
Contributor

Tinha feito isso no Netlify haha tava viajando. Vê agora @matheusrocha89!

@matheusrocha89
Copy link
Collaborator Author

@anapaulagomes Parece que agora foi, e configurei por ambientes também. Se alguém puder revisar e dar um Ok poderemos integrar. Obrigado pela ajuda nas permissões 👍 🙇

@matheusrocha89 matheusrocha89 added the enhancement New feature or request label Sep 4, 2021
@@ -2,6 +2,13 @@
command = "npm run build"
publish = "out"

[context.production.environment]
SENTRY_ENVIRONMENT = "production"
NEXT_PUBLIC_SENTRY_ENVIRONMENT = "production"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Precisamos das duas variaveis @matheusrocha89 ?

Copy link
Collaborator Author

@matheusrocha89 matheusrocha89 Sep 4, 2021

Choose a reason for hiding this comment

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

Aparentemente sim, porque quando colocava só uma, quando o erro acontecia no lado do browser ele não enviava para o environment correto por conta da variável não existir do lado do client.

https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser

Quando coloquei essa variável exposta para o client funcionou como deveria e os erros foram enviados para o environment de produção e os de PR foram para os de deploy-preview.

@anapaulagomes
Copy link
Contributor

Só precisa atualizar a branch aqui e está pronto pro merge @matheusrocha89. Valeu! ☺️

@matheusrocha89
Copy link
Collaborator Author

@anapaulagomes Feito, vou fazer merge.

@matheusrocha89 matheusrocha89 merged commit 38da220 into DadosAbertosDeFeira:main Sep 4, 2021
@matheusrocha89 matheusrocha89 deleted the sentry branch September 27, 2021 22:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurar Sentry
3 participants