Skip to content

Commit

Permalink
Per telemetry team feedback, rename usageCollection telemetry mapping…
Browse files Browse the repository at this point in the history
… name to simpler 'app_search'

- since their mapping already nests under 'kibana.plugins'
- note: I left the savedObjects name with the '_telemetry' suffix, as there very well may be a use case for top-level generic 'app_search' saved objects
  • Loading branch information
cee-chen committed Jun 9, 2020
1 parent 5c29aa5 commit 30b79a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('App Search Telemetry Usage Collector', () => {

expect(registerStub).toHaveBeenCalledTimes(1);
expect(makeUsageCollectorStub).toHaveBeenCalledTimes(1);
expect(makeUsageCollectorStub.mock.calls[0][0].type).toBe('app_search_kibana_telemetry');
expect(makeUsageCollectorStub.mock.calls[0][0].type).toBe('app_search');
});
});

Expand Down Expand Up @@ -108,8 +108,8 @@ describe('App Search Telemetry Usage Collector', () => {
});

expect(savedObjectsRepoStub.incrementCounter).toHaveBeenCalledWith(
'app_search_kibana_telemetry',
'app_search_kibana_telemetry',
'app_search_telemetry',
'app_search_telemetry',
'ui_clicked.button'
);
expect(response).toEqual({ success: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const registerTelemetryUsageCollector = ({
savedObjects,
}: Dependencies) => {
const telemetryUsageCollector = usageCollection.makeUsageCollector({
type: AS_TELEMETRY_NAME,
type: 'app_search',
fetch: async () => fetchTelemetryMetrics(savedObjects),
});
usageCollection.registerCollector(telemetryUsageCollector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { SavedObjectsType } from 'src/core/server';

export const AS_TELEMETRY_NAME = 'app_search_kibana_telemetry';
export const AS_TELEMETRY_NAME = 'app_search_telemetry';

export interface ITelemetrySavedObject {
ui_viewed: {
Expand Down

0 comments on commit 30b79a3

Please sign in to comment.