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
docs(self-hosted): visualize kafka lags through UI (#14475)
Not all self-hosted users has experience with managing Kafka, since most
of them are developers, not SRE. Through this, hopefully they can
visualize (and monitor) their Kafka lags better.
Copy file name to clipboardExpand all lines: develop-docs/self-hosted/troubleshooting/kafka.mdx
+65-9Lines changed: 65 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,33 +16,89 @@ This happens where Kafka and the consumers get out of sync. Possible reasons are
16
16
2. Having a sustained event spike that causes very long processing times, causing Kafka to drop messages as they go past the retention time
17
17
3. Date/time out of sync issues due to a restart or suspend/resume cycle
18
18
19
+
### Visualize
20
+
21
+
You can visualize the Kafka consumers and their offsets by bringing an additional container, such as [Kafka UI](https://github.com/provectus/kafka-ui) or [Redpanda Console](https://github.com/redpanda-data/console) into your Docker Compose.
Ideally, you want to have zero lag for all consumer groups. If a consumer group has a lot of lag, you need to investigate whether it's caused by a disconnected consumer (e.g., a Sentry/Snuba container that's disconnected from Kafka) or a consumer that's stuck processing a certain message. If it's a disconnected consumer, you can either restart the container or reset the Kafka offset to 'earliest.' Otherwise, you can reset the Kafka offset to 'latest.'
63
+
19
64
### Recovery
20
65
21
-
Note: These solutions may result in data loss when resetting the offset of the snuba consumers.
66
+
<Alert level="warning" title="Warning">
67
+
These solutions may result in data loss for the duration of your Kafka event retention (defaults to 24 hours) when resetting the offset of the consumers.
68
+
</Alert>
22
69
23
70
#### Proper solution
24
71
25
-
The _proper_ solution is as follows ([reported](https://github.com/getsentry/self-hosted/issues/478#issuecomment-666254392) by [@rmisyurev](https://github.com/rmisyurev)):
72
+
The _proper_ solution is as follows ([reported](https://github.com/getsentry/self-hosted/issues/478#issuecomment-666254392) by [@rmisyurev](https://github.com/rmisyurev)). This example uses `snuba-consumers` with `events` topic. Your consumer group name and topic name may be different.
26
73
27
-
1. Receive consumers list:
74
+
1. Shutdown the corresponding Sentry/Snuba container that's using the consumer group (You can see the corresponding containers by inspecting the `docker-compose.yml` file):
0 commit comments