Skip to content

Commit

Permalink
[7.8] [Maps] Remove extra layer of telemetry nesting under "attribute…
Browse files Browse the repository at this point in the history
…s" (#66137) (#69754)
  • Loading branch information
Aaron Caldwell committed Jun 24, 2020
1 parent 57b8e19 commit ec0eb47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
SOURCE_TYPES,
ES_GEO_FIELD_TYPE,
MAP_SAVED_OBJECT_TYPE,
TELEMETRY_TYPE,
} from '../../../../../plugins/maps/common/constants';
import { LayerDescriptor } from '../../../../../plugins/maps/common/descriptor_types';
import { MapSavedObject } from '../../../../../plugins/maps/common/map_saved_object_type';
Expand Down Expand Up @@ -183,9 +182,5 @@ export async function getMapsTelemetry(
const settings: SavedObjectAttribute = {
showMapVisualizationTypes: config().get('xpack.maps.showMapVisualizationTypes'),
};
const mapsTelemetry = buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings });
return await savedObjectsClient.create(TELEMETRY_TYPE, mapsTelemetry, {
id: TELEMETRY_TYPE,
overwrite: true,
});
return buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings });
}
2 changes: 1 addition & 1 deletion x-pack/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const EMS_TILES_VECTOR_TILE_PATH = 'vector/tile';
export const MAP_SAVED_OBJECT_TYPE = 'map';
export const APP_ID = 'maps';
export const APP_ICON = 'gisApp';
export const TELEMETRY_TYPE = 'maps-telemetry';
export const TELEMETRY_TYPE = APP_ID;

export const MAP_APP_PATH = `app/${APP_ID}`;
export const GIS_API_PATH = `api/${APP_ID}`;
Expand Down
7 changes: 4 additions & 3 deletions x-pack/test/api_integration/apis/telemetry/telemetry_local.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ export default function ({ getService }) {
expect(stats.stack_stats.kibana.plugins.apm.services_per_agent).to.be.an('object');
expect(stats.stack_stats.kibana.plugins.infraops.last_24_hours).to.be.an('object');
expect(stats.stack_stats.kibana.plugins.kql.defaultQueryLanguage).to.be.a('string');
expect(stats.stack_stats.kibana.plugins['maps-telemetry'].attributes.timeCaptured).to.be.a(
'string'
);
expect(stats.stack_stats.kibana.plugins.maps.timeCaptured).to.be.a('string');
expect(stats.stack_stats.kibana.plugins.maps.attributes).to.be(undefined);
expect(stats.stack_stats.kibana.plugins.maps.id).to.be(undefined);
expect(stats.stack_stats.kibana.plugins.maps.type).to.be(undefined);

expect(stats.stack_stats.kibana.plugins.reporting.enabled).to.be(true);
expect(stats.stack_stats.kibana.plugins.rollups.index_patterns).to.be.an('object');
Expand Down

0 comments on commit ec0eb47

Please sign in to comment.