-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 alerts to explorer link in notification #4446
Conversation
WalkthroughThe recent updates to the query service involve enhancing the handling of query parameters and options, refining the functionality for threshold rules, and improving the default selection of columns for trace list views. These changes collectively aim to improve the user experience by providing more tailored and efficient query capabilities, alongside better visualization and management of trace data. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 6
Configuration used: CodeRabbit UI
Files selected for processing (4)
- pkg/query-service/constants/constants.go (1 hunks)
- pkg/query-service/rules/apiParams.go (1 hunks)
- pkg/query-service/rules/thresholdRule.go (6 hunks)
- pkg/query-service/rules/thresholdRule_test.go (2 hunks)
Additional comments: 11
pkg/query-service/rules/thresholdRule_test.go (1)
- 12-12: The import of
go.signoz.io/signoz/pkg/query-service/utils/labels
is correctly added to support the new test functions that utilize labels. This change is appropriate and requires no further action.pkg/query-service/constants/constants.go (1)
- 356-387: The update to
TracesListViewDefaultSelectedColumns
adds a predefined set of columns for the Traces ListView. This change enhances the default data presentation and is a positive improvement. Ensure that the selected columns are relevant and useful for the majority of use cases. Additionally, consider documenting the rationale behind the selection of these specific columns for future reference.pkg/query-service/rules/thresholdRule.go (9)
- 6-6: The import of
"encoding/json"
is added.- 9-9: The import of
"net/url"
is added.- 65-65: A new field
typ
of typestring
is added to theThresholdRule
struct.- 104-104: The
typ
field is initialized in theNewThresholdRule
function.- 632-696: The
fetchFilters
method has been modified. Ensure the logic correctly handles both cases where a label is present in the where clause and when it's not, adding missing labels as key-value pairs.Verification successful
The search results indicate that the
fetchFilters
method is indeed used within thethresholdRule.go
file, specifically in scenarios where filter items are being prepared for further processing. The method's integration points show its application in constructing URL data for shareable composite queries, which aligns with the method's purpose of preparing filter items based on provided labels and existing filter conditions.Given this context, it appears that the
fetchFilters
method is correctly integrated and applied within the codebase, handling both cases where a label is present in the where clause and when it's not, by adding missing labels as key-value pairs. This confirms the method's logic as described in the review comment is being utilized as intended in the codebase.* 698-759: The `prepareLinksToLogs` method is introduced. Verify the correctness of URL construction and ensure that the method correctly handles the selected query and label filters. * 761-822: The `prepareLinksToTraces` method is introduced. Similar to `prepareLinksToLogs`, verify the correctness of URL construction and ensure that the method correctly handles the selected query and label filters. * 826-831: The `hostFromSource` method is introduced. Ensure that it correctly parses the hostname from the `source` URL. * 1054-1064: The logic to append links to related traces or logs based on the `typ` field in the `Eval` method. Ensure that the links are correctly formatted and appended to the labels.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the logic of fetchFilters method by checking its usage in other parts of the codebase. # This script is a placeholder for the actual verification process. echo "Check fetchFilters method usage and ensure it's correctly applied."Length of output: 145
Script:
#!/bin/bash # Search for usages of the fetchFilters method within the codebase to verify its integration and correctness. rg "fetchFilters" --context 5Length of output: 2528
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.
LGTM! on the frontend we can add a popup or something saying that when formula queries are not supported.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- pkg/query-service/rules/thresholdRule.go (6 hunks)
Files skipped from review as they are similar to previous changes (1)
- pkg/query-service/rules/thresholdRule.go
Summary
Part of #2765
Related Issues / PR's
Screenshots
NA
Affected Areas and Manually Tested Areas
Summary by CodeRabbit