-
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
feat: add search span scope in the list view tab to add the scope at per Query level #6810
Conversation
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.
❌ Changes requested. Reviewed everything up to 0346e52 in 2 minutes and 1 seconds
More details
- Looked at
77
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/model/v3/v3.go:34
- Draft comment:
TheSpanSearchScope
type and its constants are defined in bothpkg/query-service/app/traces/v4/query_builder.go
andpkg/query-service/model/v3/v3.go
. Consider defining them in one place to avoid redundancy. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests there may be code duplication, but I can't verify this since I don't have access to the other file. The rules state that if understanding requires more context or seeing other files, we should delete the comment. Additionally, this seems like a cross-file issue which the rules explicitly say to ignore.
I could be wrong about this being a cross-file issue - maybe having duplicate type definitions is a serious enough problem that it should be flagged regardless. The comment could be helping prevent maintenance issues.
While duplicate type definitions can be problematic, the rules explicitly state to ignore cross-file issues and to delete comments if we need more context from other files to verify them. We must follow these rules.
Delete this comment since it requires seeing another file to verify and involves a cross-file issue, both of which are explicitly against the review rules.
Workflow ID: wflow_KGDrTd6ZZKUanQ1K
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
add tests? |
@ankitnayan tests are added |
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.
❌ Changes requested. Incremental review on 75b4d89 in 1 minute and 7 seconds
More details
- Looked at
45
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder_test.go:552
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This applies to the entire file. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_P6Y4fCrbPHmfsaer
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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! Incremental review on 6ea3a32 in 23 seconds
More details
- Looked at
45
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder_test.go:552
- Draft comment:
The test cases forentry_point_spans
androot_spans
have been removed. Ensure that equivalent test cases are added to cover the new functionality forspanSearchScope
. This is crucial to maintain test coverage for these scenarios. - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/app/traces/v4/query_builder_test.go:552
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This applies to the entire file. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_zDYVgMpir9mQ1Rbb
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
please add tests
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! Incremental review on 715af78 in 51 seconds
More details
- Looked at
39
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder.go:226
- Draft comment:
The conversion ofkeyName
to lowercase is redundant since the constantsSpanSearchScopeRoot
andSpanSearchScopeEntryPoint
are already defined in lowercase. Consider removingstrings.ToLower
here. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
Without seeing the constants package, I can't verify if SpanSearchScopeRoot and SpanSearchScopeEntryPoint are defined in lowercase. Even if they are currently lowercase, having the ToLower() call provides safety against future changes to the constants. It's a defensive programming practice that costs very little performance.
I could be wrong about the defensive programming value - if the constants are truly meant to be lowercase by design, then the ToLower() call adds unnecessary complexity.
The cost of the ToLower() call is negligible, and it provides protection against future changes or additions to the constants. Better to be safe than sorry in this case.
The comment should be deleted. Without being able to verify the constants are guaranteed to be lowercase, removing the ToLower() call could introduce subtle bugs if the constants ever change.
2. pkg/query-service/constants/constants.go:57
- Draft comment:
The constantsSpanSearchScopeRoot
andSpanSearchScopeEntryPoint
are now defined in lowercase. Ensure that all references to these constants in the codebase are updated to match this change. - Reason this comment was not posted:
Comment did not seem useful.
3. pkg/query-service/app/traces/v4/query_builder.go:230
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values to maintain consistency in design and theming. This is also applicable at line 231. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_0T6GeyFOyeHKmKdT
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@nityanandagohain Addressed all comments. Also added tests |
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.
❌ Changes requested. Incremental review on 09dea8d in 51 seconds
More details
- Looked at
43
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder_test.go:579
- Draft comment:
Typo in 'v3.AttributeKetTypeSpanSearchScope', should be 'v3.AttributeKeyTypeSpanSearchScope'. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_ZVvPsTn6xrR9MCQa
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on a9959e0 in 47 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder.go:96
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_8x08AFTjWGiJngBH
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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! Incremental review on 47d864f in 36 seconds
More details
- Looked at
57
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder.go:97
- Draft comment:
Typo inAttributeKetTypeSpanSearchScope
. It should beAttributeKeyTypeSpanSearchScope
. This typo is present in multiple places. - Reason this comment was not posted:
Comment looked like it was already resolved.
2. pkg/query-service/app/traces/v4/query_builder.go:97
- Draft comment:
Typo in constant nameAttributeKetTypeSpanSearchScope
. It should beAttributeKeyTypeSpanSearchScope
. This typo is also present inquery_builder_test.go
andv3.go
. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_ibmQNyGkSVZ9dnq3
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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! Incremental review on 1f650e3 in 40 seconds
More details
- Looked at
27
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder_test.go:601
- Draft comment:
The expected SQL query for 'test noop list view with root_spans with other attributes' should include a check for the 'isRoot' attribute. Ensure that the 'parent_span_id = ''' condition is present in the expected query. - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/app/traces/v4/query_builder_test.go:584
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values to maintain consistency in design and theming. This applies to the test case added in the diff. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_pOosqRBbWcuix2Ol
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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! Incremental review on bdaaabc in 16 seconds
More details
- Looked at
21
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder.go:238
- Draft comment:
The finalreturn "", nil
is redundant since the function already returns within the loop for valid cases. Consider removing it for clarity. - Reason this comment was not posted:
Confidence changes required:50%
The return statement at the end of the loop is redundant since the function already returns within the loop for valid cases. This can be simplified.
2. pkg/query-service/app/traces/v4/query_builder.go:238
- Draft comment:
The final return statement inbuildSpanScopeQuery
is redundant as the function already returns within the loop for valid cases. - Reason this comment was not posted:
Confidence changes required:50%
The function buildSpanScopeQuery is correctly handling the span search scope attributes and returning appropriate queries based on the scope type. However, the return statement at the end of the function is redundant because the function already returns within the loop for valid cases.
Workflow ID: wflow_3ngsVNl6zsbCCoBX
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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! Incremental review on 89159a5 in 42 seconds
More details
- Looked at
27
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder_test.go:601
- Draft comment:
The expected SQL query does not reflect the presence of both 'isRoot' and 'isEntryPoint' filters. Ensure the query includes conditions for both filters. - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/app/traces/v4/query_builder_test.go:584
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values to maintain consistency in design and theming. This applies to the test case added in this PR. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_IqFpxV1mRduknwqd
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
feat: add search span scope in the list view tab to add the scope at per Query level (#6810) * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level chore(install-script): install.sh script improvements (#6857) - support for docker compose plugin - check for occupied port when installing SigNoz for the first time - remove unused code Signed-off-by: Prashant Shahi <[email protected]> chore: correct order within page result (#6847)
…per Query level (#6810) * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level
Summary
Capability we want to introduce with these change:
Related Issues / PR's
#3267
Screenshots
NA
Affected Areas and Manually Tested Areas
The changes to the query range api will be as followed:
There is practically no change on the API contract.
The span search scope for
onlyRoot
spans would be :The span search scope for
EntryPoint
spans would be :We have introduced a new attibute for the type field in the
key object
ofitems
which isspanSearchScope
which will only work when the key is eitherisRoot
orisEntryPoint
More information can be found at this document : Notion Document
Important
Add search span scope at query level to filter by root and entry point spans using new
spanSearchScope
attribute type.spanSearchScope
attribute type inv3.go
for filtering spans by scope.buildSpanScopeQuery()
inquery_builder.go
to handlespanSearchScope
attributes, supportingisRoot
andisEntryPoint
keys.buildTracesQuery()
inquery_builder.go
to integrate span scope queries.SpanSearchScopeRoot
andSpanSearchScopeEntryPoint
constants inconstants.go
.query_builder_test.go
forbuildTracesQuery()
to verify span scope filtering for root and entry point spans.This description was created by for 89159a5. It will automatically update as commits are pushed.