Skip to content

Commit

Permalink
ref(metrics): Change metrics topic name (#2089)
Browse files Browse the repository at this point in the history
* ref(metrics): Change metrics topic name

* add LogAppendTime
  • Loading branch information
MeredithAnya authored Sep 28, 2021
1 parent 846aff0 commit 63db117
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion snuba/settings/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _validate_settings(locals: Mapping[str, Any]) -> None:
"event-replacements-legacy",
"snuba-commit-log",
"cdc",
"ingest-metrics",
"snuba-metrics",
"outcomes",
"ingest-sessions",
"snuba-queries",
Expand Down
7 changes: 5 additions & 2 deletions snuba/utils/streams/topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Topic(Enum):
EVENT_REPLACEMENTS_LEGACY = "event-replacements-legacy"
COMMIT_LOG = "snuba-commit-log"
CDC = "cdc"
METRICS = "ingest-metrics"
METRICS = "snuba-metrics"
OUTCOMES = "outcomes"
SESSIONS = "ingest-sessions"
SESSIONS_COMMIT_LOG = "snuba-sessions-commit-log"
Expand All @@ -22,7 +22,10 @@ class Topic(Enum):


def get_topic_creation_config(topic: Topic) -> Mapping[str, str]:
config = {Topic.EVENTS: {"message.timestamp.type": "LogAppendTime"}}
config = {
Topic.EVENTS: {"message.timestamp.type": "LogAppendTime"},
Topic.METRICS: {"message.timestamp.type": "LogAppendTime"},
}
if settings.ENABLE_SESSIONS_SUBSCRIPTIONS:
config.update({Topic.SESSIONS: {"message.timestamp.type": "LogAppendTime"}})
return config.get(topic, {})

0 comments on commit 63db117

Please sign in to comment.