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

ref(metrics): Change metrics topic name #2089

Merged
merged 2 commits into from
Sep 28, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lynnagara was this all I needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks. Has this topic already being created in production? If yes we should make sure it has this configuration, if no we need to create it with this configuration.

Copy link
Member Author

@MeredithAnya MeredithAnya Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lynnagara

Has this topic already being created in production?

not to my knowledge, is this something we can open a PR for? or is it a request to ops?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can wait till when we will run the consumer in prod. Anyway there is no Clickhouse storage. Let's get everything working properly in dev first

}
if settings.ENABLE_SESSIONS_SUBSCRIPTIONS:
config.update({Topic.SESSIONS: {"message.timestamp.type": "LogAppendTime"}})
return config.get(topic, {})