Skip to content

Commit 770f093

Browse files
armenzgleeandher
authored andcommitted
Recover Kafka notes and make reference to deployment notes (#13880)
Recover changes from #13834 and point to more detailed instructions in the shared Kafka README file.
1 parent 6a6e4d2 commit 770f093

File tree

4 files changed

+46
-3
lines changed

4 files changed

+46
-3
lines changed

develop-docs/backend/application-domains/kafka.mdx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,34 @@ title: Kafka consumers
33
sidebar_order: 60
44
---
55

6-
Visit https://github.com/getsentry/ops/tree/master/shared_config/kafka for a full, in-depth step-by-step guide.
6+
## Create a new Kafka topic
7+
8+
1. Add the topic to the `KAFKA_TOPIC_TO_CLUSTER` in [src/sentry/conf/server.py](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/server.py):
9+
* e.g. `subscription-results-eap-items`
10+
2. Add the topic to `Topic` in [src/sentry/conf/types/kafka_definition.py](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/types/kafka_definition.py)
11+
12+
## Define or re-use a processing strategy
13+
14+
In most cases a [Streaming Factory](https://getsentry.github.io/arroyo/getstarted.html#create-a-streaming-consumer) is what you want to when defining a consumer (see next section). You can find examples of it in [Sentry's code base](https://github.com/search?q=repo%3Agetsentry%2Fsentry+%28ProcessingStrategyFactory&type=code).
15+
16+
## Define a new Kafka consumer
17+
18+
1. Add a new entry in the `KAFKA_CONSUMERS` key in
19+
[src/sentry/consumers/__init__.py](https://github.com/getsentry/sentry/blob/master/src/sentry/consumers/__init__.py):
20+
```python
21+
KAFKA_CONSUMERS = {
22+
"<your_topic_str_here>": {
23+
"topic": Topic.YOUR_TOPIC,
24+
"strategy_factory": "sentry_package_defining_your_strategy_factory_class",
25+
}
26+
}
27+
```
28+
2. You may need optional properties (e.g. `click_options`, you will need to research them by looking at [ConsumerDefinition](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/types/kafka_definition.py)'s code.
29+
30+
3. Make sure you can run it: `sentry run consumer <your_topic>`
31+
4. You may need to add some devserver options [here](https://github.com/getsentry/sentry/blob/master/src/sentry/runner/commands/devserver.py).
32+
4. Add tests for your consumer
33+
34+
## Deployment
35+
36+
Visit the Ops repo and search for `shared_config/kafka/README.md` for a full, in-depth step-by-step guide.
122 KB
Loading
63 KB
Loading

docs/organization/integrations/issue-tracking/incidentio/index.mdx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ This integration is maintained and supported by the company that created it. For
1313
<Alert>
1414

1515
Sentry owner, manager, or admin permissions are required to install this integration.
16-
1716
incident.io **won't** work with self-hosted Sentry.
1817

1918
</Alert>
@@ -40,7 +39,7 @@ The Sentry issue is now attached to the incident:
4039

4140
![Incident with Sentry issue attached](./img/incidentio-attach-post.png)
4241

43-
### In sentry.io
42+
### In Sentry
4443

4544
To attach a Sentry issue to an incident in [sentry.io](https://sentry.io), navigate to a specific Sentry issue and find the "Linked Issues" section on the right panel. Click "Link incident.io issue" and select your active incident from the dropdown:
4645

@@ -51,3 +50,17 @@ To attach a Sentry issue to an incident in [sentry.io](https://sentry.io), navig
5150
The incident's Slack channel will be updated with attached Sentry issue comments, edited comments, and when the Sentry issue is resolved:
5251

5352
![Synced comments from Sentry on an incident in Slack](./img/incidentio-issue-sync.png)
53+
54+
55+
## Alerting
56+
57+
Once installed, you can also set Sentry to be an alert source for incidents.
58+
59+
![incident.io alert setup](./img/incidentio-alert-setup.png)
60+
61+
Afterward, within Sentry you can connect it to that newly created source in an alert rule.
62+
63+
![incident.io alert rule](./img/incidentio-alert-rule.png)
64+
65+
66+
When the alert fires, it'll create an incident on incident.io, with all the downstream affects you set up on that side.

0 commit comments

Comments
 (0)