-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: use any of [cpu.usage, cpu.utilization] for cpu #7017
Merged
Conversation
This file contains 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
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.
👍 Looks good to me! Reviewed everything up to 640b7d8 in 1 minute and 33 seconds
More details
- Looked at
827
lines of code in20
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. pkg/query-service/metrics/transition.go:3
- Draft comment:
Mapping for CPU metrics transition added. Verify that the new mapping keys align with expected naming conventions. - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/utils/format.go:234
- Draft comment:
ClickHouseFormattedMetricNames now checks MetricsUnderTransition. Confirm that returning a formatted slice is compatible with downstream query building. - Reason this comment was not posted:
Comment did not seem useful.
3. pkg/query-service/metrics/transition.go:3
- Draft comment:
The transition mapping for CPU-related metrics is clear. Ensure that these keys cover all use-cases (e.g. cpu.usage vs cpu.utilization) required by issue 7016 and consider adding comments or tests for future extensibility. - Reason this comment was not posted:
Marked as duplicate.
4. pkg/query-service/utils/format.go:234
- Draft comment:
ClickHouseFormattedMetricNames correctly wraps the original metric name with its alternative if available. This effectively supports the 'use any of' requirement. Consider adding unit tests to cover edge cases. - Reason this comment was not posted:
Marked as duplicate.
5. pkg/query-service/utils/format.go:247
- Draft comment:
The AddBackTickToFormatTag helper function is simple and clear. It might also be useful to add a brief comment explaining why dot-containing tags need backticks. - Reason this comment was not posted:
Confidence changes required:50%
None
6. pkg/query-service/utils/format.go:261
- Draft comment:
The getPointerValue helper is a practical approach to dereference pointers passed in. It ensures uniform handling of pointer vs non-pointer types. - Reason this comment was not posted:
Confidence changes required:0%
None
Workflow ID: wflow_2CPfpgOLrbUo6hyG
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
aniketio-ctrl
approved these changes
Feb 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #7016
Important
Support transitioning metric names in queries by allowing both old and new names, with updates to query logic and tests.
ClickHouseFormattedMetricNames()
inutils/format.go
.PrepareTimeseriesFilterQuery()
andPrepareTimeseriesFilterQueryV3()
inhelpers/sub_query.go
.MetricsUnderTransition
map inmetrics/transition.go
to define old-to-new metric name mappings.query_builder_test.go
andquery_builder_pre_agg_test.go
to verify query construction with transitioning metric names.This description was created by
for 640b7d8. It will automatically update as commits are pushed.