You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sanity/README.md
+30-12Lines changed: 30 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,18 +29,22 @@ Integrate Sanity with Datadog to gain insights into content and project-related
29
29
30
30
**Note**: These steps enable collection of project activity logs.
31
31
32
-
### Webhook Configuration
33
-
Configure the Datadog endpoint to forward Sanity activity logs to Datadog. See [Sanity webhook documentation][4] for more details.
32
+
### Retrieve the Datadog Webhook URL
34
33
35
34
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 -->
36
-
2. Log in to your [Sanity account][2] as an Administrator. You are automatically redirected to the [manage page][3].
37
-
3. Select your project.
38
-
4. In the navigation panel, click **API**.
39
-
5. Click **Create Webhook**.
40
-
6. Add the name and webhook URL generated in step 1.
41
-
7. Select Dataset as `* (all datasets)`.
42
-
8. Under the **Trigger on** section, select the types of Document events you want to send to Datadog.
43
-
9. Under the **Projection** section, paste the below JSON:
35
+
36
+
**Note**: To set up the webhook, please follow the instructions provided in the Manual Webhook Configuration. Alternatively, you can use the Share Webhook Configurations option to apply a pre-configured setup.
37
+
38
+
### Manual Webhook Configuration
39
+
40
+
1. Log in to your [Sanity account][2] as an Administrator. You are automatically redirected to the [manage page][3].
41
+
2. Select your project.
42
+
3. In the navigation panel, click **API**.
43
+
4. Click **Create Webhook**.
44
+
5. Add the name and use the Datadog webhook URL.
45
+
6. Select Dataset as `* (all datasets)`.
46
+
7. Under the **Trigger on** section, select the types of Document events you want to send to Datadog.
47
+
8. Under the **Projection** section, paste the below JSON:
44
48
```
45
49
{
46
50
"documentId": _id,
@@ -54,8 +58,21 @@ Configure the Datadog endpoint to forward Sanity activity logs to Datadog. See [
54
58
}
55
59
```
56
60
**Note**: It is recommended to _**uncheck**_ the **Trigger webhook when drafts are modified** checkbox in the Drafts section.
57
-
10. Ensure **POST** is selected under **HTTP method** in the **Advanced settings section**.
58
-
11. Click **Save**.
61
+
9. Ensure **POST** is selected under **HTTP method** in the **Advanced settings section**.
62
+
10. Click **Save**.
63
+
64
+
### Share Webhook Configuration
65
+
66
+
**Note**: These are alternative steps for **Manual Webhook Configuration**. Follow only one set of instructions.
67
+
1. Log in to your [Sanity account][2] as an Administrator.
68
+
2. To configure the webhook automatically, please follow the [Sanity webhook configuration][6].
69
+
3. Update the existing URL with the Datadog webhook URL.
70
+
4. Click **Apply webhook**.
71
+
5. In the configuration dialog, set the following parameters:
72
+
- **Organization**: Select the organization from the dropdown list.
73
+
- **Project**: Select the relevant project from the dropdown list.
74
+
- **Dataset**: Select `* (all datasets)`.
75
+
6. Click **Create webhook**.
59
76
60
77
**Note**: These steps enable collection of document changes along with task and comment activity logs.
61
78
@@ -82,3 +99,4 @@ For further assistance, contact [Datadog Support][5].
0 commit comments