diff --git a/src/docs/issue-platform.mdx b/src/docs/issue-platform.mdx index fc89160e68..3e46d27c14 100644 --- a/src/docs/issue-platform.mdx +++ b/src/docs/issue-platform.mdx @@ -29,6 +29,8 @@ You may also set these optional attributes: - `noise_config`: A `NoiseConfig` that allows you to set policy on how many times a fingerprint must occur in a period of time before an issue is created. NoiseConfig has two attributes: - `ignore_limit`: How many occurrences need to occur before we create a new issue - `expiry_time`: The period of time the occurrences must occur in before we reset the count +- `enable_auto_resolve`: Whether this issue type can be resolved automatically after a number of days with no events. The auto_resolve window is configurable in each project's settings. By default this attribute is set to true. +- `enable_escalation_detection`: Whether this issue type can escalate using the Escalating Issues Algorithm. By default this attribute is set to true. Here's an example issue type: ```python @@ -53,8 +55,13 @@ class ProfileFileIOGroupType(GroupType): ### Register a Category You might also want to register a new category related to your issue type as well. This allows you to group related issue types together. To do so, add your category to this enum -## Send Occurrences to the Issue Platform -If operating within the Sentry codebase, you can call sentry.issues.produce_occurrence_to_kafka and pass in the IssueOccurrence, and optionally the `Event` data. The fields in these are described in the schemas below. +## Send Occurrence or Status Change Payloads to the Issue Platform +If operating within the Sentry codebase, you can call sentry.issues.produce_occurrence_to_kafka with the following optional parameters: +- `payload_type`: PayloadType +- `occurrence`: IssueOccurrence +- `status_change`: StatusChangeMessage +- `event_data`: Dict[str, Any] + If operating from an external service then pass a json payload that matches the Issue Occurrence Schema to the `ingest-occurrences` topic on the issue occurrences Kafka cluster @@ -118,6 +125,25 @@ There's a minimum set of fields which should be included: Caveats - Attachments will not work. If you have a need for this please contact the issues team. +### Payload Type +Determines the type of payload sent to the issue platform. By default, `payload_type` is set to `OCCURRENCE`. + +The PayloadType enum has two types: +- `OCCURRENCE`: for sending an occurrence +- `STATUS_CHANGE`: for sending a status update + +### Staus Change Message +If `payload_type` is set to `STATUS_CHANGE` in `produce_occurrence_to_kafka`, `status_change` will update the status of an issue. + +The `StatusChangeMessage` schema is as follows: +- `fingerprint`: unique identifier for the occurrence +- `project_id`: int. +- `new_status`: int. Uses GroupStatus enum. We currently support the following: + - `UNRESOLVED` + - `RESOLVED` + - `IGNORED` +- `new_substatus`: int | None. Uses GroupSubStatus enum. We do not support the `NEW` substatus. + ## Releasing your issue type The issue platform provides functionality to help release your new issue type in a controlled way. There are 3 feature flags that are used to release an issue type: - Ingest - This controls whether we'll accept or drop issues of this type in our consumer