Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTPLAT-484] DDSaaS: Sanity: Integration v1.0.0 #19333

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8478b9d
Sanity integration skeleton
bparmar-crest Dec 23, 2024
7fea51c
Added Sanity integration assets
mauneelsorathia-crest Jan 2, 2025
ff2df14
Resolved log pipeline test failures
mauneelsorathia-crest Jan 2, 2025
1cf1620
Updated dashboard and monitors
mauneelsorathia-crest Jan 3, 2025
179346b
Merge branch 'DataDog:master' into sanity-assets-v1.0.0
bparmar-crest Jan 3, 2025
76fb738
README changes
bparmar-crest Jan 3, 2025
b71beef
conflicts resolved
bparmar-crest Jan 24, 2025
b2acc10
Merge branch 'master' into sanity-assets-v1.0.0
mauneelsorathia-crest Feb 5, 2025
600f5bc
Merge branch 'master' into sanity-assets-v1.0.0
mauneelsorathia-crest Feb 10, 2025
18caf09
README update
mauneel-sorathia Feb 10, 2025
868409a
Update sanity/assets/dashboards/sanity_activity_overview.json
mauneelsorathia-crest Feb 11, 2025
f2ceeaa
Update sanity/assets/dashboards/sanity_activity_overview.json
mauneelsorathia-crest Feb 11, 2025
0123250
Update sanity/assets/dashboards/sanity_activity_overview.json
mauneelsorathia-crest Feb 11, 2025
7cfd4e0
Update sanity/manifest.json
mauneelsorathia-crest Feb 11, 2025
74f1d7c
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
b2ad497
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
396b978
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
096be46
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
632c3e5
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
2c32f69
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
33e1959
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
daa5e9a
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
31597de
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
a930023
Update sanity/README.md
mauneelsorathia-crest Feb 11, 2025
0d45e8d
Merge branch 'master' into sanity-assets-v1.0.0
mauneelsorathia-crest Feb 11, 2025
2a37cd1
Merge branch 'master' into sanity-assets-v1.0.0
mauneelsorathia-crest Feb 18, 2025
515a679
Merge branch 'master' into sanity-assets-v1.0.0
bparmar-crest Feb 19, 2025
c1f5e6f
CODEOWNERS updated
bparmar-crest Feb 19, 2025
8ef2d1b
CODEOWNERS reverted
bparmar-crest Feb 19, 2025
d25a9a3
Merge branch 'master' into sanity-assets-v1.0.0
bparmar-crest Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ datadog_checks_base/datadog_checks/base/checks/windows/ @DataDog/wi
/postmark/manifest.json @DataDog/saas-integrations @DataDog/documentation
/postmark/assets/logs/ @DataDog/saas-integrations @DataDog/documentation @DataDog/logs-backend

/sanity/ @DataDog/saas-integrations
/sanity/*.md @DataDog/saas-integrations @DataDog/documentation
/sanity/manifest.json @DataDog/saas-integrations @DataDog/documentation
/sanity/assets/logs/ @DataDog/saas-integrations @DataDog/documentation @DataDog/logs-backend @DataDog/logs-core

/snowflake/ @DataDog/saas-integrations
/snowflake/*.md @DataDog/saas-integrations @DataDog/documentation @DataDog/agent-integrations
/snowflake/changelog.d/ @DataDog/saas-integrations @DataDog/documentation @DataDog/agent-integrations
Expand Down
84 changes: 65 additions & 19 deletions sanity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,83 @@

## Overview

This check monitors [Sanity][1].
[Sanity][1] is a headless content management system (CMS) designed for building flexible, real-time websites and applications. It enables developers and content teams to efficiently manage structured content across multiple platforms.

## Setup

### Configuration
Integrate Sanity with Datadog to gain insights into content and project-related activity logs through the Sanity API and GROQ-powered Webhook. Pre-built dashboard visualizations provide immediate insights into Sanity activity logs.

!!! Add list of steps to set up this integration !!!

### Validation
## Setup

!!! Add steps to validate integration is functioning as expected !!!
### Generate API Token in Sanity

1. Log in to your [Sanity account][2] as an Administrator. You are automatically redirected to the [manage page][3].
2. Select your project.
3. In the navigation panel, click **API**.
4. In the left sidebar, select **Tokens**.
5. Click **Add API Token**.
6. Enter a name and set the permission to **Viewer**.
7. Click **Save** to copy a newly generated token.

### Connect your Sanity account to Datadog

1. Add your Sanity API Token
|Parameters|Description|
|--------------------|--------------------|
|API Token|API Token of your Sanity project.|

2. Click the **Save** button to save your settings.

**Note**: These steps enable collection of project activity logs.

### Webhook Configuration
Configure the Datadog endpoint to forward Sanity activity logs to Datadog. See [Sanity webhook documentation][4] for more details.

1. Select an existing API key or create a new one by clicking one of the buttons below: <!-- UI Component to be added by Datadog team -->
2. Log in to your [Sanity account][2] as an Administrator. You are automatically redirected to the [manage page][3].
3. Select your project.
4. In the navigation panel, click **API**.
5. Click **Create Webhook**.
6. Add the name and webhook URL generated in step 1.
7. Select Dataset as `* (all datasets)`.
8. Under the **Trigger on** section, select the types of Document events you want to send to Datadog.
9. Under the **Projection** section, paste the below JSON:
```
{
"documentId": _id,
"documentType": _type,
"projectId": sanity::projectId(),
"datasetName": sanity::dataset(),
"action": "document." + delta::operation(),
"beforeValues": before(),
"afterValues": after(),
"timestamp": now()
}
```
**Note**: It is recommended to _**uncheck**_ the **Trigger webhook when drafts are modified** checkbox in the Drafts section.
10. Ensure **POST** is selected under **HTTP method** in the **Advanced settings section**.
11. Click **Save**.

**Note**: These steps enable collection of document changes along with task and comment activity logs.

## Data Collected

### Metrics
### Logs

Sanity does not include any metrics.
The Sanity integration collects and forwards Sanity activity logs to Datadog.

### Service Checks
### Metrics

Sanity does not include any service checks.
The Sanity integration does not include any metrics.

### Events

Sanity does not include any events.

## Troubleshooting
The Sanity integration does not include any events.

Need help? Contact [Datadog support][3].
## Support

[1]: **LINK_TO_INTEGRATION_SITE**
[2]: https://app.datadoghq.com/account/settings/agent/latest
[3]: https://docs.datadoghq.com/help/
For further assistance, contact [Datadog Support][5].

[1]: https://www.sanity.io/
[2]: https://www.sanity.io/login
[3]: https://www.sanity.io/manage
[4]: https://www.sanity.io/docs/webhooks#
[5]: https://docs.datadoghq.com/help/
Loading
Loading