Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] Refactored src/core/server/logging,metrics,plugins,rendering,root #90

Merged
merged 8 commits into from
Mar 13, 2021
Prev Previous commit
Next Next commit
[Rename] Refactored src/core/server/metrics directory
Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>
  • Loading branch information
mihirsoni committed Mar 7, 2021
commit 88ed9deeaf451ab16f31014938424f3ad7b82bb4
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/cgroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import mockFs from 'mock-fs';
import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@osd/logging/target/mocks';
import { OsCgroupMetricsCollector } from './cgroup';

describe('OsCgroupMetricsCollector', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/cgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import fs from 'fs';
import { join as joinPath } from 'path';
import { Logger } from '@kbn/logging';
import { Logger } from '@osd/logging';
import { MetricsCollector, OpsOsMetrics } from './types';

type OsCgroupMetrics = Pick<OpsOsMetrics, 'cpu' | 'cpuacct'>;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/os.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

jest.mock('getos', () => (cb: Function) => cb(null, { dist: 'distrib', release: 'release' }));

import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@osd/logging/target/mocks';
import os from 'os';
import { cgroupCollectorMock } from './os.test.mocks';
import { OsMetricsCollector } from './os';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os from 'os';
import getosAsync, { LinuxOs } from 'getos';
import { promisify } from 'util';
import { Logger } from '@kbn/logging';
import { Logger } from '@osd/logging';
import { OpsOsMetrics, MetricsCollector } from './types';
import { OsCgroupMetricsCollector } from './cgroup';

Expand Down
4 changes: 2 additions & 2 deletions src/core/server/metrics/collectors/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export interface OpsProcessMetrics {
};
/** node event loop delay */
event_loop_delay: number;
/** pid of the kibana process */
/** pid of the OpenSearch Dashboards process */
pid: number;
/** uptime of the kibana process */
/** uptime of the OpenSearch Dashboards process */
uptime_in_millis: number;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/metrics_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { BehaviorSubject } from 'rxjs';
import type { PublicMethodsOf } from '@kbn/utility-types';
import type { PublicMethodsOf } from '@osd/utility-types';

import { MetricsService } from './metrics_service';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/ops_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { schema, TypeOf } from '@kbn/config-schema';
import { schema, TypeOf } from '@osd/config-schema';

export const opsConfig = {
path: 'ops',
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/ops_metrics_collector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@osd/logging/target/mocks';
import {
mockOsCollector,
mockProcessCollector,
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type InternalMetricsServiceStart = MetricsServiceStart;

/**
* Regroups metrics gathered by all the collectors.
* This contains metrics about the os/runtime, the kibana process and the http server.
* This contains metrics about the os/runtime, the OpenSearch Dashboards process and the http server.
*
* @public
*/
Expand Down