Skip to content

Conversation

onewland
Copy link
Contributor

Adds a slice_id tag to all metrics for a consumer if slice_id is present in the CLI flags. This doesn't change run-time behavior.

Before State

There is no way to distinguish metrics across slices without using host info

After State

Consumers passed slice_id will report that as a tag to metrics, to allow for filtering

@onewland onewland requested a review from a team as a code owner November 11, 2022 19:59
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2022

Codecov Report

Base: 27.48% // Head: 91.71% // Increases project coverage by +64.23% 🎉

Coverage data is based on head (41b60aa) compared to base (2fe8679).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ Current head 41b60aa differs from pull request most recent head a824917. Consider uploading reports for the commit a824917 to get more accurate results

Additional details and impacted files
@@                    Coverage Diff                    @@
##           sliced-consumers-cli    #3374       +/-   ##
=========================================================
+ Coverage                 27.48%   91.71%   +64.23%     
=========================================================
  Files                       663      703       +40     
  Lines                     31234    32305     +1071     
=========================================================
+ Hits                       8585    29629    +21044     
+ Misses                    22649     2676    -19973     
Impacted Files Coverage Δ
snuba/cli/consumer.py 65.45% <0.00%> (+65.45%) ⬆️
snuba/settings/__init__.py 95.39% <0.00%> (-0.12%) ⬇️
snuba/cli/multistorage_consumer.py 0.00% <0.00%> (ø)
snuba/clickhouse/optimize/optimize.py
snuba/clickhouse/optimize/util.py
snuba/clickhouse/optimize/optimize_scheduler.py
test_initialization/test_initialize.py
snuba/core/initialize.py
snuba/clickhouse/optimize/optimize_tracker.py
snuba/optimize_tracker.py 96.36% <0.00%> (ø)
... and 608 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@onewland onewland merged commit dde5c5a into sliced-consumers-cli Nov 11, 2022
@onewland onewland deleted the add-slice-id-to-metrics branch November 11, 2022 22:24
ayirr7 added a commit that referenced this pull request Nov 14, 2022
* Create topics class and registry

* Rename topic keys to mirror logical values

* Move topics list to settings

* Add slicing to configuration builder

* Add slicing to consumer builder

* Add slicing logic to consumer cli

* Add slice_id dependent commit log topic

* Add clarifying comments

* Test changes/add comments

* Attempt to rebase

* Rename topic keys to mirror logical values

* More rebasing

* Add cluster selection

* Rebase

* fix typing

* Use cluster selection

* fix typing

* Remove mutable property of TableWriter

* Add slice id parameters where needed

* Remove code assuming slice id to be a property of TableWriter

* Remove comments

* Rename different topics

* Remove old comment

* Add slice id validation

* Tested sliced consumer behavior + get rid of snuba topic mapping

* Continuing to rebase

* Remove extra newline

* add assert to prevent override raw topic + slicing situation

* Moving logical to physical topic mapping into KafkaTopicSpec

* Add docstring comment for validation

* Add test file

* Consistent topic handling and resolving

* Add test for get_physical_topic_name

* Move validation to partitioning file

* Fix broken test (get_physical_topic_name)

* Remove defaults

* Fix mypy issue

* Add test

* config(slicing) - add slice ID to emitted metrics tags (#3374)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants