Skip to content

Commit

Permalink
feat(feedback): create kafka topic and consumer for ingest-feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed May 22, 2024
1 parent 6032d98 commit 0c82dd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ services:
- "sentry-secrets:/etc/zookeeper/secrets"
healthcheck:
<<: *healthcheck_defaults
test:
["CMD-SHELL", 'echo "ruok" | nc -w 2 localhost 2181 | grep imok']
test: ["CMD-SHELL", 'echo "ruok" | nc -w 2 localhost 2181 | grep imok']
kafka:
<<: *restart_policy
depends_on:
Expand Down Expand Up @@ -250,7 +249,8 @@ services:
# Override the entrypoint in order to avoid using envvars for config.
# Futz with settings so we can keep mmdb and conf in same dir on host
# (image looks for them in separate dirs by default).
entrypoint: ["/usr/bin/geoipupdate", "-d", "/sentry", "-f", "/sentry/GeoIP.conf"]
entrypoint:
["/usr/bin/geoipupdate", "-d", "/sentry", "-f", "/sentry/GeoIP.conf"]
volumes:
- "./geoip:/sentry"
snuba-api:
Expand Down Expand Up @@ -363,6 +363,9 @@ services:
transactions-consumer:
<<: *sentry_defaults
command: run consumer ingest-transactions --consumer-group ingest-consumer
feedback-events-consumer:
<<: *sentry_defaults
command: run consumer ingest-feedback-events --consumer-group ingest-feedback-events
metrics-consumer:
<<: *sentry_defaults
command: run consumer ingest-metrics --consumer-group metrics-consumer
Expand Down
2 changes: 1 addition & 1 deletion install/create-kafka-topics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ done

# XXX(BYK): We cannot use auto.create.topics as Confluence and Apache hates it now (and makes it very hard to enable)
EXISTING_KAFKA_TOPICS=$($dc exec -T kafka kafka-topics --list --bootstrap-server kafka:9092 2>/dev/null)
NEEDED_KAFKA_TOPICS="ingest-attachments ingest-transactions ingest-events ingest-replay-recordings profiles ingest-occurrences ingest-metrics ingest-performance-metrics ingest-monitors"
NEEDED_KAFKA_TOPICS="ingest-attachments ingest-transactions ingest-events ingest-replay-recordings profiles ingest-occurrences ingest-metrics ingest-performance-metrics ingest-monitors ingest-feedback-events"
for topic in $NEEDED_KAFKA_TOPICS; do
if ! echo "$EXISTING_KAFKA_TOPICS" | grep -qE "(^| )$topic( |$)"; then
$dc exec kafka kafka-topics --create --topic $topic --bootstrap-server kafka:9092
Expand Down

0 comments on commit 0c82dd7

Please sign in to comment.