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

[Infra UI] no longer update metricsAlias field in infrastructure-ui-source #168282

Open
neptunian opened this issue Oct 6, 2023 · 4 comments
Open
Assignees
Labels
Feature:Metrics UI Metrics UI feature stale Used to mark issues that were closed for being stale Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:Observed Asset Management Label used for engineers working on various parts of observed asset management

Comments

@neptunian
Copy link
Contributor

neptunian commented Oct 6, 2023

In #164094, we created a new saved object called metrics-data-source with the field metricIndices. We use this as our source of truth when querying for the user's metrics data source, which they change in the Infra UI Settings page. We continue to fall back on where we previously stored it, infrastructure-ui-source in field metricsAlias. See (#161876 (comment)) for illustration.

This issue calls for a few tweaks to the behaviour of this flow:

  • Stop setting the metricsAlias field and value as part of the default configuration in the infrastructure-ui-source saved object. It should still be part of the default configuration in the code but not the SO. The SO is first created when a user saves their settings for the first time. We'll keep this field as a type on the infrastructure-ui-source for backwards compatibility but otherwise we don't need to set it.
  • Don't save the field to the infrastructure-ui-source saved object when user saves the settings since its already being saved in metrics-data-source. For users in the fallback scenario, once its been "migrated" or saved to the metrics-data-source plugin when they save their settings again, we can unset the field in infrastructure-ui-source.
  • import the default METRICS_INDEX_PATTERN into infra instead of having it in infra because the source of truth should live in the metrics-data-source plugin. We still need this as part of the default source configuration used before a user creates the saved object

I believe these changes will make the code more understandable and less redundant as we are currently storing and updating the source in two places.

@neptunian neptunian added Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Observed Asset Management Label used for engineers working on various parts of observed asset management labels Oct 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/observability-asset-management (Team:Observed Asset Management)

@elasticmachine
Copy link
Contributor

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

@neptunian neptunian self-assigned this Nov 7, 2023
@smith smith added Feature:Metrics UI Metrics UI feature Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team and removed Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Nov 9, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic
Copy link

botelastic bot commented May 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the stale Used to mark issues that were closed for being stale label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature stale Used to mark issues that were closed for being stale Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:Observed Asset Management Label used for engineers working on various parts of observed asset management
Projects
None yet
Development

No branches or pull requests

3 participants