Skip to content

Commit

Permalink
Revisit fields in the schema based on Lens team comments
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Sep 18, 2020
1 parent 40ef8db commit e4e7079
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 8 deletions.
15 changes: 13 additions & 2 deletions x-pack/plugins/lens/server/usage/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,28 @@ const eventsSchema: MakeSchemaFrom<LensUsage['events_30_days']> = {
indexpattern_dimension_operation_sum: { type: 'long' },
indexpattern_dimension_operation_count: { type: 'long' },
indexpattern_dimension_operation_cardinality: { type: 'long' },
indexpattern_dimension_operation_filters: { type: 'long' },
};

const suggestionEventsSchema: MakeSchemaFrom<LensUsage['suggestion_events_30_days']> = {
back_to_current: { type: 'long' },
reload: { type: 'long' },
position_0_of_5: { type: 'long' },
};

const savedSchema: MakeSchemaFrom<LensUsage['saved_overall']> = {
bar: { type: 'long' },
bar_horizontal: { type: 'long' },
line: { type: 'long' },
area: { type: 'long' },
bar_stacked: { type: 'long' },
// TODO: Extend this list as we know more visualizationTypes
bar_percentage_stacked: { type: 'long' },
bar_horizontal_stacked: { type: 'long' },
bar_horizontal_percentage_stacked: { type: 'long' },
area_stacked: { type: 'long' },
area_percentage_stacked: { type: 'long' },
lnsDatatable: { type: 'long' },
lnsPie: { type: 'long' },
lnsMetric: { type: 'long' },
};

export const lensUsageSchema: MakeSchemaFrom<LensUsage> = {
Expand Down
120 changes: 114 additions & 6 deletions x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@
},
"indexpattern_dimension_operation_cardinality": {
"type": "long"
},
"indexpattern_dimension_operation_filters": {
"type": "long"
}
}
},
Expand Down Expand Up @@ -360,6 +363,9 @@
},
"indexpattern_dimension_operation_cardinality": {
"type": "long"
},
"indexpattern_dimension_operation_filters": {
"type": "long"
}
}
},
Expand All @@ -370,9 +376,6 @@
},
"reload": {
"type": "long"
},
"position_0_of_5": {
"type": "long"
}
}
},
Expand All @@ -383,9 +386,6 @@
},
"reload": {
"type": "long"
},
"position_0_of_5": {
"type": "long"
}
}
},
Expand All @@ -400,22 +400,130 @@
},
"saved_overall": {
"properties": {
"bar": {
"type": "long"
},
"bar_horizontal": {
"type": "long"
},
"line": {
"type": "long"
},
"area": {
"type": "long"
},
"bar_stacked": {
"type": "long"
},
"bar_percentage_stacked": {
"type": "long"
},
"bar_horizontal_stacked": {
"type": "long"
},
"bar_horizontal_percentage_stacked": {
"type": "long"
},
"area_stacked": {
"type": "long"
},
"area_percentage_stacked": {
"type": "long"
},
"lnsDatatable": {
"type": "long"
},
"lnsPie": {
"type": "long"
},
"lnsMetric": {
"type": "long"
}
}
},
"saved_30_days": {
"properties": {
"bar": {
"type": "long"
},
"bar_horizontal": {
"type": "long"
},
"line": {
"type": "long"
},
"area": {
"type": "long"
},
"bar_stacked": {
"type": "long"
},
"bar_percentage_stacked": {
"type": "long"
},
"bar_horizontal_stacked": {
"type": "long"
},
"bar_horizontal_percentage_stacked": {
"type": "long"
},
"area_stacked": {
"type": "long"
},
"area_percentage_stacked": {
"type": "long"
},
"lnsDatatable": {
"type": "long"
},
"lnsPie": {
"type": "long"
},
"lnsMetric": {
"type": "long"
}
}
},
"saved_90_days": {
"properties": {
"bar": {
"type": "long"
},
"bar_horizontal": {
"type": "long"
},
"line": {
"type": "long"
},
"area": {
"type": "long"
},
"bar_stacked": {
"type": "long"
},
"bar_percentage_stacked": {
"type": "long"
},
"bar_horizontal_stacked": {
"type": "long"
},
"bar_horizontal_percentage_stacked": {
"type": "long"
},
"area_stacked": {
"type": "long"
},
"area_percentage_stacked": {
"type": "long"
},
"lnsDatatable": {
"type": "long"
},
"lnsPie": {
"type": "long"
},
"lnsMetric": {
"type": "long"
}
}
}
Expand Down

0 comments on commit e4e7079

Please sign in to comment.