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.
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
[Uptime] Use dynamic index pattern in Uptime #55446
[Uptime] Use dynamic index pattern in Uptime #55446
Changes from 7 commits
0ed386a
266fa99
b768a5a
8f449dd
e2ef44c
793e1f6
61c2c8d
e685373
9ff8744
85a79d7
a6c6842
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I realize that this is not new code, but it may be worth addressing while we're working on this.
In general swallowing errors is something we should avoid because it makes debugging issues (esp. in production) very difficult. Tracing back a genuine error to this code would be tricky, and then we wouldn't know if the issue was in the stringify part, the map instantiation, or the JSON parsing. If we have to do it we should limit it to a single statement. If it's to catch the JSON parse failure then we should do something like:
Then, we could execute conditional logic later depending on whether there's an error or not.
Note that we should document the reason why we're swallowing the error here. Is there a situation where the JSON is expected to be invalid? If so, why? Why is it better to ignore it rather than surfacing an error?
My suspicion is that we can possibly even remove the error handling here. @justinkambic may know more here.
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.
i think we can't have control over user input into url or kuery bar, i have improve the code to make it more readable.
This file was deleted.
This file was deleted.
This file was deleted.