Skip to content

Commit

Permalink
feat(alerts): Adds EAP spans results consumer configs (#81365)
Browse files Browse the repository at this point in the history
Adds EAP spans results consumer configs
  • Loading branch information
edwardgou-sentry authored Nov 27, 2024
1 parent 99c4755 commit 0845154
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,7 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
"transactions-subscription-results": "default",
"generic-metrics-subscription-results": "default",
"metrics-subscription-results": "default",
"eap-spans-subscription-results": "default",
"ingest-events": "default",
"ingest-feedback-events": "default",
"ingest-feedback-events-dlq": "default",
Expand Down
1 change: 1 addition & 0 deletions src/sentry/conf/types/kafka_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Topic(Enum):
TRANSACTIONS_SUBSCRIPTIONS_RESULTS = "transactions-subscription-results"
GENERIC_METRICS_SUBSCRIPTIONS_RESULTS = "generic-metrics-subscription-results"
METRICS_SUBSCRIPTIONS_RESULTS = "metrics-subscription-results"
EAP_SPANS_SUBSCRIPTIONS_RESULTS = "eap-spans-subscription-results"
INGEST_EVENTS = "ingest-events"
INGEST_EVENTS_DLQ = "ingest-events-dlq"
INGEST_FEEDBACK_EVENTS = "ingest-feedback-events"
Expand Down
6 changes: 6 additions & 0 deletions src/sentry/consumers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ def ingest_transactions_options() -> list[click.Option]:
"click_options": multiprocessing_options(default_max_batch_size=100),
"static_args": {"dataset": "metrics"},
},
"eap-spans-subscription-results": {
"topic": Topic.EAP_SPANS_SUBSCRIPTIONS_RESULTS,
"strategy_factory": "sentry.snuba.query_subscriptions.run.QuerySubscriptionStrategyFactory",
"click_options": multiprocessing_options(default_max_batch_size=100),
"static_args": {"dataset": "events_analytics_platform"},
},
"ingest-events": {
"topic": Topic.INGEST_EVENTS,
"strategy_factory": "sentry.ingest.consumer.factory.IngestStrategyFactory",
Expand Down
1 change: 1 addition & 0 deletions src/sentry/runner/commands/devserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"transactions-subscription-results",
"generic-metrics-subscription-results",
"metrics-subscription-results",
"eap-spans-subscription-results",
]


Expand Down
1 change: 1 addition & 0 deletions src/sentry/snuba/query_subscriptions/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Dataset.Transactions: "transactions-subscription-results",
Dataset.PerformanceMetrics: "generic-metrics-subscription-results",
Dataset.Metrics: "metrics-subscription-results",
Dataset.EventsAnalyticsPlatform: "eap-spans-subscription-results",
}

topic_to_dataset = {
Expand Down
1 change: 1 addition & 0 deletions tests/sentry/consumers/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_dlq(consumer_def) -> None:
"transactions-subscription-results",
"generic-metrics-subscription-results",
"metrics-subscription-results",
"eap-spans-subscription-results",
]
consumers_that_should_have_dlq_but_dont = [
"process-spans",
Expand Down

0 comments on commit 0845154

Please sign in to comment.