diff --git a/packages/opencensus-core/package.json b/packages/opencensus-core/package.json index 2a83bcf2b..2b023a06e 100644 --- a/packages/opencensus-core/package.json +++ b/packages/opencensus-core/package.json @@ -45,11 +45,11 @@ "@types/shimmer": "^1.0.1", "@types/uuid": "^3.4.3", "gts": "^0.5.4", + "intercept-stdout": "^0.1.2", "mocha": "^5.0.4", "ncp": "^2.0.0", "nyc": "11.6.0", "ts-node": "^4.0.0", - "intercept-stdout": "^0.1.2", "typescript": "~2.6.1" }, "dependencies": { diff --git a/packages/opencensus-core/src/internal/util.ts b/packages/opencensus-core/src/internal/util.ts index 358727af1..83d22318e 100644 --- a/packages/opencensus-core/src/internal/util.ts +++ b/packages/opencensus-core/src/internal/util.ts @@ -19,9 +19,6 @@ import * as crypto from 'crypto'; - -// TODO: rethink this snippet aproach - // Use 6 bytes of randomness only as JS numbers are doubles not 64-bit ints. const SPAN_ID_RANDOM_BYTES = 6; diff --git a/packages/opencensus-core/src/trace/instrumentation/base-plugin.ts b/packages/opencensus-core/src/trace/instrumentation/base-plugin.ts index 76d6d1655..12ca09ede 100644 --- a/packages/opencensus-core/src/trace/instrumentation/base-plugin.ts +++ b/packages/opencensus-core/src/trace/instrumentation/base-plugin.ts @@ -26,7 +26,7 @@ import * as types from './types'; * Maps a name (key) representing a internal file module and its exports */ export type ModuleExportsMapping = { - // tslint:disable:no-any + // tslint:disable-next-line:no-any [key: string]: any; }; @@ -34,7 +34,7 @@ export type ModuleExportsMapping = { /** This class represent the base to patch plugin. */ export abstract class BasePlugin implements types.Plugin { /** Exports from the nodejs module to be instrumented */ - // tslint:disable:no-any + // tslint:disable-next-line:no-any protected moduleExports: any; /** The module name */ protected moduleName: string; @@ -66,8 +66,8 @@ export abstract class BasePlugin implements types.Plugin { * @param version module version description * @param basedir module absolute path */ - // tslint:disable:no-any private setPluginContext( + // tslint:disable-next-line:no-any moduleExports: any, tracer: modelTypes.Tracer, version: string, basedir?: string) { this.moduleExports = moduleExports; @@ -90,9 +90,9 @@ export abstract class BasePlugin implements types.Plugin { * @param version version of the current instaled module to patch * @param basedir module absolute path */ - enable( - // tslint:disable:no-any - moduleExports: any, tracer: modelTypes.Tracer, version: string, + enable( + // tslint:disable-next-line:no-any + moduleExports: T, tracer: modelTypes.Tracer, version: string, basedir: string) { this.setPluginContext(moduleExports, tracer, version, basedir); return this.applyPatch(); @@ -107,10 +107,10 @@ export abstract class BasePlugin implements types.Plugin { * This method implements the GoF Template Method Pattern, * 'applyPatch' is the variant part, each instrumentation should * implement its own version, 'enable' method is the invariant. - * Wil be called when enable is called. + * It will be called when enable is called. * */ - // tslint:disable:no-any + // tslint:disable-next-line:no-any protected abstract applyPatch(): any; protected abstract applyUnpatch(): void;