-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: add tag type filter support in attribute keys #7522
Open
srikanthccv
wants to merge
4
commits into
main
Choose a base branch
from
tagtype-in-keys-request
base: main
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.
+83
−17
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 6d24d38 in 2 minutes and 23 seconds
More details
- Looked at
182
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
15
drafted comments based on config settings.
1. pkg/query-service/model/v3/v3.go:229
- Draft comment:
New TagType definition and constants added. Consider adding comments to clarify that an empty value is interpreted as 'retrieve all attributes' for backward compatibility. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. pkg/query-service/model/v3/v3.go:237
- Draft comment:
The Validate() method for TagType currently treats an empty string as invalid. Ensure this is intentional since parser logic treats an empty tag type as valid (for retrieving all attributes). - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. pkg/query-service/model/v3/v3.go:247
- Draft comment:
In FilterAttributeKeyRequest, the new TagType field is added. Consider documenting its intended behavior (especially the significance of empty string) to guide future users. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. pkg/query-service/app/parser.go:722
- Draft comment:
The inline comment about tagType validation (e.g. 'what is happening here?') is ambiguous. Consider clarifying or removing it, and document that an invalid tagType is silently defaulted to an empty string for backward compatibility. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
The existing inline comments actually provide useful context about why the code behaves this way (backward compatibility). The comment "what is happening here?" is a bit informal but the explanation that follows is clear and valuable. Removing these comments would make the code harder to understand.
The PR comment could be right that "what is happening here?" is too informal. And maybe the comments could be more concise.
While the style could be improved, the substance of the inline comments is valuable for explaining the backward compatibility decision. Removing them entirely would hurt code maintainability.
The PR comment should be rejected. The existing inline comments provide important context about backward compatibility that should be preserved.
5. pkg/query-service/app/parser_test.go:172
- Draft comment:
Test cases now cover the new tagType parameter. Consider adding tests for edge cases like input with leading/trailing whitespace to ensure proper handling. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
6. pkg/query-service/model/v3/v3.go:237
- Draft comment:
The TagType.Validate() method only accepts the three valid constants, so an empty string will be considered invalid. If empty is meant to denote 'all' or unspecified, consider allowing it as a valid value or document the behavior clearly. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. pkg/query-service/model/v3/v3.go:308
- Draft comment:
The new TagType field in FilterAttributeValueRequest is not validated in its Validate() method. Consider adding a validation check (e.g., if non-empty, call TagType.Validate()) to ensure consistency. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. pkg/query-service/app/clickhouseReader/reader.go:4157
- Draft comment:
Typo: The variable name 'atrributeValue' is misspelled. Please correct it to 'attributeValue'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. pkg/query-service/app/clickhouseReader/reader.go:5311
- Draft comment:
Typo: The type name 'ReleStateItem' appears to be misspelled. If this is meant to represent a rule state item, consider renaming it to 'RuleStateItem' for clarity and consistency. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. pkg/query-service/app/clickhouseReader/reader.go:3040
- Draft comment:
Typographical error in SQL string formatting: In the UpdateLogField function, the column name for the existence column and the index name are not properly enclosed in backticks (e.g. should be formatted as%s_exists
with both starting and ending backticks). Please adjust the formatting to consistently enclose the identifiers in backticks. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. pkg/query-service/app/parser.go:727
- Draft comment:
In the comment on line 728, consider adding proper punctuation and spacing. For example, instead of 'if tagType is undefined(uh oh javascript)', it could be 'if tagType is undefined (uh oh, JavaScript)'. This improves readability but doesn't affect functionality. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
The comment is about a purely cosmetic change to comment formatting. It doesn't affect functionality or code quality in any meaningful way. According to the rules, we should not make purely informative comments or comments that are obvious/unimportant. Comment formatting falls into this category.
Perhaps clear and well-formatted comments are important for code readability and maintenance? Maybe poor comment formatting could confuse future developers?
While good comment formatting is nice to have, this kind of minor stylistic feedback doesn't meet the bar for a PR comment. It's too trivial and doesn't impact code quality or functionality.
Delete this comment as it's purely about comment formatting and doesn't meet the threshold for importance in PR comments.
12. pkg/query-service/app/parser.go:725
- Draft comment:
Consider updating 'i.e retrieve all attributes' to 'i.e., retrieve all attributes' for improved clarity. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
The comment is about a very minor punctuation issue in a code comment. It doesn't affect functionality, readability, or maintainability in any meaningful way. The rules state not to make comments that are obvious or unimportant, and this seems to fall into that category.
Could proper punctuation in comments help with documentation clarity and professionalism? Is there value in maintaining consistent style in comments?
While consistent style is good, this level of nitpicking about punctuation in comments doesn't provide enough value to justify a PR comment. The meaning is perfectly clear either way.
Delete this comment as it's too minor and doesn't meaningfully improve the code.
13. pkg/query-service/app/parser_test.go:18
- Draft comment:
Typo: The test function 'TestParseAggregateAttrReques' appears to be missing a 't' at the end. Consider renaming it to 'TestParseAggregateAttrRequest' for clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
14. pkg/query-service/app/parser_test.go:1440
- Draft comment:
Typo: The test case description 'Unknow variable in expression' should be corrected to 'Unknown variable in expression'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
15. pkg/query-service/model/v3/v3.go:1356
- Draft comment:
Typo: 'priortize' should be corrected to 'prioritize'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_bk7rhZQHOpxL8VgR
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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
This helps when we want to show only resource attributes in the suggestions.
Important
Add support for filtering attribute keys by tag type in
GetLogAttributeKeys
andGetTraceAttributeKeys
, with request parsing and validation updates.tagType
filter toGetLogAttributeKeys
andGetTraceAttributeKeys
inreader.go
to filter attribute keys by tag type.tagType
conditionally based on request inreader.go
.parseFilterAttributeKeyRequest
inparser.go
to parsetagType
from request and validate it.TagType
field toFilterAttributeKeyRequest
inv3.go
.Validate()
forTagType
inv3.go
.tagType
inTestParseFilterAttributeKeyRequest
inparser_test.go
.This description was created by
for 6d24d38. It will automatically update as commits are pushed.