[Infra UI] no longer update metricsAlias field in infrastructure-ui-source #168282
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
In #164094, we created a new saved object called
metrics-data-source
with the fieldmetricIndices
. 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 fieldmetricsAlias
. See (#161876 (comment)) for illustration.This issue calls for a few tweaks to the behaviour of this flow:
metricsAlias
field and value as part of the default configuration in theinfrastructure-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 theinfrastructure-ui-source
for backwards compatibility but otherwise we don't need to set it.infrastructure-ui-source
saved object when user saves the settings since its already being saved inmetrics-data-source
. For users in the fallback scenario, once its been "migrated" or saved to themetrics-data-source
plugin when they save their settings again, we can unset the field ininfrastructure-ui-source
.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 objectI believe these changes will make the code more understandable and less redundant as we are currently storing and updating the source in two places.
The text was updated successfully, but these errors were encountered: