Skip to content

Commit

Permalink
[Task names in TaskManager] Rename "telemetry" to "usage"
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Sep 22, 2020
1 parent d3dd505 commit 470f3ba
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function createActionsUsageCollector(

async function getLatestTaskState(taskManager: TaskManagerStartContract) {
try {
const result = await taskManager.get('Actions-actions_telemetry');
const result = await taskManager.get('Actions-actions_usage');
return result;
} catch (err) {
const errMessage = err && err.message ? err.message : err.toString();
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/actions/server/usage/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '../../../task_manager/server';
import { getTotalCount, getInUseTotalCount } from './actions_telemetry';

export const TELEMETRY_TASK_TYPE = 'actions_telemetry';
export const TELEMETRY_TASK_TYPE = 'actions_usage';

export const TASK_ID = `Actions-${TELEMETRY_TASK_TYPE}`;

Expand All @@ -38,7 +38,7 @@ function registerActionsTelemetryTask(
) {
taskManager.registerTaskDefinitions({
[TELEMETRY_TASK_TYPE]: {
title: 'Actions telemetry fetch task',
title: 'Actions usage fetch task',
type: TELEMETRY_TASK_TYPE,
timeout: '5m',
createTaskRunner: telemetryTaskRunner(logger, core, kibanaIndex),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function createAlertsUsageCollector(

async function getLatestTaskState(taskManager: TaskManagerStartContract) {
try {
const result = await taskManager.get('Alerting-alerting_telemetry');
const result = await taskManager.get('Alerting-alerting_usage');
return result;
} catch (err) {
const errMessage = err && err.message ? err.message : err.toString();
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/alerts/server/usage/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import { getTotalCountAggregations, getTotalCountInUse } from './alerts_telemetry';

export const TELEMETRY_TASK_TYPE = 'alerting_telemetry';
export const TELEMETRY_TASK_TYPE = 'alerting_usage';

export const TASK_ID = `Alerting-${TELEMETRY_TASK_TYPE}`;

Expand All @@ -41,7 +41,7 @@ function registerAlertingTelemetryTask(
) {
taskManager.registerTaskDefinitions({
[TELEMETRY_TASK_TYPE]: {
title: 'Alerting telemetry fetch task',
title: 'Alerting usage fetch task',
type: TELEMETRY_TASK_TYPE,
timeout: '5m',
createTaskRunner: telemetryTaskRunner(logger, core, kibanaIndex),
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/server/lib/apm_telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
} from './collect_data_telemetry';
import { APMDataTelemetry } from './types';

const APM_TELEMETRY_TASK_NAME = 'apm-telemetry-task';
const APM_TELEMETRY_TASK_NAME = 'apm-usage-task';

export async function createApmTelemetry({
core,
Expand All @@ -49,7 +49,7 @@ export async function createApmTelemetry({
}) {
taskManager.registerTaskDefinitions({
[APM_TELEMETRY_TASK_NAME]: {
title: 'Collect APM telemetry',
title: 'Collect APM usage',
type: APM_TELEMETRY_TASK_NAME,
createTaskRunner: () => {
return {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/lens/server/usage/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { ESSearchResponse } from '../../../apm/typings/elasticsearch';
// This task is responsible for running daily and aggregating all the Lens click event objects
// into daily rolled-up documents, which will be used in reporting click stats

const TELEMETRY_TASK_TYPE = 'lens_telemetry';
const TELEMETRY_TASK_TYPE = 'lens_usage';

export const TASK_ID = `Lens-${TELEMETRY_TASK_TYPE}`;

Expand All @@ -47,7 +47,7 @@ function registerLensTelemetryTask(
) {
taskManager.registerTaskDefinitions({
[TELEMETRY_TASK_TYPE]: {
title: 'Lens telemetry fetch task',
title: 'Lens usage fetch task',
type: TELEMETRY_TASK_TYPE,
timeout: '1m',
createTaskRunner: telemetryTaskRunner(logger, core, config),
Expand Down

0 comments on commit 470f3ba

Please sign in to comment.