elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

Show links to open in Discover and Logs UI on log stream flyout #144956

Open smith opened 1 year ago

smith commented 1 year ago

When viewing logs in the Log Stream component, such as for an APM trace, it would be helpful to open the log entry in the Logs UI or Discover, in order to see more context.

In APM I can view the logs related to a service, but when I click on the detail I only have the option to investigate in Uptime? I would like the option to view this doc in the Logs UI and Discover My only other option is to back up, go to a specific transaction, then click on the investigate button, and from there I can pivot over the the logs UI.

image

53589 has some additional requests for ways to update action menu for apps around observability. Those won't be applied as part of this issue though could be considered if needed.

134412 exists to converge the Discover and Logs UIs, and if those UIs were converged to the point that it did't matter if you went to Discover or the Logs UI then some of these options could be removed.

✔️ Acceptance criteria

When viewing a log entry in an embedded context

View viewing a log entry in the Logs UI

elasticmachine commented 1 year ago

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

weltenwort commented 1 year ago

:thought_balloon: Log views in the Logs UI are not necessarily backed by a data view. Can we generate a link to "open in discover" that doesn't require a persisted data view, but works with an index name pattern and a list of columns?

kertal commented 1 year ago

yes, this is possible using Discover's locator and the dataViewSpec property, which allows to create an adhoc data view in Discover

https://github.com/elastic/kibana/blob/fc3c3a95e933b70fb52e9227b04e7bb38228742c/src/plugins/discover/public/locator.ts#L34

Here's how Lens is using it

https://github.com/elastic/kibana/blob/2de673f665783d7525f3cde8b6b266a471faef81/x-pack/plugins/lens/public/trigger_actions/open_in_discover_helpers.ts#L90

weltenwort commented 1 year ago

Neat, thanks @kertal!

elasticmachine commented 10 months ago

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)