Setting up GraphOS notifications
Set up notifications for graph performance, schema changes, and more
GraphOS can notify your team about changes to your graph and its performance. These notifications help you stay up to date and address issues as they arise.
If you don't have a GraphOS organization yet, you can get started here.
Supported notifications and channels
GraphOS can send your team the following notification types:
- Daily reports of your graph's request rate, error rate, and latency
- Schema change notifications whenever your graph's schema is updated
- Performance alerts whenever a metric such as error percentage or request latency exceeds a particular threshold (this experimental feature requires a paid plan)
- Build status notifications whenever Apollo attempts to compose a supergraph schema for your federated graph (this preview feature is enterprise only)
Currently, GraphOS can send each of these notification types to the channel(s) indicated:
Notification Type | Slack | PagerDuty | Custom Webhook |
---|---|---|---|
Daily reports | ✓ | ||
Schema change notifications | ✓ | ✓ | |
Performance alerts (paid, experimental) | ✓ | ✓ | |
Build status notifications (enterprise only) | ✓ |
Creating a notification
ⓘ NOTE
For performance alerts, see Performance alerts setup.
- Go to your graph's Settings page in GraphOS Studio.
- Select the Reporting tab.
- Click Add notification in the upper right:
- Select a notification type and click Next:
- In the dropdown, select which variant of your graph you want to receive notifications for.
- Select an existing configured channel to send notifications to, or select which type of new channel you want to configure:
- Click Next.
- If you're configuring a new channel, complete the steps in Configuring a new channel.
- If you're creating a daily report, select a time zone. The report is sent daily at 9 AM in the selected time zone.
Configuring a new channel
You create new channels as part of the notification creation process. The information you provide to Studio depends on the type of channel:
After you configure a channel for your organization, you can use it to send any notification type that the channel supports. You can add any number of notification channels to your organization.
Slack
To set up Slack notifications, you first configure an incoming webhook in Slack, then provide that webhook's URL to GraphOS Studio.
1. Create an incoming Slack hook
To create an incoming Slack hook:
- From the Incoming Hooks page of the Slack App Directory, sign in and click Add to Slack.
- Select the Slack channel that should receive Studio notifications and click Add Incoming WebHooks integration.
- Copy the Webhook URL (has the format
https://hooks.slack.com/services/...
) for use in the next step.
You can repeat this process to create webhook URLs for different Slack channels.
2. Provide the Slack hook to Studio
Back in Studio, specify a name for this notification channel in the Channel Name field. This name must be unique among your graph's notification channels.
This name does not have to match the name of the Slack channel, but it's recommended for simplicity.
In the Slack Webhook URL field, paste the webhook URL you obtained in Create an incoming Slack hook.
Click Next.
After you complete configuration, verify that your Slack channel receives a confirmation notification from Studio.
To configure multiple Slack channels, repeat this process with a different corresponding webhook URL each time.
PagerDuty
1. Create a PagerDuty integration key
Generate an integration key for the service that should receive alerts in PagerDuty. You can select an existing service that corresponds to your GraphQL API or Add New Service.
Existing services
- Navigate to the service's Integrations tab and click new integration.
- Enter an Integration Name, (for example "Apollo Alerts").
- Under "Integration type," choose Use our API directly and Events API v2.
- Click Add Integration.
- From the Integrations tab, copy the generated integration key from the table for use in the next step.
Adding a service
- Under "Integration Settings," choose Use our API directly and use Events API v2.
- Enter an Integration Name (for example,
Apollo Alerts
) and complete the add service flow. - From the Integrations tab, copy the generated integration key from the table for use in the next step.
2. Provide the integration key to Studio
Back in Studio, specify a name for this notification channel in the Channel Name field. This name must be unique among your graph's notification channels.
This name does not have to match the name of the PagerDuty service, but it's recommended for simplicity.
In the PagerDuty Integration Key field, paste the integration key you obtained in Create a PagerDuty integration key.
Click Done.
Custom webhooks (enterprise only)
This feature is only available with a GraphOS Enterprise plan.
You can test it out by signing up for a free Enterprise trial.
Custom webhooks require you to set up an HTTPS endpoint that is accessible via the public internet. Webhook notifications are sent to this endpoint as POST
requests. Notification details are provided as JSON in the request body, as described in Webhook format.
- Specify a name for this notification channel in the Channel Name field. This name must be unique among of your graph's notification channels.
- In the Webhook URL field, provide the URL of your HTTP(S) endpoint.
- Click Next and complete any remaining steps in the dialog.