Skip to content

Commit

Permalink
[Rename] kbn-telemetry in packages directory to osd-telemetry-tools (…
Browse files Browse the repository at this point in the history
…#61)

* [Rename] kbn-telemetry in packages directory to osd-telemetry-tools

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>

* [Rename] kbn-telemetry in packages directory to osd-telemetry-tools

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>

* [Rename] in-corporate review comments

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>
  • Loading branch information
mihirsoni authored and kavilla committed Mar 19, 2021
1 parent 30acbaa commit 161293c
Show file tree
Hide file tree
Showing 41 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ node scripts/telemetry_check.js --path=<relative_path_to_collector>.ts

### 1. Update the telemetryrc file

Make sure your collector is not excluded in the `telemetryrc.json` files (located at the root of the kibana project, and another on in the `x-pack` dir).
Make sure your collector is not excluded in the `telemetryrc.json` files (located at the root of the OpenSearch Dashboards project, and another on in the `x-pack` dir).

```s
[
Expand Down Expand Up @@ -103,7 +103,7 @@ The `--fix` flag will automatically update the persisted json files used by the
node scripts/telemetry_check.js --fix
```

Note that any updates to the stored json files will require a review by the kibana-telemetry team to help us update the telemetry cluster mappings and ensure your changes adhere to our best practices.
Note that any updates to the stored json files will require a review by the opensearch-dashboards-telemetry team to help us update the telemetry cluster mappings and ensure your changes adhere to our best practices.


## Updating the collector schema
Expand All @@ -116,12 +116,12 @@ Once youre run the changes to both the `fetch` function and the `schema` field r
node scripts/telemetry_check.js --fix
```

The `--fix` flag will automatically update the persisted json files used by the telemetry team. Note that any updates to the stored json files will require a review by the kibana-telemetry team to help us update the telemetry cluster mappings and ensure your changes adhere to our best practices.
The `--fix` flag will automatically update the persisted json files used by the telemetry team. Note that any updates to the stored json files will require a review by the opesearch-opensearch-telemetry team to help us update the telemetry cluster mappings and ensure your changes adhere to our best practices.


## Writing the schema

We've designed the schema object to closely resemble elasticsearch mapping object to reduce any cognitive complexity.
We've designed the schema object to closely resemble opensearch mapping object to reduce any cognitive complexity.

### Basics

Expand Down Expand Up @@ -198,7 +198,7 @@ usageCollection.makeUsageCollector<Usage>({
})
```

Be careful adding arrays of objects due to the limitation in correlating the properties inside those objects inside kibana. It is advised to look for an alternative schema based on your use cases.
Be careful adding arrays of objects due to the limitation in correlating the properties inside those objects inside opesearch-opensearch. It is advised to look for an alternative schema based on your use cases.


## Schema Restrictions
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
*/

module.exports = {
presets: ['@kbn/babel-preset/node_preset'],
presets: ['@osd/babel-preset/node_preset'],
ignore: ['**/*.test.ts', '**/__fixture__/**'],
};
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@kbn/telemetry-tools",
"name": "@osd/telemetry-tools",
"version": "1.0.0",
"license": "Apache-2.0",
"main": "./target/index.js",
"private": true,
"kibana": {
"opensearchDashboards": {
"devOnly": true
},
"scripts": {
"build": "babel src --out-dir target --delete-dir-on-start --extensions .ts --source-maps=inline",
"kbn:bootstrap": "yarn build",
"kbn:watch": "yarn build --watch"
"osd:bootstrap": "yarn build",
"osd:watch": "yarn build --watch"
},
"devDependencies": {
"lodash": "^4.17.20",
"@kbn/dev-utils": "1.0.0",
"@kbn/utility-types": "1.0.0",
"@osd/dev-utils": "1.0.0",
"@osd/utility-types": "1.0.0",
"@types/normalize-path": "^3.0.0",
"normalize-path": "^3.0.0",
"@types/lodash": "^4.14.159",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Listr from 'listr';
import chalk from 'chalk';
import { createFailError, run } from '@kbn/dev-utils';
import { createFailError, run } from '@osd/dev-utils';

import {
createTaskContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import Listr from 'listr';
import { run } from '@kbn/dev-utils';
import { run } from '@osd/dev-utils';

import {
createTaskContext,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import { parseTelemetryRC } from '../config';
import { TaskContext } from './task_context';

export function parseConfigsTask() {
const kibanaRoot = process.cwd();
const xpackRoot = path.join(kibanaRoot, 'x-pack');
const opensearchDashboardsRoot = process.cwd();
const xpackRoot = path.join(opensearchDashboardsRoot, 'x-pack');

const configRoots = [kibanaRoot, xpackRoot];
const configRoots = [opensearchDashboardsRoot, xpackRoot];

return configRoots.map((configRoot) => ({
task: async (context: TaskContext) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import * as ts from 'typescript';
import { createFailError } from '@kbn/dev-utils';
import { createFailError } from '@osd/dev-utils';
import * as path from 'path';
import { getProperty, getPropertyValue } from './utils';
import { getDescriptor, Descriptor } from './serializer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import glob from 'glob';
import { readFile, writeFile } from 'fs';
import { promisify } from 'util';
import normalize from 'normalize-path';
import { Optional } from '@kbn/utility-types';
import { Optional } from '@osd/utility-types';

export const readFileAsync = promisify(readFile);
export const writeFileAsync = promisify(writeFile);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-telemetry-tools"
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/osd-telemetry-tools"
},
"include": [
"src/**/*",
Expand Down

0 comments on commit 161293c

Please sign in to comment.