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.
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 and copy your Sentry webhook location by clicking the ‘Copy’ button and follow the mouseover directions
- Browse to your Sentry account, visit ‘Project Settings’ section, and click ‘All Integrations’
- Scroll down to ‘WebHooks’ and make sure the tickbox is checked. Save changes if necessary.
- Browse to the Alerts settings
- Scroll down, and add the Hosted Graphite Sentry webhook location to the field. Don’t forget to save your changes.
- 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.
- Ensure the notification is being sent through WebHooks. (You can send it to other services too, if you’d like.)
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.
- Browse to your Hosted Graphite graph and open the Annotations dialog
- Create and name a new annotation, and query on any tag to see your Sentry alerts
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