Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This brings back #66287. It was reverted before as it depended on an earlier commit which was also reverted. Nothing has changed though. Depends on #66381
- Loading branch information
Showing
4 changed files
with
23 additions
and
27 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,18 +1,16 @@ | ||
from django.conf import settings | ||
|
||
from sentry.conf.types.kafka_definition import Topic | ||
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