Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 5cdb893

Browse files
silva-fabiokjin
authored andcommitted
refactor: rename moduleExporters to moduleExports in BasePlugin class and Plugin interface
1 parent 0825262 commit 5cdb893

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

packages/opencensus-core/src/trace/instrumentation/base-plugin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import * as types from './types';
2121

2222
/** This class represent the base to patch plugin. */
2323
export abstract class BasePlugin implements types.Plugin {
24-
/** Exporters from the nodejs module to be instrumented */
24+
/** Exports from the nodejs module to be instrumented */
2525
// tslint:disable:no-any
26-
protected moduleExporters: any;
26+
protected moduleExports: any;
2727
/** The module name */
2828
protected moduleName: string;
2929
/** A tracer object. */
@@ -41,14 +41,14 @@ export abstract class BasePlugin implements types.Plugin {
4141

4242
/**
4343
* Sets modified plugin to the context.
44-
* @param moduleExporters object moduleExporters to set as context
44+
* @param moduleExports nodejs module exports to set as context
4545
* @param tracer tracer relating to context
4646
* @param version module version description
4747
*/
4848
// tslint:disable:no-any
4949
protected setPluginContext(
50-
moduleExporters: any, tracer: modelTypes.Tracer, version: string) {
51-
this.moduleExporters = moduleExporters;
50+
moduleExports: any, tracer: modelTypes.Tracer, version: string) {
51+
this.moduleExports = moduleExports;
5252
this.tracer = tracer;
5353
this.version = version;
5454
}
@@ -60,9 +60,9 @@ export abstract class BasePlugin implements types.Plugin {
6060
// while unpatching is not. It should be the other way around
6161

6262
// tslint:disable:no-any
63-
applyPatch(moduleExporters: any, tracer: modelTypes.Tracer, version: string):
63+
applyPatch(moduleExports: any, tracer: modelTypes.Tracer, version: string):
6464
any {
65-
this.setPluginContext(moduleExporters, tracer, version);
65+
this.setPluginContext(moduleExports, tracer, version);
6666
}
6767

6868
abstract applyUnpatch(): void;

packages/opencensus-core/src/trace/instrumentation/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import {Tracer} from '../model/types';
2020
export interface Plugin {
2121
/**
2222
* Method to apply the instrumentation patch
23-
* @param moduleExporters exporters from the module to patch
23+
* @param moduleExports nodejs module exports from the module to patch
2424
* @param tracer a tracer instance
2525
* @param version version of the current instaled module to patch
2626
*/
2727
// tslint:disable:no-any
28-
applyPatch(moduleExporters: any, tracer: Tracer, version: string): any;
28+
applyPatch(moduleExports: any, tracer: Tracer, version: string): any;
2929
/** Method to unpatch the instrumentation */
3030
applyUnpatch(): void;
3131
}

packages/opencensus-nodejs/test/instrumentation/node_modules/@opencensus/opencensus-instrumentation-simple-module/simple-module.ts

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opencensus-nodejs/test/instrumentation/node_modules/enduser-simple-module-plugin/enduser-simple-module-plugin.ts

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)