Skip to content

Commit a55a9e5

Browse files
committed
[Usage Collection] [schema] actions
1 parent 1ba706c commit a55a9e5

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

x-pack/.telemetryrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"output": "plugins/telemetry_collection_xpack/schema/xpack_plugins.json",
33
"root": "plugins/",
44
"exclude": [
5-
"plugins/actions/server/usage/actions_usage_collector.ts",
65
"plugins/alerts/server/usage/alerts_usage_collector.ts",
76
"plugins/apm/server/lib/apm_telemetry/index.ts",
87
"plugins/infra/server/usage/usage_collector.ts",

x-pack/plugins/actions/server/usage/actions_usage_collector.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ export function createActionsUsageCollector(
1616
return usageCollection.makeUsageCollector<ActionsUsage>({
1717
type: 'actions',
1818
isReady: () => true,
19+
schema: {
20+
count_total: { type: 'long' },
21+
count_active_total: { type: 'long' },
22+
// TODO: Find out all the possible values for DYNAMIC_KEY or reformat into an array
23+
count_by_type: { DYNAMIC_KEY: { type: 'long' } },
24+
count_active_by_type: { DYNAMIC_KEY: { type: 'long' } },
25+
},
1926
fetch: async () => {
2027
try {
2128
const doc = await getLatestTaskState(await taskManager);

x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
{
22
"properties": {
3+
"actions": {
4+
"properties": {
5+
"count_total": {
6+
"type": "long"
7+
},
8+
"count_active_total": {
9+
"type": "long"
10+
},
11+
"count_by_type": {
12+
"properties": {
13+
"DYNAMIC_KEY": {
14+
"type": "long"
15+
}
16+
}
17+
},
18+
"count_active_by_type": {
19+
"properties": {
20+
"DYNAMIC_KEY": {
21+
"type": "long"
22+
}
23+
}
24+
}
25+
}
26+
},
327
"canvas": {
428
"properties": {
529
"workpads": {

0 commit comments

Comments
 (0)