Troubleshooting common Go Issues

Since the Go SDK tries to read the source files from your local disk, it's possible that you’re compiling your binary and deploying it in a manner that makes the source code inaccessible.

This is common in Go because you can compile the binary, and then have no more need for the source code. Without access to the source code, however, we can’t map anything back, and we don’t support uploading Go source code with a release to stitch this data on.

You can see in the Serverless section how to bundle the source code with the binary, which applies to other forms of deployment as well.

Sentry's Go SDK middleware has to modify the request context in order to function correctly. This results in a shallow copy of the request being passed to upstream handlers. This means that temporary files created from calling ParseMultipartForm on this request won't automatically be cleaned up. It's important to clean these files up by calling request.Multipart.RemoveAll() after.

See the multipart documentation for more information.

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").