Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "ref: Move query subscriptions over to new-style kafka config (#…
…66287)" This reverts commit f9c2ffd. Co-authored-by: IanWoodard <17186604+IanWoodard@users.noreply.github.com>
- Loading branch information
1 parent
622827e
commit c94ad9e
Showing
4 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from sentry.conf.types.kafka_definition import Topic | ||
from django.conf import settings | ||
|
||
from sentry.snuba.dataset import Dataset | ||
from sentry.utils.kafka_config import get_topic_definition | ||
|
||
topic_to_dataset: dict[str, Dataset] = { | ||
settings.KAFKA_EVENTS_SUBSCRIPTIONS_RESULTS: Dataset.Events, | ||
settings.KAFKA_TRANSACTIONS_SUBSCRIPTIONS_RESULTS: Dataset.Transactions, | ||
settings.KAFKA_GENERIC_METRICS_SUBSCRIPTIONS_RESULTS: Dataset.PerformanceMetrics, | ||
settings.KAFKA_SESSIONS_SUBSCRIPTIONS_RESULTS: Dataset.Sessions, | ||
settings.KAFKA_METRICS_SUBSCRIPTIONS_RESULTS: Dataset.Metrics, | ||
} | ||
dataset_to_logical_topic = { | ||
Dataset.Events: "events-subscription-results", | ||
Dataset.Transactions: "transactions-subscription-results", | ||
Dataset.PerformanceMetrics: "generic-metrics-subscription-results", | ||
Dataset.Sessions: "sessions-subscription-results", | ||
Dataset.Metrics: "metrics-subscription-results", | ||
} | ||
|
||
topic_to_dataset = { | ||
get_topic_definition(Topic(logical_topic))["real_topic_name"]: dataset | ||
for (dataset, logical_topic) in dataset_to_logical_topic.items() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters