Skip to content

Commit

Permalink
feat(feedback): use ConsumerType in consumer defns + rename feedback …
Browse files Browse the repository at this point in the history
…c.type (#67404)
  • Loading branch information
aliu3ntry committed Mar 21, 2024
1 parent 6330cb9 commit 3f7e560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/sentry/consumers/__init__.py
Expand Up @@ -23,6 +23,7 @@
validate_consumer_definition,
)
from sentry.consumers.validate_schema import ValidateSchema
from sentry.ingest.types import ConsumerType
from sentry.utils.imports import import_string
from sentry.utils.kafka_config import get_kafka_producer_cluster_options, get_topic_definition

Expand Down Expand Up @@ -257,7 +258,7 @@ def ingest_events_options() -> list[click.Option]:
"strategy_factory": "sentry.ingest.consumer.factory.IngestStrategyFactory",
"click_options": ingest_events_options(),
"static_args": {
"consumer_type": "events",
"consumer_type": ConsumerType.Events,
},
"dlq_topic": Topic.INGEST_EVENTS_DLQ,
},
Expand All @@ -266,7 +267,7 @@ def ingest_events_options() -> list[click.Option]:
"strategy_factory": "sentry.ingest.consumer.factory.IngestStrategyFactory",
"click_options": ingest_events_options(),
"static_args": {
"consumer_type": "feedback-events",
"consumer_type": ConsumerType.Feedback,
},
"dlq_topic": Topic.INGEST_FEEDBACK_EVENTS_DLQ,
},
Expand All @@ -275,7 +276,7 @@ def ingest_events_options() -> list[click.Option]:
"strategy_factory": "sentry.ingest.consumer.factory.IngestStrategyFactory",
"click_options": ingest_events_options(),
"static_args": {
"consumer_type": "attachments",
"consumer_type": ConsumerType.Attachments,
},
"dlq_topic": Topic.INGEST_ATTACHMENTS_DLQ,
},
Expand All @@ -284,7 +285,7 @@ def ingest_events_options() -> list[click.Option]:
"strategy_factory": "sentry.ingest.consumer.factory.IngestStrategyFactory",
"click_options": ingest_events_options(),
"static_args": {
"consumer_type": "transactions",
"consumer_type": ConsumerType.Transactions,
},
"dlq_topic": Topic.INGEST_TRANSACTIONS_DLQ,
},
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/ingest/types.py
Expand Up @@ -6,4 +6,4 @@ class ConsumerType:
Events = "events" # consumes simple events ( from the Events topic)
Attachments = "attachments" # consumes events with attachments ( from the Attachments topic)
Transactions = "transactions" # consumes transaction events ( from the Transactions topic)
FeedbackEvents = "feedback-events" # consumes user feedback events ( from the Feedbacks topic)
Feedback = "feedback" # consumes user feedback ( from the ingest-feedback-events topic)

0 comments on commit 3f7e560

Please sign in to comment.