[Logs UI] Use index name for queries for log entry details fly-out#67004
[Logs UI] Use index name for queries for log entry details fly-out#67004weltenwort wants to merge 5 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
|
@driskell would you mind checking if I represented your contributions correctly? |
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
afgomez
left a comment
There was a problem hiding this comment.
Code looks nice and works correctly 👍
For a separate PR: I don't know what's our approach to error handling. For example if I try to pass an ID or an index that doesn't exist the API endpoint crashes instead of returning a 404 (I did the API, so this one is on me 😅)..
Since we are the only consumers of this API maybe we don't care, but I wanna comment on it nonetheless
| const { sourceId } = useLogSourceContext(); | ||
| const [flyoutVisible, setFlyoutVisibility] = useState<boolean>(false); | ||
| const [flyoutId, setFlyoutId] = useState<string | null>(null); | ||
| const [flyoutRef, setFlyoutRef] = useState<{ id: string; index: string } | null>(null); |
There was a problem hiding this comment.
What do you think about changing the *Ref suffix? That way we can reserve it to React refs.
Maybe something more specific, like flyoutLogItem, or flyoutLogLine
|
Sorry for letting this sit for so long. The async search migration has changed a lot of things underneath which will allow me to solve this in a much simpler way. |
ℹ️ This cleanly applies the relevant changes of #57761 to the current state of
master.Summary
This utilize the index name in the log entry detail fly-out to prevent scanning of all available indices on
getLogItem, which can bring down small clusters.closes #38240