---
title: "Source Context"
description: "Learn how to show source lines in Go stack traces."
url: https://docs.sentry.io/platforms/go/guides/iris/source-context/
---

# Source Context | Sentry for Iris

Source context shows the lines around a frame in a stack trace so you can see the code that failed without leaving Sentry.

For Go, source context is provided through [SCM Source Context](https://docs.sentry.io/integrations/source-code-mgmt/source-context.md) with code mappings.

## [Setup](https://docs.sentry.io/platforms/go/guides/iris/source-context.md#setup)

To use source context with Go:

1. Set up a supported SCM integration.
2. Configure code mappings for your project.
3. Enable source context for the project.

For setup details, see [SCM Source Context](https://docs.sentry.io/integrations/source-code-mgmt/source-context.md).

## [Troubleshooting Missing Source Context](https://docs.sentry.io/platforms/go/guides/iris/source-context.md#troubleshooting-missing-source-context)

If stack traces are missing source lines, make sure that:

* Your project has a supported SCM integration installed
* Your project has code mappings configured correctly
* Source context is enabled for the project
* The event is associated with a release or branch that Sentry can resolve through your code mappings
