From 268c17d237993750970e4376e7df42653796b933 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Fri, 20 Nov 2020 15:53:53 +0100 Subject: [PATCH] Drop use of console-stamp --- package.json | 2 -- .../aggregate-latency-metrics/index.ts | 3 --- .../create-functional-tests-archive/index.ts | 3 --- .../apm/scripts/shared/stamp-logger.ts | 11 --------- .../scripts/upload-telemetry-data/index.ts | 3 --- yarn.lock | 24 +------------------ 6 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 x-pack/plugins/apm/scripts/shared/stamp-logger.ts diff --git a/package.json b/package.json index 33a509e863793..47fb7d7b12efa 100644 --- a/package.json +++ b/package.json @@ -419,7 +419,6 @@ "@types/cmd-shim": "^2.0.0", "@types/color": "^3.0.0", "@types/compression-webpack-plugin": "^2.0.2", - "@types/console-stamp": "^0.2.32", "@types/cypress-cucumber-preprocessor": "^1.14.1", "@types/cytoscape": "^3.14.0", "@types/d3": "^3.5.43", @@ -602,7 +601,6 @@ "clean-webpack-plugin": "^3.0.0", "cmd-shim": "^2.1.0", "compare-versions": "3.5.1", - "console-stamp": "^0.2.9", "constate": "^1.3.2", "copy-to-clipboard": "^3.0.8", "copy-webpack-plugin": "^6.0.2", diff --git a/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts b/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts index c1cb903a0bb3e..0df1cbf0e0eef 100644 --- a/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts +++ b/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts @@ -23,7 +23,6 @@ import { TRANSACTION_RESULT, PROCESSOR_EVENT, } from '../../common/elasticsearch_fieldnames'; -import { stampLogger } from '../shared/stamp-logger'; import { createOrUpdateIndex } from '../shared/create-or-update-index'; import { parseIndexUrl } from '../shared/parse_index_url'; import { ESClient, getEsClient } from '../shared/get_es_client'; @@ -49,8 +48,6 @@ import { ESClient, getEsClient } from '../shared/get_es_client'; // default ones. // - exclude: comma-separated list of fields that should be not be aggregated on. -stampLogger(); - export async function aggregateLatencyMetrics() { const interval = parseInt(String(argv.interval), 10) || 1; const concurrency = parseInt(String(argv.concurrency), 10) || 3; diff --git a/x-pack/plugins/apm/scripts/create-functional-tests-archive/index.ts b/x-pack/plugins/apm/scripts/create-functional-tests-archive/index.ts index 723ff03dc4995..4739a5b621972 100644 --- a/x-pack/plugins/apm/scripts/create-functional-tests-archive/index.ts +++ b/x-pack/plugins/apm/scripts/create-functional-tests-archive/index.ts @@ -9,11 +9,8 @@ import { execSync } from 'child_process'; import moment from 'moment'; import path from 'path'; import fs from 'fs'; -import { stampLogger } from '../shared/stamp-logger'; async function run() { - stampLogger(); - const archiveName = 'apm_8.0.0'; // include important APM data and ML data diff --git a/x-pack/plugins/apm/scripts/shared/stamp-logger.ts b/x-pack/plugins/apm/scripts/shared/stamp-logger.ts deleted file mode 100644 index 65d24bbae7008..0000000000000 --- a/x-pack/plugins/apm/scripts/shared/stamp-logger.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import consoleStamp from 'console-stamp'; - -export function stampLogger() { - consoleStamp(console, { pattern: '[HH:MM:ss.l]' }); -} diff --git a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts index ca47540b04d82..8c64c37d9b7f7 100644 --- a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts +++ b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts @@ -15,7 +15,6 @@ import { merge, chunk, flatten, omit } from 'lodash'; import { Client } from '@elastic/elasticsearch'; import { argv } from 'yargs'; import { Logger } from 'kibana/server'; -import { stampLogger } from '../shared/stamp-logger'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { CollectTelemetryParams } from '../../server/lib/apm_telemetry/collect_data_telemetry'; import { downloadTelemetryTemplate } from '../shared/download-telemetry-template'; @@ -25,8 +24,6 @@ import { readKibanaConfig } from '../shared/read-kibana-config'; import { getHttpAuth } from '../shared/get-http-auth'; import { createOrUpdateIndex } from '../shared/create-or-update-index'; -stampLogger(); - async function uploadData() { const githubToken = process.env.GITHUB_TOKEN; diff --git a/yarn.lock b/yarn.lock index 3495f9bc2bf53..1b3dda38e6125 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4485,11 +4485,6 @@ dependencies: "@types/webpack" "*" -"@types/console-stamp@^0.2.32": - version "0.2.32" - resolved "https://registry.yarnpkg.com/@types/console-stamp/-/console-stamp-0.2.32.tgz#9cb9dce41b6203a28486365300a8a1cf99e5801f" - integrity sha512-Ih8HUSWSNtmHf5DgLv+BZGKaNGZKOaFjkxb/nHOBfc2wLrWY5wFQq6rjLu+LxCD/Mc+8GoKhby364Bu0Be25tQ== - "@types/cookiejar@*": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.0.tgz#4b7daf2c51696cfc70b942c11690528229d1a1ce" @@ -10034,15 +10029,6 @@ console-log-level@^1.4.1: resolved "https://registry.yarnpkg.com/console-log-level/-/console-log-level-1.4.1.tgz#9c5a6bb9ef1ef65b05aba83028b0ff894cdf630a" integrity sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ== -console-stamp@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/console-stamp/-/console-stamp-0.2.9.tgz#9c0cd206d1fd60dec4e263ddeebde2469209c99f" - integrity sha512-jtgd1Fx3Im+pWN54mF269ptunkzF5Lpct2LBTbtyNoK2A4XjcxLM+TQW+e+XE/bLwLQNGRqPqlxm9JMixFntRA== - dependencies: - chalk "^1.1.1" - dateformat "^1.0.11" - merge "^1.2.0" - constant-case@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" @@ -11101,14 +11087,6 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dateformat@^1.0.11: - version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" - integrity sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk= - dependencies: - get-stdin "^4.0.1" - meow "^3.3.0" - dateformat@^3.0.2, dateformat@~3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -19748,7 +19726,7 @@ memory-fs@^0.5.0: errno "^0.1.3" readable-stream "^2.0.1" -meow@^3.3.0, meow@^3.7.0: +meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=