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

[Logs UI] Use dedicated configuration saved object #120924

Closed
Tracked by #120920
weltenwort opened this issue Dec 9, 2021 · 1 comment · Fixed by #125014
Closed
Tracked by #120920

[Logs UI] Use dedicated configuration saved object #120924

weltenwort opened this issue Dec 9, 2021 · 1 comment · Fixed by #125014
Assignees
Labels
Feature:Logs UI Logs UI feature refactoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services technical debt Improvement of the software architecture and operational architecture

Comments

@weltenwort
Copy link
Member

weltenwort commented Dec 9, 2021

📓 Summary

We want to separate the saved object type that stores Logs UI source configurations from the saved object type that stores Metrics UI source configurations. As a first step, the former will be stored in a newly introduced saved object type infrastructure-monitoring-log-view while the latter will continue to use the infrastructure-ui-source type.

While doing so the "source configuration" concept can be renamed to "log view" to foreshadow their extended usage and the log view management can be implemented using a LogViewService to align with the recommended Kibana plugin architecture.

part of #120920

✔️ Acceptance criteria

  • A new space-aware saved object type with type id infrastructure-monitoring-log-view is registered with Kibana.
  • A new runtime type logViewRT is defined which can be used to decode and encode the log view API payloads and the saved object attributes, which include a subset of the attributes of the infra source config:
    • name
    • description
    • logIndices
    • logColumns
  • A static type LogView is derived from that runtime type.
  • A new service LogViewService is introduced in the infra plugin.
  • That new service allows for retrieval of log source configurations such that...
    • the lookup order is
      • saved object of type infrastructure-monitoring-log-view with an origin of stored.
      • internal log source configuration with an origin of internal.
      • infra source configurations as handled by the InfraSource lib with origins infra-source-stored, infra-source-internal, and infra-source-fallback respectively.
    • saving log source configurations only writes to the new saved object type.
  • The infra plugin provides a defineInternalLogView via its setup() contract, which allows for registration of internal log views akin to the existing defineInternalSourceConfiguration.
  • The existing callers of defineInternalSourceConfiguration that use it for configuring log-specific settings use the new defineInternalLogView instead.
  • The log source API uses the new service instead of the old InfraSources to read and write saved objects.
  • Other log-related APIs (such as the log entries API) also make use of the new service instead of the old InfraSources.

💡 Background

Current source config lookup and update order

image

  • Lookup favors internal over stored
  • Writing to override internal is prevented

Future log view lookup and update order

image

  • Lookup favors stored over internal, allowing for customization of internal views by the user
  • Lookup renames the previous origins to infra-source-internal, infra-source-stored, and infra-source-fallback when falling back to the old saved objects.
  • New PATCH operations only ever update the new dedicated log view saved objects.
@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services needs-refinement A reason and acceptance criteria need to be defined for this issue labels Dec 9, 2021
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature refactoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services technical debt Improvement of the software architecture and operational architecture
Projects
None yet
4 participants