From 52ce6f0f430220d5a779798885b87de7a136c4de Mon Sep 17 00:00:00 2001 From: Leander Rodrigues Date: Tue, 31 May 2022 16:25:06 -0700 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=9D=20Add=20info=20explaining=20UR?= =?UTF-8?q?I=20formatting=20to=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui-components/alert-rule-action.mdx | 5 ++--- .../integration-platform/ui-components/formfield.mdx | 2 +- .../integration-platform/ui-components/index.mdx | 5 +++++ .../ui-components/issue-link.mdx | 6 +----- .../ui-components/stacktrace-link.mdx | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx b/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx index 6d9decbab40dd..cf531818dca03 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx @@ -33,7 +33,7 @@ The alert rule action component gives you to access to parameters to define rout ## Attributes - `title` - (Required) The title shown in the UI component. -- `uri` - (Required) Sentry will make a POST request to the URI when the User submits the form. If the services fails to process the request (status code >= 400), this component will bubble up the error to the User with the provided response text. +- `uri` - (Required) Sentry will make a POST request to the URI when the User submits the form. If the services fails to process the request (status code >= 400), this component will bubble up the error to the User with the provided response text. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. - `required_fields` - (Required) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User is required to complete. - `optional_fields` - (Optional) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User may complete. - `description` - (Optional) Text that will be displayed above the form. Limited to 140 characters. @@ -69,7 +69,6 @@ The alert rule action component gives you to access to parameters to define rout } ``` - ## Issue Alert Request Format When an issue alert fires, your service will need to read the settings from the alert payload. The `settings` are in `data.issue_alert.settings`. Check out the full [Issue Alert webhook documentation](/product/integrations/integration-platform/webhooks/issue-alerts) for more information. @@ -141,7 +140,7 @@ When a metric alert fires, your service will need to read the settings from the If a user setting up an alert rule action with your app tries to save an incorrect or malformed configuration, you can surface the errors to them directly in [sentry.io](https://sentry.io) by responding to the POST request with a JSON response in this shape: ```json -{"message": "Channel no longer exists!"} +{ "message": "Channel no longer exists!" } ``` Alternately, if an error code (40x, 50x) is returned, we will show a generic error message. If an error occurs, the user will not be able to save the alert rule. diff --git a/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx b/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx index 4a5b5ba2991f1..5eebe422d13fb 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx @@ -69,7 +69,7 @@ The [issue linking](/product/integrations/integration-platform/ui-components/iss - `label` - (Required) Label text to be rendered for the form field - `name` - (Required) Value to use in `name` attribute of the field -- `uri` - (Required if developer doesn't provide `options`) URI to retrieve values from. +- `uri` - (Required if developer doesn't provide `options`) URI to retrieve values from. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. - `async` - (Optional) Used only if `uri` is present. If true (default), will query the URI as the user types, for autocomplete suggestions (see response format below). If false, will query the URI once initially to retrieve all possible options. This request _must_ succeed, and the response _must_ return data in the format Sentry expects, otherwise the entire component won't render. - `options` - (Required if developer doesn't provide `uri`) Static list of options in the format of [value, label] - `depends_on` - (Optional) If a field value depends on the value of another field, a request will be made to load those options when the dependent field is set. diff --git a/src/docs/product/integrations/integration-platform/ui-components/index.mdx b/src/docs/product/integrations/integration-platform/ui-components/index.mdx index e6da0925e635f..896a0a740e9bd 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/index.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/index.mdx @@ -27,6 +27,11 @@ The UI components are specified in the schema section of the integration details } ``` +### URI Guidelines + +The `uri` keys in your schema elements describe the URI path that will receive a request from that UI Component. Sentry will append the path in the `uri` field onto the host of your integration's **Webhook URL**. +For example, if the Webhook URL is `https://example.com/webhook/`, and your schema's `uri` attribute is `/alerts/`, then the integration will receive requests to `https://example.com/alerts/`. + ## Error Handling Component rendering either 100% works or shows nothing. To protect the integration from looking chaotic due to errors we have no control over, if any part of the third-party component rendering fails, nothing will render. diff --git a/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx b/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx index 5df4d34c2c5df..5e36eebdcf670 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx @@ -39,11 +39,10 @@ When an external issue is created or linked in [sentry.io](https://sentry.io), a ## Attributes -- `uri` - (Required) The URI to request when the User submits the Link/Create Issue form. +- `uri` - (Required) The URI to request when the User submits the Link/Create Issue form. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. - `required_fields` - (Required) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User is required to complete. - `optional_fields` - (Optional) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User may complete. - ## Example ```json {filename:schema.json} @@ -86,9 +85,6 @@ When an external issue is created or linked in [sentry.io](https://sentry.io), a } ``` - - - ## Request Format When a user attempts to create or link an issue, we will send a request to your service based on the provided `uri`. We send a `POST` request, so all the information is stored in the body. diff --git a/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx b/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx index ad2eedc292cff..2f33cfe1c47f0 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx @@ -23,11 +23,11 @@ This feature allows you to insert a link within a stack trace frame. The link co ## Attributes -- `uri` - (Required) The link destination. Sentry will automatically add the following query params to the link. - - `installationId` - Your integration's installation ID (helps you determine the requesting Sentry org) - - `projectSlug` - slug of the project the issue belongs to - - `filename` - full path of the stack frame file - - `lineNo` - line number of the stack trace in the file +- `uri` - (Required) The link destination. Sentry will automatically add the following query params to the link. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. + - `installationId` - Your integration's installation ID (helps you determine the requesting Sentry org) + - `projectSlug` - slug of the project the issue belongs to + - `filename` - full path of the stack frame file + - `lineNo` - line number of the stack trace in the file ## Example @@ -36,7 +36,7 @@ This feature allows you to insert a link within a stack trace frame. The link co "elements": [ { "type": "stacktrace-link", - "uri": "/stacktrace-redirect", + "uri": "/stacktrace-redirect" } ] } From 2f9d7c4a56466fb88e79543f029811f8d8ef31ac Mon Sep 17 00:00:00 2001 From: Leander Rodrigues Date: Wed, 1 Jun 2022 10:00:01 -0700 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --- .../integrations/integration-platform/ui-components/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/product/integrations/integration-platform/ui-components/index.mdx b/src/docs/product/integrations/integration-platform/ui-components/index.mdx index 896a0a740e9bd..3e3d64ac2bf0e 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/index.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/index.mdx @@ -29,8 +29,8 @@ The UI components are specified in the schema section of the integration details ### URI Guidelines -The `uri` keys in your schema elements describe the URI path that will receive a request from that UI Component. Sentry will append the path in the `uri` field onto the host of your integration's **Webhook URL**. -For example, if the Webhook URL is `https://example.com/webhook/`, and your schema's `uri` attribute is `/alerts/`, then the integration will receive requests to `https://example.com/alerts/`. +The `uri` keys in your schema elements describe the URI path that will receive a request from that UI component. Sentry will append the path in the `uri` field onto the host of your integration's _webhook URL_. +For example, if the webhook URL is `https://example.com/webhook/`, and your schema's `uri` attribute is `/alerts/`, then the integration will receive requests to `https://example.com/alerts/`. ## Error Handling From 9488b321c4ce76a80ac9b6b801f988b959650a87 Mon Sep 17 00:00:00 2001 From: Leander Rodrigues Date: Wed, 1 Jun 2022 10:00:32 -0700 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20Rewrite=20pointer?= =?UTF-8?q?=20to=20other=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../integration-platform/ui-components/alert-rule-action.mdx | 2 +- .../integration-platform/ui-components/formfield.mdx | 2 +- .../integration-platform/ui-components/issue-link.mdx | 2 +- .../integration-platform/ui-components/stacktrace-link.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx b/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx index cf531818dca03..c0e859284fe7c 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/alert-rule-action.mdx @@ -33,7 +33,7 @@ The alert rule action component gives you to access to parameters to define rout ## Attributes - `title` - (Required) The title shown in the UI component. -- `uri` - (Required) Sentry will make a POST request to the URI when the User submits the form. If the services fails to process the request (status code >= 400), this component will bubble up the error to the User with the provided response text. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. +- `uri` - (Required) Sentry will make a POST request to the URI when the User submits the form. If the services fails to process the request (status code >= 400), this component will bubble up the error to the User with the provided response text. Check out our [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) documentation for formatting help. - `required_fields` - (Required) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User is required to complete. - `optional_fields` - (Optional) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User may complete. - `description` - (Optional) Text that will be displayed above the form. Limited to 140 characters. diff --git a/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx b/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx index 5eebe422d13fb..975543703e491 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/formfield.mdx @@ -69,7 +69,7 @@ The [issue linking](/product/integrations/integration-platform/ui-components/iss - `label` - (Required) Label text to be rendered for the form field - `name` - (Required) Value to use in `name` attribute of the field -- `uri` - (Required if developer doesn't provide `options`) URI to retrieve values from. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. +- `uri` - (Required if developer doesn't provide `options`) URI to retrieve values from. Check out our [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) documentation for formatting help. - `async` - (Optional) Used only if `uri` is present. If true (default), will query the URI as the user types, for autocomplete suggestions (see response format below). If false, will query the URI once initially to retrieve all possible options. This request _must_ succeed, and the response _must_ return data in the format Sentry expects, otherwise the entire component won't render. - `options` - (Required if developer doesn't provide `uri`) Static list of options in the format of [value, label] - `depends_on` - (Optional) If a field value depends on the value of another field, a request will be made to load those options when the dependent field is set. diff --git a/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx b/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx index 5e36eebdcf670..fb380a5bb4bfe 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/issue-link.mdx @@ -39,7 +39,7 @@ When an external issue is created or linked in [sentry.io](https://sentry.io), a ## Attributes -- `uri` - (Required) The URI to request when the User submits the Link/Create Issue form. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. +- `uri` - (Required) The URI to request when the User submits the Link/Create Issue form. Check out our [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) documentation for formatting help. - `required_fields` - (Required) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User is required to complete. - `optional_fields` - (Optional) List of [FormField](/product/integrations/integration-platform/ui-components/formfield) components the User may complete. diff --git a/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx b/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx index 2f33cfe1c47f0..6fb5a173ba130 100644 --- a/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx +++ b/src/docs/product/integrations/integration-platform/ui-components/stacktrace-link.mdx @@ -23,7 +23,7 @@ This feature allows you to insert a link within a stack trace frame. The link co ## Attributes -- `uri` - (Required) The link destination. Sentry will automatically add the following query params to the link. See [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) for formatting help. +- `uri` - (Required) The link destination. Sentry will automatically add the following query params to the link. Check out our [URI Guidelines](/product/integrations/integration-platform/ui-components/#uri-guidelines) documentation for formatting help. - `installationId` - Your integration's installation ID (helps you determine the requesting Sentry org) - `projectSlug` - slug of the project the issue belongs to - `filename` - full path of the stack frame file