-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(metrics): create the metrics kafka ingest chain via migration #89631
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
Open
jzhu13
wants to merge
2
commits into
master
Choose a base branch
from
posthog-code/local-metrics-clickhouse-ingest
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Per-env override of exclude.hcl for the local-multi convergence dump (dump-live.sh | ||
| # uses exclude-<env>.hcl when present, else exclude.hcl — it REPLACES, not merges, so | ||
| # this file must carry everything exclude.hcl does plus the local-multi-only entries). | ||
| # | ||
| # The only addition over exclude.hcl is the metrics-overlay ingest block: migration | ||
| # 0305 creates those objects on the LOGS node, but they are not modeled in the | ||
| # local-multi golden. On cloud they live in the roles/logs/shared + cloud layers and | ||
| # ARE checked (dev/prod keep using exclude.hcl); metrics1 itself diverges per env | ||
| # (value/count codecs on local + prod, none on dev), so a single all-env HCL | ||
| # declaration cannot serve both. Until that is reconciled, skip them here so the | ||
| # gate does not read migration-created objects as drift on local-multi. | ||
|
|
||
| exclude { | ||
| # Secret Kafka broker/credential config; never modeled in the goldens. | ||
| object_types = ["named_collection"] | ||
|
|
||
| patterns = [ | ||
| # --- transient (ClickHouse atomic CREATE-OR-REPLACE / EXCHANGE) --- | ||
| "_tmp_replace_*", | ||
|
|
||
| # --- migration / ORM / backfill scratch --- | ||
| "tmp_*", | ||
| "*_tmp", | ||
| "infi_clickhouse_orm_migrations*", | ||
|
|
||
| # --- backups / staging / backfills --- | ||
| "*_backup", | ||
| "*_backup_*", | ||
| "*_staging", | ||
| "*_backfill", | ||
|
|
||
| # --- cross-cluster proxies carried by the node but owned elsewhere --- | ||
| # Distributed proxies into the main event cluster; owned by the data role. | ||
| "events_main", | ||
| "events_recent", | ||
|
|
||
| # --- out-of-band managed: real on prod, not created by the local | ||
| # migrate_clickhouse path, so the gate ignores them on BOTH sides until | ||
| # a proper OPS migration reproduces them locally. Remove each entry once | ||
| # its migration lands. --- | ||
| # custom_metrics* views are created on NodeRole.DATA (migration 0117), never | ||
| # on the OPS node, yet prod OPS carries them (created out-of-band). | ||
| "custom_metrics*", | ||
| # Orphan: present on prod OPS but no migration or code creates it anywhere. | ||
| "events_team_daily_stats", | ||
|
|
||
| # --- metrics-overlay ingest: created by migration 0305 on LOGS, modeled in | ||
| # roles/logs/shared + cloud for dev/prod but not in the local golden. | ||
| # metrics1 diverges per env (codecs), so it is not yet in an all-env layer. --- | ||
| "metrics1", | ||
| "metrics", | ||
| "metric_attributes", | ||
| "metrics1_to_metric_attributes", | ||
| "metrics1_to_resource_attributes", | ||
| "metrics_kafka_metrics", | ||
| "kafka_metrics_avro", | ||
| "kafka_metrics_avro_mv", | ||
| "kafka_metrics_avro_to_metric_samples", | ||
| "kafka_metrics_avro_to_metric_series", | ||
| "kafka_metrics_avro_kafka_metrics_mv", | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better option to extend the goldens / HCL and not exclude them here, excluding them, basically removes any protection against wrong migrations in the future
It's fine to merge like this but this will have to get sorted out