Skip to content

Commit

Permalink
Review feedback. Use TELEMETRY_TYPE constant and set to APP_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Jun 23, 2020
1 parent 6f5a281 commit 6484570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { getMapsTelemetry } from '../maps_telemetry';
// @ts-ignore
import { APP_ID } from '../../../common/constants';
import { TELEMETRY_TYPE } from '../../../common/constants';
import { MapsConfigType } from '../../../config';

export function registerMapsUsageCollector(
Expand All @@ -19,7 +19,7 @@ export function registerMapsUsageCollector(
}

const mapsUsageCollector = usageCollection.makeUsageCollector({
type: APP_ID,
type: TELEMETRY_TYPE,
isReady: () => true,
fetch: async () => await getMapsTelemetry(config),
});
Expand Down

0 comments on commit 6484570

Please sign in to comment.