Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

303
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda