Configure the Sentry data source
This document explains how to configure the Sentry data source in Grafana.
Before you begin
Before configuring the data source, ensure you have:
- Grafana version: Grafana 10.4.0 or later.
- Grafana permissions: Organization administrator role. Refer to Permissions for more information.
- Sentry account: An active Sentry account.
- Sentry role: The Admin, Manager, or Owner role in Sentry, required to create an internal integration token.
Get an authentication token from Sentry
To configure the Sentry data source plugin, you need an internal integration token from Sentry:
- Go to
https://sentry.io. - Navigate to Settings > Developer Settings > Custom Integrations.
- Click Create New Integration and select Internal Integration.
- Enter a valid name, such as Grafana.
- Under Permissions, grant Read access to the required resources, such as Project, Issue & Event, and Organization.
- Click Save Changes, then scroll down to Tokens and click New Token.
- Copy the token for use in the Sentry Auth Token field when configuring the data source in Grafana.
Note
The Admin, Manager, or Owner role in Sentry is required to create internal integrations.
Add the data source
To add the Sentry data source in Grafana:
- Click Connections in the left-side menu.
- Click Add new connection.
- Type
Sentryin the search bar. - Select Sentry.
- Click Add new data source.
Configure settings
The following table describes the available configuration settings.
Sentry settings
Additional settings
These optional settings provide more control over your data source connection.
Private data source connect
Note
Only for Grafana Cloud users.
Private data source connect, or PDC, allows you to establish a private, secured connection between a Grafana Cloud instance, or stack, and data sources secured within a private network. Click the drop-down to locate the URL for PDC. For more information regarding Grafana PDC, refer to Private data source connect (PDC) and Configure Grafana private data source connect (PDC) for instructions on setting up a PDC connection.
Click Manage private data source connect to open your PDC connection page and view your configuration details.
Verify the connection
Click Save & test to verify the connection. A successful test displays the message: plugin health check successful. N projects found., where N is the number of projects accessible with the configured credentials. If the test fails, refer to Troubleshoot Sentry data source issues for common solutions.
Provision the data source
You can define the Sentry data source in YAML files as part of Grafana’s provisioning system. For more information, refer to Provisioning Grafana.
apiVersion: 1
datasources:
- name: Sentry
type: grafana-sentry-datasource
access: proxy
jsonData:
url: https://sentry.io
orgSlug: <ORGANIZATION_SLUG>
secureJsonData:
authToken: <AUTH_TOKEN>The following table describes the provisioning keys.
Provision the data source with Terraform
You can provision the Sentry data source using the Grafana Terraform provider. Use the grafana_data_source resource to create and manage data source instances.
Basic Terraform provisioning
resource "grafana_data_source" "sentry" {
type = "grafana-sentry-datasource"
name = "Sentry"
json_data_encoded = jsonencode({
url = "https://sentry.io"
orgSlug = "<ORGANIZATION_SLUG>"
})
secure_json_data_encoded = jsonencode({
authToken = "<AUTH_TOKEN>"
})
}Terraform provisioning for self-hosted Sentry
The following example configures the data source for a self-hosted Sentry instance with TLS verification disabled:
resource "grafana_data_source" "sentry" {
type = "grafana-sentry-datasource"
name = "Sentry (self-hosted)"
json_data_encoded = jsonencode({
url = "https://sentry.example.com"
orgSlug = "<ORGANIZATION_SLUG>"
tlsSkipVerify = true
})
secure_json_data_encoded = jsonencode({
authToken = "<AUTH_TOKEN>"
})
}For more information about the Grafana Terraform provider, refer to the provider documentation.


