Skip to content
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

[APM] Create a Logs tab in the Service view to show Logs per service #106093

Closed
jasonrhodes opened this issue Jul 19, 2021 · 9 comments · Fixed by #107664
Closed

[APM] Create a Logs tab in the Service view to show Logs per service #106093

jasonrhodes opened this issue Jul 19, 2021 · 9 comments · Fixed by #107664
Assignees
Labels
enhancement New value added to drive a business result Epic: Shared Logs Component Team:APM All issues that need APM UI Team support Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.15.0

Comments

@jasonrhodes
Copy link
Member

APM users would like to be able to see logs for a given service as a view within their Service page.

AC:

  • Service view in APM has a new Logs tab next to existing tabs (Overview, Transactions, Errors, Service Map, etc)
  • Logs tab uses the Log Stream component to show Logs for the given service, filtered on ECS field "service.name" for now
  • Columns to show in this Log Stream component are TBD

Mockup from design issue:
image

@jasonrhodes jasonrhodes added Team:APM All issues that need APM UI Team support enhancement New value added to drive a business result Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.15.0 labels Jul 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@alex-fedotyev
Copy link

alex-fedotyev commented Jul 21, 2021

Hi @Kerry350!
Few comments important for implementation.

Populating logs would likely need to happen by indirectly loose matching APM and Logs.

  • Step 1: Query which infrastructure components the APM service had been running on during selected timeframe (which needs to appreciate Kuery bar so it is possible to filter specific version or availability zone in APM).
  • Step 2: Show all the logs entries across that infrastructure.

Particularly, this logic would be different for containerized service vs those which are running on VMs and hosts.

  1. If "container.id" is present in transaction documents, query all "container.id" values and pass that as filter into logs.
  2. Otherwise use "host.name" field same way otherwise.

Serverless will follow same logic once we add support for it.

@alex-fedotyev
Copy link

Oh, totally forgot to add to the design an ask to implement search input within the logs to enable quick filtering when looking into service logs.
Thank you!!

@jasonrhodes
Copy link
Member Author

jasonrhodes commented Jul 21, 2021

@alex-fedotyev thanks for the notes! I'd like to clarify a few points.

  • When we met with @graphaelli and @ogupte, we settled on the above AC that meant we'd initially be querying for logs based on the current service.name value. From your comments, it sounds like you are picturing something different related to host, container, etc. Can we clarify so we can update the AC?
  • You mention a query bar, can we make sure we know exactly what we want that to be and how it's meant to function? I imagine the outer "kuery bar" implementation is applied to the queries directed at APM documents and this new search bar is meant to be applied to the Logs query?

@alex-fedotyev
Copy link

My logic is primarily around the fact that service.name filter is going to be a significant limitation for the customers, as it would only work when ECS loggers are used and configured in the monitored applications.

On the other side customers often have logs enabled across Kubernetes environments or configured manually using filebeat on their hosts and VMs already, which means that service.name isn't going to be present but logs are still there.
That is why I suggested to consider a different type of query by doing kind of a "join" on either container.id or host.name.


I may take back the idea of search bar for now, just realized that with an approach to "join" APM transaction and logs - it would be unclear what kuery bar would apply to (logs or transactions).
My original idea was to introduce filtering by two type of data:

  1. Ability to filter down by service metadata like service.version which is part of APM transactions of host name.
  2. Ability to filter/search by specific messages like errors message, etc.

My understanding now is that it won't be really possible to get both of these working, right?

@Kerry350
Copy link
Contributor

Kerry350 commented Jul 22, 2021

Thanks for the input, all. I'd like to try and tease out the specific acceptance criteria. How does the following sound:

  • There should be a filter bar for filtering down on APM data, e.g. service.version etc. Example:

Screenshot 2021-07-22 at 11 42 32

  • The environments filter should be applied:

126724366-1238d259-a148-4f6e-bc07-1bf3f6408fe3

  • There should be a date range selector for setting a date / time range.

  • An APM API endpoint should exist which allows to query for infrastructure (containers, hosts etc) relevant to the service / filters. (GET /services/<serviceName>/infrastructure ?). Does anything exist like this at the moment? (I can look, but just in case I miss anything).

  • A log stream component exists which queries based on the Infrastructure response (e.g. the relevant container IDs, host names etc).

Anything I've missed?


My understanding now is that it won't be really possible to get both of these working, right?

This is the conclusion @jasonrhodes and I reached yesterday in our sync meeting. The UX would be pretty weird as we'd have the two bars, searching across two types of data. It also adds a layer of complexity as our log stream component wraps all of the ceremony around getting the correct indices from our "Source configuration", but the additional search bar would have to live outside of the log stream component, and yet still have that "Source configuration" awareness.

@alex-fedotyev
Copy link

This looks great to me, one minor thing you missed - environments filter which is common across APM UI.
image

Feel free to drop in to the #apm-ui slack channel to clarify on the APM API endpoint.

Thanks @Kerry350 !

@alex-fedotyev
Copy link

Hi @Kerry350 !
Quick ask, could you please remove the "event.dataset" column and only keep time and message?
I suspect that dataset is likely going to be the same across all messages and will simply consume space.
Maybe we add other columns later, but that needs more research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Epic: Shared Logs Component Team:APM All issues that need APM UI Team support Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.15.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants