Troubleshoot Sentry data source issues
This document provides solutions to common issues you may encounter when configuring or using the Sentry data source. For configuration instructions, refer to Configure the Sentry data source.
Authentication errors
These errors occur when the Sentry authentication token is invalid, missing, or doesn’t have the required permissions.
“401 Unauthorized” or “Invalid token”
Symptoms:
- Save & test fails with authorization errors
- Queries return access denied messages
- Project and environment drop-downs don’t populate
Possible causes and solutions:
“0 projects found” on save and test
Symptoms:
- Save & test succeeds but reports “plugin health check successful. 0 projects found.”
- No projects appear in the query editor drop-down
Solutions:
- Verify the authentication token’s integration has Read access to Project in Sentry.
- Confirm the Sentry organization has at least one project.
- Check that the Sentry Org slug matches the organization where projects exist.
Connection errors
These errors occur when Grafana can’t reach the Sentry API.
“Connection refused” or timeout errors
Symptoms:
- Data source test times out
- Queries fail with network errors
Possible causes and solutions:
Query errors
These errors occur when executing queries against Sentry.
“No data” or empty results
Symptoms:
- Query executes without error but returns no data
- Charts show “No data” message
Possible causes and solutions:
Query timeout
Symptoms:
- Query runs for a long time then fails
- Error mentions timeout or rate limits
Solutions:
- Narrow the dashboard time range to reduce the volume of data returned.
- Add project and environment filters to reduce the result set.
- Reduce the Limit value in the query editor.
- For Events Stats or Spans Stats queries, reduce the number of Group fields.
“unknown query type” error
Symptoms:
- Query fails with the message “unknown query type”
Solutions:
- Select a valid query type in the Query Type drop-down. This error occurs when no query type is selected or the query configuration is corrupted.
- If you’re using a query type added in a newer plugin version (for example, Spans requires v2.2.0+, Metrics requires v1.8.0+), update the plugin to the required version.
“invalid or empty organization slug” error
Symptoms:
- Queries fail with “invalid or empty organization slug”
- Save & test may still succeed
Solutions:
- Verify the Sentry Org field is set in the data source configuration. Refer to Configure the Sentry data source.
- Check that the slug doesn’t contain extra spaces or the full URL — only enter the slug portion.
“404” errors on span queries
Symptoms:
- Spans or Spans Stats queries return 404 errors
- Other query types work correctly
Solutions:
- Ensure you’re running plugin version 2.2.4 or later, which includes a fix for 404 responses when querying spans with attribute aggregation.
- Verify your Sentry plan includes access to the spans/tracing API.
“400” errors with detail message
Symptoms:
- Query fails with a message like “400 Bad Request” followed by a detail message from Sentry (for example, “400 Bad Request Invalid query”)
Solutions:
- Review the detail message for specific guidance. Common causes include invalid search syntax in the Query field or unsupported field names in Fields or Y-axis.
- Test the same query directly in Sentry’s Discover view to verify the syntax is valid.
- For Events or Spans queries, verify the Fields values are valid Sentry field names.
Annotation errors
These errors occur when using Sentry annotations on dashboards.
Annotations don’t appear
Symptoms:
- Annotation query is configured but no annotations appear on the graph
- No error messages are displayed
Possible causes and solutions:
Too many annotations
Symptoms:
- Dashboard is slow or cluttered with annotations
- Browser performance degrades
Solutions:
- Set a lower Limit value in the annotation query to reduce the number of returned results.
- Add a more specific Query filter (for example,
is:unresolved level:error) to reduce the number of matching issues. - Filter by Projects or Environments to narrow the scope.
Alerting errors
These errors occur when using Grafana alerting with the Sentry data source.
Alert rule fails to evaluate
Symptoms:
- Alert rule status shows “Error”
- Alert notifications are not triggered
Possible causes and solutions:
Alert condition not met despite matching data
Symptoms:
- Data appears in Explore but the alert doesn’t fire
- Alert preview shows data but condition is never met
Solutions:
- Verify the Reduce function matches your intent. For example, Last returns the most recent value, while Mean averages all values in the evaluation window.
- Check the Threshold expression operator and value. Preview the alert rule to see the actual values being compared.
- For Issues queries, verify the Limit is set high enough to capture all matching issues, since the Count expression only counts returned rows.
Template variable errors
These errors occur when using template variables with the Sentry data source.
Variables return no values
Solutions:
- Verify the data source connection is working by running Save & test in the data source settings.
- For Environments variables, ensure the selected project IDs are valid and the projects have environments configured in Sentry.
- For Projects variables filtered by team, verify the team slug is correct.
- Check that the authentication token has Read permissions for the resources the variable queries.
Variables are slow to load
Solutions:
- Set variable refresh to On dashboard load instead of On time range change.
- For Projects variables, filter by team slug to reduce the number of results.
Performance issues
These issues relate to slow queries or Sentry API limits.
API rate limit errors
Symptoms:
- “Rate limit exceeded” or throttling errors
- Dashboard panels intermittently fail to load
Solutions:
- Reduce the frequency of dashboard auto-refresh.
- Use larger time intervals in Stats queries to reduce the number of API calls.
- Reduce the number of panels querying the same Sentry data source on a single dashboard.
- Enable query caching in Grafana (available in Grafana Enterprise and Grafana Cloud).
Enable debug logging
To capture detailed error information for troubleshooting:
Set the Grafana log level to
debugin the configuration file:[log] level = debugReview logs in
/var/log/grafana/grafana.log(or your configured log location).Look for entries containing
sentryfor request and response details.Reset the log level to
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried the solutions in this document and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review the Sentry data source GitHub issues for known bugs.
- Consult the Sentry documentation for Sentry-specific guidance.
- Contact Grafana Support if you’re a Cloud Pro, Cloud Contracted, or Enterprise user.
- When reporting issues, include:
- Grafana version and Sentry plugin version
- Error messages (redact sensitive information)
- Steps to reproduce
- Relevant configuration (redact credentials)


