Serverless

Learn more about serverless support, which is available out of the box.

sentry-go works with serverless runtimes out of the box.

If you want source lines in stack traces, see Source Context.

This guidance is the same for serverless and non-serverless Go deployments.

Most (if not all) serverless solutions won't wait for network responses before closing the process. Because of that, we need to make sure that the event is delivered to Sentry's servers.

It can be achieved twofold, using the sentry.Flush method or by swapping the transport to HTTPSyncTransport.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").