File tree Expand file tree Collapse file tree
core/server/core_usage_data
plugins/kibana_usage_collection/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,5 +145,5 @@ export interface CoreUsageDataStart {
145145 * Internal API for collecting Core usage data
146146 * @internal
147147 * */
148- getCoreUsageData ( ) : CoreUsageData | null ;
148+ getCoreUsageData ( ) : CoreUsageData ;
149149}
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import {
2525} from '../../../../../core/server/core_usage_data/types' ;
2626// telemetry_check is unable to check types which are re-exported, it only
2727// works when pointed to the typescript file where the type was defined.
28- import { KIBANA_STATS_TYPE } from '../../../common/constants' ;
2928
3029export function getCoreUsageCollector (
3130 usageCollection : UsageCollectionSetup ,
@@ -118,20 +117,6 @@ export function getCoreUsageCollector(
118117 fetch ( ) {
119118 return getCoreUsageDataService ( ) . getCoreUsageData ( ) ;
120119 } ,
121-
122- /*
123- * Format the response data into a model for internal upload
124- * 1. Make this data part of the "kibana_stats" type
125- * 2. Organize the payload in the usage namespace of the data payload (usage.index, etc)
126- */
127- formatForBulkUpload : ( result ) => {
128- return {
129- type : KIBANA_STATS_TYPE ,
130- payload : {
131- core : result ,
132- } ,
133- } ;
134- } ,
135120 } ) ;
136121}
137122
Original file line number Diff line number Diff line change @@ -50,13 +50,4 @@ describe('telemetry_core', () => {
5050 test ( 'fetch' , async ( ) => {
5151 expect ( await collector . fetch ( callCluster ) ) . toEqual ( getCoreUsageDataReturnValue ) ;
5252 } ) ;
53-
54- test ( 'formatForBulkUpload' , async ( ) => {
55- expect ( collector . formatForBulkUpload ! ( getCoreUsageDataReturnValue ) ) . toStrictEqual ( {
56- type : 'kibana_stats' ,
57- payload : {
58- core : getCoreUsageDataReturnValue ,
59- } ,
60- } ) ;
61- } ) ;
6253} ) ;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export class KibanaUsageCollectionPlugin implements Plugin {
9090 ) {
9191 const getSavedObjectsClient = ( ) => this . savedObjectsClient ;
9292 const getUiSettingsClient = ( ) => this . uiSettingsClient ;
93- const getcoreUsageData = ( ) => this . coreUsageData ! ;
93+ const getCoreUsageDataService = ( ) => this . coreUsageData ! ;
9494
9595 registerOpsStatsCollector ( usageCollection , metric$ ) ;
9696 registerKibanaUsageCollector ( usageCollection , this . legacyConfig$ ) ;
@@ -103,6 +103,6 @@ export class KibanaUsageCollectionPlugin implements Plugin {
103103 getSavedObjectsClient
104104 ) ;
105105 registerCspCollector ( usageCollection , coreSetup . http ) ;
106- registerCoreUsageCollector ( usageCollection , getcoreUsageData ) ;
106+ registerCoreUsageCollector ( usageCollection , getCoreUsageDataService ) ;
107107 }
108108}
You can’t perform that action at this time.
0 commit comments