When your app encounters an error, does it affect your graphs? With a Sentry webhook add-on, you can pinpoint your Sentry events in time to see if they coincide with changes in your metrics.

How to set up a Sentry webhook

The webhook provided by Hosted Graphite can be used in Sentry as an alerting endpoint. To add Sentry alert information to Hosted Graphite as annotations, follow these instructions:

  • Navigate to the Add-ons section of your Hosted Graphite account
Navigate to the Add-ons section of your HG account
  • Activate Sentry by clicking the Enable button
Click Enable Sentry
  • Copy your Sentry webhook location by clicking the ‘Copy’ button and follow the mouseover directions
Copy Hosted Graphite Sentry webhook

Adding an Alerting Endpoint (in your Sentry account)

  • Browse to your Sentry account, visit ‘Project Settings’ section, and click ‘All Integrations’
Sentry Project Settings
  • Scroll down to ‘WebHooks’ and make sure the tickbox is checked. Save changes if necessary.
Activate Sentry WebHook Integration
  • Browse to the Alerts settings
Sentry Alerts
  • Scroll down, and add the Hosted Graphite Sentry webhook location to the field. Don’t forget to save your changes.
Sentry WebHook Callback URL
  • Scroll back up and either add or edit an alert Rule that corresponds to the Events you want to send to Hosted Graphite. Only alerts you send will appear on your graphs, so choose triggers and intervals that make sense for your use case.
Pingdom paste Hosted Graphite endpoint
  • Ensure the notification is being sent through WebHooks. (You can send it to other services too, if you’d like.)
Pingdom paste Hosted Graphite endpoint

You’ve now saved a Hosted Graphite webhook for your alerting endpoint and assigned it to an alert. Now, once you’ve triggered some alerts, you can plot them on your graphs.

To View Sentry Annotations in Grafana

  • Browse to your Hosted Graphite graph and open the Annotations dialog
Enable Annotations
  • Create a new annotation
Click "New" to create a new annotation
  • Name your annotation, and query on any tag to see your Sentry alerts
Add annotation name you like and 'sentry' as your event query

Sentry tags are sent as (key, value) pairs, but Hosted Graphite annotations are a series of strings. If your events are tagged with (room: "356B"), you’ll be able to query it using room=356B. By default we store the project slug, server name, error level, and the word “sentry” so you can quickly filter annotations for your dashboards.

  • Finally, you will see Sentry events on your graph
Sentry events appear as a red vertical line on your graph

More information on annotations can be found by following our annotations documentation.