Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

304
Visualizações
Sentry Google Serverless - Cannot report errors to console before sending to Sentry

@sentry/serverless 6.14.3

Goal:

Have errors that are being reported to Sentry from our Google Functions handled by our custom logger as well

Issue:

Sentry uses a wrapper to wrap your google function in order to catch any errors thrown up the stack (see the issue that spawned this implementation here). With this implementation, the errors that are caught by their wrapper are sent to Sentry and you cannot do anything else with them. That means if you are testing locally, there will be no stacktrace printed. You will also not see any errors in your logs when you review them to find out what produced the error. Both situations prove to be particularly frustrating.

What I have tried:

  1. Sentry has a beforesend option that you can use, but that doesn't seem to be hit with this wrapper. I have created a beforesend that just prints 'hello' to the console via console.log, but nothing is printed when you throw an error in your function.
  2. Sentry has integrations that, at first glance, look like they might be helpful, but they are used to configure how errors are caught instead of configuring what to do with errors once they have been caught. They don't seem to be able to be used to solve this problem.
  3. Adding try catch blocks to all our functions.... This is what we are currently going with, but I really don't like it. It's a lot to maintain, since we have a lot of functions. It would be a lot easier if there was one place that we could make this change, rather than having to do it for each function.

Any ideas or solutions wouly be appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda