forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Usage collection] Usage counters (elastic#96696)
Co-authored-by: Alejandro Fernández Haro <[email protected]>
- Loading branch information
1 parent
3a4d96a
commit 8d4acfe
Showing
75 changed files
with
3,120 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
src/plugins/kibana_usage_collection/server/__snapshots__/index.test.ts.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...a_usage_collection/server/collectors/ui_counters/__fixtures__/ui_counter_saved_objects.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { UICounterSavedObject } from '../ui_counter_saved_object_type'; | ||
export const rawUiCounters: UICounterSavedObject[] = [ | ||
{ | ||
type: 'ui-counter', | ||
id: 'Kibana_home:23102020:click:different_type', | ||
attributes: { | ||
count: 1, | ||
}, | ||
references: [], | ||
updated_at: '2020-11-24T11:27:57.067Z', | ||
version: 'WzI5NDRd', | ||
}, | ||
{ | ||
type: 'ui-counter', | ||
id: 'Kibana_home:25102020:loaded:intersecting_event', | ||
attributes: { | ||
count: 1, | ||
}, | ||
references: [], | ||
updated_at: '2020-10-25T11:27:57.067Z', | ||
version: 'WzI5NDRd', | ||
}, | ||
{ | ||
type: 'ui-counter', | ||
id: 'Kibana_home:23102020:loaded:intersecting_event', | ||
attributes: { | ||
count: 3, | ||
}, | ||
references: [], | ||
updated_at: '2020-10-23T11:27:57.067Z', | ||
version: 'WzI5NDRd', | ||
}, | ||
{ | ||
type: 'ui-counter', | ||
id: 'Kibana_home:24112020:click:only_reported_in_ui_counters', | ||
attributes: { | ||
count: 1, | ||
}, | ||
references: [], | ||
updated_at: '2020-11-24T11:27:57.067Z', | ||
version: 'WzI5NDRd', | ||
}, | ||
]; |
104 changes: 104 additions & 0 deletions
104
...sage_collection/server/collectors/ui_counters/__fixtures__/usage_counter_saved_objects.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { UsageCountersSavedObject } from '../../../../../usage_collection/server'; | ||
|
||
export const rawUsageCounters: UsageCountersSavedObject[] = [ | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:09042021:count:myApp:my_event', | ||
attributes: { | ||
count: 1, | ||
counterName: 'myApp:my_event', | ||
counterType: 'count', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:17:57.693Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:23102020:loaded:Kibana_home:intersecting_event', | ||
attributes: { | ||
count: 60, | ||
counterName: 'Kibana_home:intersecting_event', | ||
counterType: 'loaded', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2020-10-23T11:27:57.067Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:09042021:count:myApp:my_event_4457914848544', | ||
attributes: { | ||
count: 0, | ||
counterName: 'myApp:my_event_4457914848544', | ||
counterType: 'count', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:18:03.030Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:09042021:count:myApp:my_event_malformed', | ||
attributes: { | ||
// @ts-expect-error | ||
count: 'malformed', | ||
counterName: 'myApp:my_event_malformed', | ||
counterType: 'count', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:18:03.030Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'anotherDomainId:09042021:count:some_event_name', | ||
attributes: { | ||
count: 4, | ||
counterName: 'some_event_name', | ||
counterType: 'count', | ||
domainId: 'anotherDomainId', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:18:03.030Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:09042021:count:myApp:my_event_4457914848544_2', | ||
attributes: { | ||
count: 8, | ||
counterName: 'myApp:my_event_4457914848544_2', | ||
counterType: 'count', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:18:03.031Z', | ||
}, | ||
{ | ||
type: 'usage-counters', | ||
id: 'uiCounter:09042021:count:myApp:only_reported_in_usage_counters', | ||
attributes: { | ||
count: 1, | ||
counterName: 'myApp:only_reported_in_usage_counters', | ||
counterType: 'count', | ||
domainId: 'uiCounter', | ||
}, | ||
references: [], | ||
coreMigrationVersion: '8.0.0', | ||
updated_at: '2021-04-09T08:18:03.031Z', | ||
}, | ||
]; |
Oops, something went wrong.