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 App] [Metrics App] Remove unnecessarily mapped fields from saved object types #73848

Closed
jasonrhodes opened this issue Jul 30, 2020 · 2 comments · Fixed by #75482
Closed
Assignees
Labels
chore Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Milestone

Comments

@jasonrhodes
Copy link
Member

Based on #43673, we should try to reduce the number of mapped fields in our saved object definitions. If we don't need to search on or aggregate fields saved in our saved objects mapping, we can remove them from the mapping altogether to save on the number of fields that count towards the 1000 field limit per index for the .kibana index.

We need to understand the other consequences of doing this, such as ES validation, etc. See the description here: #43673

Example:

diff --git a/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts b/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts
index 11db18d6bf7..9278c34b088 100644
--- a/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts
+++ b/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts
@@ -17,73 +17,11 @@ export const infraSourceConfigurationSavedObjectType: SavedObjectsType = {
     importableAndExportable: true,
   },
   mappings: {
+    dynamic: false,
     properties: {
       name: {
         type: 'text',
       },
-      description: {
-        type: 'text',
-      },
-      metricAlias: {
-        type: 'keyword',
-      },
-      logAlias: {
-        type: 'keyword',
-      },
-      inventoryDefaultView: {
-        type: 'keyword',
-      },
-      metricsExplorerDefaultView: {
-        type: 'keyword',
-      },
-      fields: {
-        properties: {
-          container: {
-            type: 'keyword',
-          },
-          host: {
-            type: 'keyword',
-          },
-          pod: {
-            type: 'keyword',
-          },
-          tiebreaker: {
-            type: 'keyword',
-          },
-          timestamp: {
-            type: 'keyword',
-          },
-        },
-      },
-      logColumns: {
-        type: 'nested',
-        properties: {
-          timestampColumn: {
-            properties: {
-              id: {
-                type: 'keyword',
-              },
-            },
-          },
-          messageColumn: {
-            properties: {
-              id: {
-                type: 'keyword',
-              },
-            },
-          },
-          fieldColumn: {
-            properties: {
-              id: {
-                type: 'keyword',
-              },
-              field: {
-                type: 'keyword',
-              },
-            },
-          },
-        },
-      },
     },
   },
   migrations: {
@jasonrhodes jasonrhodes added chore Feature:Metrics UI Metrics UI feature 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 labels Jul 30, 2020
@elasticmachine
Copy link
Contributor

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

@weltenwort
Copy link
Member

So far we don't query by any of those fields AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants