Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(feedback): use ConsumerType in consumer defns + rename feedback c.type #67404

Merged
merged 6 commits into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)