@nsshunt/stsobservability 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/stsobservability.mjs +6439 -0
- package/dist/stsobservability.mjs.map +1 -0
- package/dist/stsobservability.umd.js +6434 -0
- package/dist/stsobservability.umd.js.map +1 -0
- package/package.json +68 -0
- package/types/index.d.ts +25 -0
- package/types/index.d.ts.map +1 -0
- package/types/instrumentation/index.d.ts +13 -0
- package/types/instrumentation/index.d.ts.map +1 -0
- package/types/instrumentation/instrumentDefs.d.ts +40 -0
- package/types/instrumentation/instrumentDefs.d.ts.map +1 -0
- package/types/instrumentation/instrumentUtils.d.ts +7 -0
- package/types/instrumentation/instrumentUtils.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentBase.d.ts +25 -0
- package/types/instrumentation/instruments/instrumentBase.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentGauge.d.ts +47 -0
- package/types/instrumentation/instruments/instrumentGauge.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentGauge.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentGauge.test.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentHistogram.d.ts +43 -0
- package/types/instrumentation/instruments/instrumentHistogram.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentHistogram.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentHistogram.test.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentLog.d.ts +50 -0
- package/types/instrumentation/instruments/instrumentLog.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentLog.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentLog.test.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentObject.d.ts +20 -0
- package/types/instrumentation/instruments/instrumentObject.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentObject.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentObject.test.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentTimerGauge.d.ts +29 -0
- package/types/instrumentation/instruments/instrumentTimerGauge.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentTimerGauge.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentTimerGauge.test.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentVelocity.d.ts +48 -0
- package/types/instrumentation/instruments/instrumentVelocity.d.ts.map +1 -0
- package/types/instrumentation/instruments/instrumentVelocity.test.d.ts +2 -0
- package/types/instrumentation/instruments/instrumentVelocity.test.d.ts.map +1 -0
- package/types/instrumentation/testme.d.ts +2 -0
- package/types/instrumentation/testme.d.ts.map +1 -0
- package/types/publish/agentinstrumentcontroller.d.ts +23 -0
- package/types/publish/agentinstrumentcontroller.d.ts.map +1 -0
- package/types/publish/commonTypes.d.ts +74 -0
- package/types/publish/commonTypes.d.ts.map +1 -0
- package/types/publish/middleware/requestLoggerMiddleware.d.ts +32 -0
- package/types/publish/middleware/requestLoggerMiddleware.d.ts.map +1 -0
- package/types/publish/publishInstrumentController.d.ts +34 -0
- package/types/publish/publishInstrumentController.d.ts.map +1 -0
- package/types/publish/publishers/publishTransportRESTServer.d.ts +10 -0
- package/types/publish/publishers/publishTransportRESTServer.d.ts.map +1 -0
- package/types/publish/stsPluginKeys.d.ts +2 -0
- package/types/publish/stsPluginKeys.d.ts.map +1 -0
- package/types/socketioutils/socketIoClientHelper.d.ts +76 -0
- package/types/socketioutils/socketIoClientHelper.d.ts.map +1 -0
- package/types/subscribe/commonTypes.d.ts +159 -0
- package/types/subscribe/commonTypes.d.ts.map +1 -0
- package/types/subscribe/kafkaHelper.d.ts +12 -0
- package/types/subscribe/kafkaHelper.d.ts.map +1 -0
- package/types/subscribe/observabilitymodelutils.d.ts +46 -0
- package/types/subscribe/observabilitymodelutils.d.ts.map +1 -0
- package/types/subscribe/observabilityrestapisubscriber.d.ts +11 -0
- package/types/subscribe/observabilityrestapisubscriber.d.ts.map +1 -0
- package/types/subscribe/observabilitysocketiosubscriber.d.ts +14 -0
- package/types/subscribe/observabilitysocketiosubscriber.d.ts.map +1 -0
- package/types/subscribe/observabilitysubscriptionmanager.d.ts +38 -0
- package/types/subscribe/observabilitysubscriptionmanager.d.ts.map +1 -0
- package/types/subscribe/socketioMessageSender.d.ts +51 -0
- package/types/subscribe/socketioMessageSender.d.ts.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nsshunt/stsobservability",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "All in one package to include instrumentation, publication and subscription capabilities.",
|
|
5
|
+
"main": "./dist/stsobservability.umd.js",
|
|
6
|
+
"module": "./dist/stsobservability.mjs",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/stsobservability.mjs",
|
|
12
|
+
"require": "./dist/stsobservability.umd.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"types"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"lint": "eslint . --ext js,jsx,ts,tsx",
|
|
21
|
+
"lintex": "eslint . --ext js,jsx,ts,tsx --fix",
|
|
22
|
+
"test": "vitest run --reporter verbose --pool forks",
|
|
23
|
+
"test2": "jest --detectOpenHandles --no-cache",
|
|
24
|
+
"testwatch": "jest --watchAll --detectOpenHandles --no-cache",
|
|
25
|
+
"build": "tsc && vite build",
|
|
26
|
+
"build2": "tsc"
|
|
27
|
+
},
|
|
28
|
+
"author": "Marcus Bettens",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/nsshunt/stspublisherserver/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/nsshunt/stspublisherserver#readme",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@nsshunt/stsinstrumentation": "^7.0.28",
|
|
36
|
+
"@nsshunt/stsutils": "^1.16.53",
|
|
37
|
+
"axios": "^1.6.7",
|
|
38
|
+
"chalk": "^4.1.2",
|
|
39
|
+
"detect-node": "^2.1.0",
|
|
40
|
+
"lodash.clonedeep": "^4.5.0",
|
|
41
|
+
"socket.io-client": "^4.7.4",
|
|
42
|
+
"timsort": "^0.3.0",
|
|
43
|
+
"tiny-emitter": "^2.1.0",
|
|
44
|
+
"uuid": "^9.0.1",
|
|
45
|
+
"vue": "^3.4.21"
|
|
46
|
+
},
|
|
47
|
+
"standard": {
|
|
48
|
+
"parser": "@babel/eslint-parser"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@tsconfig/node20": "^20.1.2",
|
|
52
|
+
"@types/debug": "^4.1.12",
|
|
53
|
+
"@types/detect-node": "^2.0.2",
|
|
54
|
+
"@types/jest": "^29.5.12",
|
|
55
|
+
"@types/lodash.clonedeep": "^4.5.9",
|
|
56
|
+
"@types/node": "^20.11.20",
|
|
57
|
+
"@types/timsort": "^0.3.3",
|
|
58
|
+
"@types/uuid": "^9.0.8",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
60
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
61
|
+
"eslint": "^8.57.0",
|
|
62
|
+
"jest": "^29.7.0",
|
|
63
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
64
|
+
"typescript": "^5.3.3",
|
|
65
|
+
"vite": "^5.1.4",
|
|
66
|
+
"vitest": "^1.3.1"
|
|
67
|
+
}
|
|
68
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Gauge } from './instrumentation/instrumentDefs';
|
|
2
|
+
import { InstrumentBase } from './instrumentation/instruments/instrumentBase';
|
|
3
|
+
export * from './instrumentation/instrumentUtils';
|
|
4
|
+
export * from './instrumentation/instrumentDefs';
|
|
5
|
+
export * from './instrumentation/instruments/instrumentBase';
|
|
6
|
+
export * from './instrumentation/instruments/instrumentVelocity';
|
|
7
|
+
export * from './instrumentation/instruments/instrumentHistogram';
|
|
8
|
+
export * from './instrumentation/instruments/instrumentLog';
|
|
9
|
+
export * from './instrumentation/instruments/instrumentTimerGauge';
|
|
10
|
+
export * from './instrumentation/instruments/instrumentGauge';
|
|
11
|
+
export * from './instrumentation/instruments/instrumentObject';
|
|
12
|
+
export type Instruments = Partial<Record<Gauge, InstrumentBase>>;
|
|
13
|
+
export * from './publish/commonTypes';
|
|
14
|
+
export * from './publish/middleware/requestLoggerMiddleware';
|
|
15
|
+
export * from './publish/publishInstrumentController';
|
|
16
|
+
export * from './publish/stsPluginKeys';
|
|
17
|
+
export * from './publish/agentinstrumentcontroller';
|
|
18
|
+
export * from './publish/publishers/publishTransportRESTServer';
|
|
19
|
+
export * from './subscribe/commonTypes';
|
|
20
|
+
export * from './subscribe/kafkaHelper';
|
|
21
|
+
export * from './subscribe/observabilitymodelutils';
|
|
22
|
+
export * from './subscribe/observabilityrestapisubscriber';
|
|
23
|
+
export * from './subscribe/observabilitysocketiosubscriber';
|
|
24
|
+
export * from './subscribe/observabilitysubscriptionmanager';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAE7E,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,kDAAkD,CAAA;AAChE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oDAAoD,CAAA;AAClE,cAAc,+CAA+C,CAAA;AAC7D,cAAc,gDAAgD,CAAA;AAE9D,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;AAGhE,cAAc,uBAAuB,CAAA;AACrC,cAAc,8CAA8C,CAAA;AAC5D,cAAc,uCAAuC,CAAA;AACrD,cAAc,yBAAyB,CAAA;AACvC,cAAc,qCAAqC,CAAA;AACnD,cAAc,iDAAiD,CAAA;AAG/D,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qCAAqC,CAAA;AACnD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,8CAA8C,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Gauge } from './instrumentDefs';
|
|
2
|
+
import { InstrumentBase } from './instruments/instrumentBase';
|
|
3
|
+
export * from './instrumentUtils';
|
|
4
|
+
export * from './instrumentDefs';
|
|
5
|
+
export * from './instruments/instrumentBase';
|
|
6
|
+
export * from './instruments/instrumentVelocity';
|
|
7
|
+
export * from './instruments/instrumentHistogram';
|
|
8
|
+
export * from './instruments/instrumentLog';
|
|
9
|
+
export * from './instruments/instrumentTimerGauge';
|
|
10
|
+
export * from './instruments/instrumentGauge';
|
|
11
|
+
export * from './instruments/instrumentObject';
|
|
12
|
+
export type Instruments = Partial<Record<Gauge, InstrumentBase>>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instrumentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oCAAoC,CAAA;AAClD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAE9C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare enum Gauge {
|
|
2
|
+
ACTIVE_REQUEST_GAUGE = "a",
|
|
3
|
+
AUTHENTICATION_COUNT_GAUGE = "b",
|
|
4
|
+
AUTHENTICATION_ERROR_COUNT_GAUGE = "aa",
|
|
5
|
+
AUTHENTICATION_RETRY_COUNT_GAUGE = "ab",
|
|
6
|
+
CONNECTION_POOL_IDLE_GAUGE = "c",
|
|
7
|
+
CONNECTION_POOL_TOTAL_GAUGE = "d",
|
|
8
|
+
CONNECTION_POOL_WAITING_GAUGE = "e",
|
|
9
|
+
CPU_LOAD_GAUGE = "f",
|
|
10
|
+
CPU_SYSTEM_LOAD_GAUGE = "g",
|
|
11
|
+
DURATION_GAUGE = "h",
|
|
12
|
+
DURATION_HISTOGRAM_GAUGE = "i",
|
|
13
|
+
ERROR_COUNT_GAUGE = "j",
|
|
14
|
+
LATENCY_GAUGE = "k",
|
|
15
|
+
LATENCY_HISTOGRAM_GAUGE = "l",
|
|
16
|
+
LOGGER = "m",
|
|
17
|
+
LOGGER_COPY = "n",
|
|
18
|
+
NETWORK_RX_GAUGE = "o",
|
|
19
|
+
NETWORK_TX_GAUGE = "p",
|
|
20
|
+
REQUEST_COUNT_GAUGE = "q",
|
|
21
|
+
RETRY_COUNT_GAUGE = "r",
|
|
22
|
+
TIMER_GAUGE = "s",
|
|
23
|
+
VELOCITY_GAUGE = "t",
|
|
24
|
+
CONNECTION_COUNT_GAUGE = "u",
|
|
25
|
+
OBJECT_GAUGE = "v",
|
|
26
|
+
PAYLOAD_SIZE = "w",
|
|
27
|
+
CORE_COUNT_GAUGE = "x",
|
|
28
|
+
CHILD_COUNT = "y",
|
|
29
|
+
UNKNOWN = "z"
|
|
30
|
+
}
|
|
31
|
+
export declare enum GaugeTypes {
|
|
32
|
+
GAUGE_TYPE = "_",
|
|
33
|
+
INSTRUMENT_GAUGE = "a",
|
|
34
|
+
INSTRUMENT_VELOCITY = "b",
|
|
35
|
+
INSTRUMENT_HISTOGRAM = "c",
|
|
36
|
+
INSTRUMENT_LOG = "d",
|
|
37
|
+
INSTRUMENT_TIMER = "e",
|
|
38
|
+
INSTRUMENT_OBJECT = "f"
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=instrumentDefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentDefs.d.ts","sourceRoot":"","sources":["../../src/instrumentation/instrumentDefs.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IAChB,oBAAoB,MAAM;IAC1B,0BAA0B,MAAM;IAChC,gCAAgC,OAAO;IACvC,gCAAgC,OAAO;IACvC,0BAA0B,MAAM;IAChC,2BAA2B,MAAM;IACjC,6BAA6B,MAAM;IACnC,cAAc,MAAM;IACpB,qBAAqB,MAAM;IAC3B,cAAc,MAAM;IACpB,wBAAwB,MAAM;IAC9B,iBAAiB,MAAM;IACvB,aAAa,MAAM;IACnB,uBAAuB,MAAM;IAC7B,MAAM,MAAM;IACZ,WAAW,MAAM;IACjB,gBAAgB,MAAM;IACtB,gBAAgB,MAAM;IACtB,mBAAmB,MAAM;IACzB,iBAAiB,MAAM;IACvB,WAAW,MAAM;IACjB,cAAc,MAAM;IACpB,sBAAsB,MAAM;IAC5B,YAAY,MAAM;IAClB,YAAY,MAAM;IAClB,gBAAgB,MAAM;IACtB,WAAW,MAAM;IACjB,OAAO,MAAM;CACb;AAED,oBAAY,UAAU;IACrB,UAAU,MAAM;IAChB,gBAAgB,MAAM;IACtB,mBAAmB,MAAM;IACzB,oBAAoB,MAAM;IAC1B,cAAc,MAAM;IACpB,gBAAgB,MAAM;IACtB,iBAAiB,MAAM;CACvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Gauge } from './instrumentDefs';
|
|
2
|
+
import { InstrumentBase } from './instruments/instrumentBase';
|
|
3
|
+
import { Instruments } from './index';
|
|
4
|
+
export declare function CreateInstrument(sourceInstrument: InstrumentBase): InstrumentBase;
|
|
5
|
+
export declare function GetInstrumentName(gauge: Gauge): string;
|
|
6
|
+
export declare function StopInstruments(instruments: InstrumentBase[] | Instruments): void;
|
|
7
|
+
//# sourceMappingURL=instrumentUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentUtils.d.ts","sourceRoot":"","sources":["../../src/instrumentation/instrumentUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAO7D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,cAAc,GAAG,cAAc,CAgBjF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAuDtD;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,WAAW,GAAG,IAAI,CAgBjF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
2
|
+
import { GaugeTypes } from '../instrumentDefs';
|
|
3
|
+
export declare class InstrumentBaseOptions {
|
|
4
|
+
fixedSize?: number;
|
|
5
|
+
padLength?: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class InstrumentBaseTelemetry {
|
|
9
|
+
}
|
|
10
|
+
export declare abstract class InstrumentBase {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(options?: InstrumentBaseOptions);
|
|
13
|
+
[GaugeTypes.GAUGE_TYPE]: GaugeTypes;
|
|
14
|
+
val?: number | string[] | JSONObject;
|
|
15
|
+
WithLabel(label: string): this;
|
|
16
|
+
DefineCopyProperties(propertyNames: string[]): void;
|
|
17
|
+
GetNumber(val: number): number;
|
|
18
|
+
get options(): InstrumentBaseOptions | null;
|
|
19
|
+
set options(optionsValue: InstrumentBaseOptions | null);
|
|
20
|
+
get label(): string;
|
|
21
|
+
set label(labelValue: string);
|
|
22
|
+
StopTimer(): void;
|
|
23
|
+
ProcessTelemetry(telemetry: InstrumentBaseTelemetry): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=instrumentBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentBase.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,qBAAa,qBAAqB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,qBAAa,uBAAuB;CAEnC;AAED,8BAAsB,cAAc;;gBASpB,OAAO,GAAE,qBAA2B;IAoDzC,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU,CAA+B;IACzE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEpC,SAAS,CAAC,KAAK,EAAE,MAAM;IAKvB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI;IAenD,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAQ9B,IAAI,OAAO,IAAI,qBAAqB,GAAG,IAAI,CAE1C;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,qBAAqB,GAAG,IAAI,EAErD;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,UAAU,EAAE,MAAM,EAE3B;IAED,SAAS,IAAI,IAAI;IAKjB,gBAAgB,CAAC,SAAS,EAAE,uBAAuB,GAAG,IAAI;CA8B7D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
3
|
+
export type QuantileDataElement = [
|
|
4
|
+
label: string,
|
|
5
|
+
val: number
|
|
6
|
+
];
|
|
7
|
+
export interface gaugeReportValue extends JSONObject {
|
|
8
|
+
val: number;
|
|
9
|
+
value: string;
|
|
10
|
+
vf: string;
|
|
11
|
+
min?: string;
|
|
12
|
+
max?: string;
|
|
13
|
+
avg?: string;
|
|
14
|
+
percentile?: number[];
|
|
15
|
+
percentileFormatted?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class InstrumentGaugeOptions extends InstrumentBaseOptions {
|
|
18
|
+
interval?: number;
|
|
19
|
+
sampleSize?: number;
|
|
20
|
+
fromJSON?: InstrumentGauge;
|
|
21
|
+
initValue?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class InstrumentGaugeTelemetry extends InstrumentBaseTelemetry {
|
|
24
|
+
val?: number;
|
|
25
|
+
Inc?: number;
|
|
26
|
+
Dec?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class InstrumentGauge extends InstrumentBase {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(options?: InstrumentGaugeOptions);
|
|
31
|
+
readonly percentile?: number[];
|
|
32
|
+
readonly min?: number;
|
|
33
|
+
readonly max?: number;
|
|
34
|
+
readonly avg?: number;
|
|
35
|
+
val: number;
|
|
36
|
+
WithInitVal(initVal: number): InstrumentGauge;
|
|
37
|
+
WithMin(): InstrumentGauge;
|
|
38
|
+
WithMax(): InstrumentGauge;
|
|
39
|
+
WithAverage(): InstrumentGauge;
|
|
40
|
+
private _StartTimer;
|
|
41
|
+
StopTimer(): void;
|
|
42
|
+
Reset(): void;
|
|
43
|
+
Inc(incVal?: number): void;
|
|
44
|
+
Dec(decVal?: number): void;
|
|
45
|
+
ProcessTelemetry(telemetry: InstrumentGaugeTelemetry): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=instrumentGauge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentGauge.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentGauge.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAEjG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,qBAAa,sBAAuB,SAAQ,qBAAqB;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,qBAAa,wBAAyB,SAAQ,uBAAuB;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AAGD,qBAAa,eAAgB,SAAQ,cAAc;;gBAiBnC,OAAO,GAAE,sBAA4B;IA2EjD,SAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,SAAK;IAEf,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe;IAK7C,OAAO,IAAI,eAAe;IAQ1B,OAAO,IAAI,eAAe;IAQ1B,WAAW,IAAI,eAAe;IAQ9B,OAAO,CAAC,WAAW;IAuBV,SAAS,IAAI,IAAI;IAqE1B,KAAK,IAAI,IAAI;IA0Bb,GAAG,CAAC,MAAM,SAAI,GAAG,IAAI;IAIrB,GAAG,CAAC,MAAM,SAAI,GAAG,IAAI;IAcZ,gBAAgB,CAAC,SAAS,EAAE,wBAAwB,GAAG,IAAI;CAWvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentGauge.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentGauge.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
3
|
+
export interface HistogramReportValue extends JSONObject {
|
|
4
|
+
val: number;
|
|
5
|
+
hist: HistogramDataElement[];
|
|
6
|
+
vf: string;
|
|
7
|
+
}
|
|
8
|
+
export declare enum HistogramDataElementPos {
|
|
9
|
+
val = 0,
|
|
10
|
+
label = 1,
|
|
11
|
+
breakPoint = 2
|
|
12
|
+
}
|
|
13
|
+
export type HistogramDataElement = [
|
|
14
|
+
val: number,
|
|
15
|
+
label: string,
|
|
16
|
+
breakPoint: number
|
|
17
|
+
];
|
|
18
|
+
export declare class InstrumentHistogramOptions extends InstrumentBaseOptions {
|
|
19
|
+
histogramData?: number[];
|
|
20
|
+
initValue?: number;
|
|
21
|
+
fromJSON?: InstrumentHistogram;
|
|
22
|
+
}
|
|
23
|
+
export declare class InstrumentHistogramTelemetry extends InstrumentBaseTelemetry {
|
|
24
|
+
val?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare class InstrumentHistogram extends InstrumentBase {
|
|
27
|
+
#private;
|
|
28
|
+
constructor(options?: InstrumentHistogramOptions);
|
|
29
|
+
hist: HistogramDataElement[];
|
|
30
|
+
val: number;
|
|
31
|
+
WithInitVal(initVal: number): InstrumentHistogram;
|
|
32
|
+
ResetHistogramData(): void;
|
|
33
|
+
AddObservation(updateValue: number): void;
|
|
34
|
+
get formattedHistogramData(): string;
|
|
35
|
+
static AddHistogramDataEx(histoA: InstrumentHistogram | null, histoB: InstrumentHistogram): InstrumentHistogram;
|
|
36
|
+
/**
|
|
37
|
+
* Adds a value object (from GetFormatted()) to this instance.
|
|
38
|
+
* @param {*} value
|
|
39
|
+
*/
|
|
40
|
+
AddHistogramData(histogramData: InstrumentHistogram): void;
|
|
41
|
+
ProcessTelemetry(telemetry: InstrumentHistogramTelemetry): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=instrumentHistogram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentHistogram.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentHistogram.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAGjG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACvD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,EAAE,EAAE,MAAM,CAAA;CACV;AAED,oBAAY,uBAAuB;IAClC,GAAG,IAAI;IACP,KAAK,IAAI;IACT,UAAU,IAAI;CACd;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,MAAM;CAClB,CAAA;AAED,qBAAa,0BAA2B,SAAQ,qBAAqB;IACjE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CACjC;AAED,qBAAa,4BAA6B,SAAQ,uBAAuB;IACrE,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,mBAAoB,SAAQ,cAAc;;gBAMvC,OAAO,GAAE,0BAAgC;IA4E9C,IAAI,EAAE,oBAAoB,EAAE,CAAO;IACnC,GAAG,SAAK;IAEf,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB;IAKjD,kBAAkB,IAAI,IAAI;IAM1B,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAyBzC,IAAI,sBAAsB,IAAI,MAAM,CAQnC;IAUD,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,EAAE,MAAM,EAAE,mBAAmB,GAAG,mBAAmB;IA0B/G;;;OAGA;IACA,gBAAgB,CAAC,aAAa,EAAE,mBAAmB,GAAG,IAAI;IAoBjD,gBAAgB,CAAC,SAAS,EAAE,4BAA4B,GAAG,IAAI;CAK3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentHistogram.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentHistogram.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject, ISTSLogger } from '@nsshunt/stsutils';
|
|
3
|
+
export interface LogReportValue extends JSONObject {
|
|
4
|
+
val: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare class InstrumentLogOptions extends InstrumentBaseOptions {
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
useLatestMessages?: boolean;
|
|
9
|
+
consoleLogging?: boolean;
|
|
10
|
+
instrumentLogging?: boolean;
|
|
11
|
+
winstonLogging?: boolean;
|
|
12
|
+
fromJSON?: InstrumentLog;
|
|
13
|
+
initValue?: string[];
|
|
14
|
+
logger?: ISTSLogger;
|
|
15
|
+
}
|
|
16
|
+
export declare class InstrumentLogTelemetry extends InstrumentBaseTelemetry {
|
|
17
|
+
Append?: string[];
|
|
18
|
+
LogMessage?: string;
|
|
19
|
+
val?: string[];
|
|
20
|
+
ResetLog?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class InstrumentLog extends InstrumentBase implements ISTSLogger {
|
|
23
|
+
#private;
|
|
24
|
+
constructor(options?: InstrumentLogOptions);
|
|
25
|
+
val: string[];
|
|
26
|
+
WithMaxSize(maxSize: number): InstrumentLog;
|
|
27
|
+
WithUseLatestMessages(useLatestMessages: boolean): InstrumentLog;
|
|
28
|
+
WithConsoleLogging(consoleLogging: boolean): InstrumentLog;
|
|
29
|
+
WithInstrumentLogging(instrumentLogging: boolean): InstrumentLog;
|
|
30
|
+
get MaxSize(): number;
|
|
31
|
+
set MaxSize(maxSize: number);
|
|
32
|
+
get consoleLogging(): boolean;
|
|
33
|
+
set consoleLogging(value: boolean);
|
|
34
|
+
get instrumentLogging(): boolean;
|
|
35
|
+
set instrumentLogging(value: boolean);
|
|
36
|
+
Append(messageArray: string[]): void;
|
|
37
|
+
error(message: any): void;
|
|
38
|
+
warn(message: any): void;
|
|
39
|
+
info(message: any): void;
|
|
40
|
+
http(message: any): void;
|
|
41
|
+
verbose(message: any): void;
|
|
42
|
+
debug(message: any): void;
|
|
43
|
+
silly(message: any): void;
|
|
44
|
+
LogMessage(message: string): void;
|
|
45
|
+
GetMessagesNoUpdate(): string[];
|
|
46
|
+
GetMessagesSinceLastRead(): string[];
|
|
47
|
+
ResetLog(): void;
|
|
48
|
+
ProcessTelemetry(telemetry: InstrumentLogTelemetry): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=instrumentLog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentLog.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentLog.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAGjG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,WAAW,cAAe,SAAQ,UAAU;IACjD,GAAG,EAAE,MAAM,EAAE,CAAA;CACb;AAED,qBAAa,oBAAqB,SAAQ,qBAAqB;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,UAAU,CAAA;CACtB;AAED,qBAAa,sBAAuB,SAAQ,uBAAuB;IAC/D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,qBAAa,aAAc,SAAQ,cAAe,YAAW,UAAU;;gBAYvD,OAAO,GAAE,oBAA0B;IA0ExC,GAAG,EAAE,MAAM,EAAE,CAAM;IAE1B,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa;IAK3C,qBAAqB,CAAC,iBAAiB,EAAE,OAAO,GAAG,aAAa;IAKhE,kBAAkB,CAAC,cAAc,EAAE,OAAO,GAAG,aAAa;IAK1D,qBAAqB,CAAC,iBAAiB,EAAE,OAAO,GAAG,aAAa;IAKhE,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAE1B;IAUD,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,OAAO,EAKhC;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAEnC;IAED,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI;IAMpC,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIzB,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIxB,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIxB,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIxB,OAAO,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAI3B,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIzB,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAIzB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAkCjC,mBAAmB,IAAI,MAAM,EAAE;IAK/B,wBAAwB,IAAI,MAAM,EAAE;IAOpC,QAAQ,IAAI,IAAI;IAMP,gBAAgB,CAAC,SAAS,EAAE,sBAAsB,GAAG,IAAI;CAcrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentLog.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentLog.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
3
|
+
export interface ObjectReportValue extends JSONObject {
|
|
4
|
+
val: JSONObject;
|
|
5
|
+
}
|
|
6
|
+
export declare class InstrumentObjectOptions extends InstrumentBaseOptions {
|
|
7
|
+
fromJSON?: InstrumentObject;
|
|
8
|
+
initValue?: JSONObject;
|
|
9
|
+
}
|
|
10
|
+
export declare class InstrumentObjectTelemetry extends InstrumentBaseTelemetry {
|
|
11
|
+
val?: JSONObject;
|
|
12
|
+
}
|
|
13
|
+
export declare class InstrumentObject extends InstrumentBase {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(options?: InstrumentObjectOptions);
|
|
16
|
+
val: JSONObject;
|
|
17
|
+
WithInitVal(initVal: JSONObject): this;
|
|
18
|
+
ProcessTelemetry(telemetry: InstrumentObjectTelemetry): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=instrumentObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentObject.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentObject.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAGjG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACpD,GAAG,EAAE,UAAU,CAAA;CACf;AAED,qBAAa,uBAAwB,SAAQ,qBAAqB;IAC9D,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,SAAS,CAAC,EAAE,UAAU,CAAA;CACzB;AAED,qBAAa,yBAA0B,SAAQ,uBAAuB;IAClE,GAAG,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,qBAAa,gBAAiB,SAAQ,cAAc;;gBAKpC,OAAO,GAAE,uBAA6B;IA6C3C,GAAG,EAAE,UAAU,CAAC;IAEvB,WAAW,CAAC,OAAO,EAAE,UAAU;IAatB,gBAAgB,CAAC,SAAS,EAAE,yBAAyB,GAAG,IAAI;CAKxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentObject.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentObject.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
3
|
+
export interface TimerReportValue extends JSONObject {
|
|
4
|
+
val: number;
|
|
5
|
+
value: string;
|
|
6
|
+
vf: string;
|
|
7
|
+
s: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class InstrumentTimerOptions extends InstrumentBaseOptions {
|
|
10
|
+
fromJSON?: InstrumentTimerGauge;
|
|
11
|
+
initValue?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class InstrumentTimerTelemetry extends InstrumentBaseTelemetry {
|
|
14
|
+
val?: number;
|
|
15
|
+
Pause?: boolean;
|
|
16
|
+
Resume?: boolean;
|
|
17
|
+
Reset?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class InstrumentTimerGauge extends InstrumentBase {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(options?: InstrumentTimerOptions);
|
|
22
|
+
val: number;
|
|
23
|
+
Pause(): void;
|
|
24
|
+
Resume(): void;
|
|
25
|
+
Reset(): void;
|
|
26
|
+
get start(): number;
|
|
27
|
+
ProcessTelemetry(telemetry: InstrumentTimerTelemetry): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=instrumentTimerGauge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentTimerGauge.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentTimerGauge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAGjG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAK9C,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,CAAC,EAAE,MAAM,CAAA;CACT;AAED,qBAAa,sBAAuB,SAAQ,qBAAqB;IAC7D,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,qBAAa,wBAAyB,SAAQ,uBAAuB;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,qBAAa,oBAAqB,SAAQ,cAAc;;gBAMxC,OAAO,GAAE,sBAA4B;IA6C1C,GAAG,SAAK;IAGf,KAAK,IAAI,IAAI;IAIb,MAAM,IAAI,IAAI;IAId,KAAK,IAAI,IAAI;IA4Bb,IAAI,KAAK,IAAI,MAAM,CAElB;IAiBQ,gBAAgB,CAAC,SAAS,EAAE,wBAAwB,GAAG,IAAI;CAcvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentTimerGauge.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentTimerGauge.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry } from './instrumentBase';
|
|
2
|
+
import { JSONObject } from '@nsshunt/stsutils';
|
|
3
|
+
export interface VelocityReportValue extends JSONObject {
|
|
4
|
+
val: number;
|
|
5
|
+
value: string;
|
|
6
|
+
vf: string;
|
|
7
|
+
delta: number;
|
|
8
|
+
maxVelocity: number;
|
|
9
|
+
velocity: number;
|
|
10
|
+
va: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class InstrumentVelocityOptions extends InstrumentBaseOptions {
|
|
13
|
+
interval?: number;
|
|
14
|
+
valStackMaxLength?: number;
|
|
15
|
+
maxAverageValStack?: number;
|
|
16
|
+
maxAverageIterations?: number;
|
|
17
|
+
fromJSON?: InstrumentVelocity;
|
|
18
|
+
initValue?: number;
|
|
19
|
+
autoComputeVelocity?: boolean;
|
|
20
|
+
velocityTimeDiff?: number;
|
|
21
|
+
vaTimeDiff?: number;
|
|
22
|
+
autoComputeVelocityTimeout?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class InstrumentVelocityTelemetry extends InstrumentBaseTelemetry {
|
|
25
|
+
val?: number;
|
|
26
|
+
Inc?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class InstrumentVelocity extends InstrumentBase {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(options?: InstrumentVelocityOptions);
|
|
31
|
+
readonly maxVelocity: number;
|
|
32
|
+
readonly delta: number;
|
|
33
|
+
readonly velocity: number;
|
|
34
|
+
readonly va: number;
|
|
35
|
+
readonly timeStamp: number;
|
|
36
|
+
readonly countDiff: number;
|
|
37
|
+
readonly timeDiff: number;
|
|
38
|
+
readonly deltaCountDiff: number;
|
|
39
|
+
readonly deltaTimeDif: number;
|
|
40
|
+
readonly averageVelocity: number[];
|
|
41
|
+
val: number;
|
|
42
|
+
WithValStackMaxLength(valStackMaxLength: number): InstrumentVelocity;
|
|
43
|
+
private _StartTimer;
|
|
44
|
+
Inc(incVal?: number): void;
|
|
45
|
+
StopTimer(): void;
|
|
46
|
+
ProcessTelemetry(telemetry: InstrumentVelocityTelemetry): void;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=instrumentVelocity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentVelocity.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentVelocity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAEjG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;CACV;AAED,qBAAa,yBAA0B,SAAQ,qBAAqB;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0BAA0B,CAAC,EAAE,MAAM,CAAA;CACtC;AAED,qBAAa,2BAA4B,SAAQ,uBAAuB;IACpE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AAgBD,qBAAa,kBAAmB,SAAQ,cAAc;;gBAiCtC,OAAO,GAAE,yBAA+B;IAgKpD,SAAgB,WAAW,EAAE,MAAM,CAAK;IACxC,SAAgB,KAAK,EAAE,MAAM,CAAK;IAClC,SAAgB,QAAQ,EAAE,MAAM,CAAK;IACrC,SAAgB,EAAE,EAAE,MAAM,CAAK;IAC/B,SAAgB,SAAS,EAAE,MAAM,CAAK;IACtC,SAAgB,SAAS,EAAE,MAAM,CAAK;IACtC,SAAgB,QAAQ,EAAE,MAAM,CAAK;IACrC,SAAgB,cAAc,EAAE,MAAM,CAAK;IAC3C,SAAgB,YAAY,EAAE,MAAM,CAAK;IACzC,SAAgB,eAAe,EAAE,MAAM,EAAE,CAAM;IACxC,GAAG,SAAK;IAEf,qBAAqB,CAAC,iBAAiB,EAAE,MAAM,GAAG,kBAAkB;IAMpE,OAAO,CAAC,WAAW;IAmJnB,GAAG,CAAC,MAAM,SAAI,GAAG,IAAI;IA0DZ,SAAS,IAAI,IAAI;IAOjB,gBAAgB,CAAC,SAAS,EAAE,2BAA2B,GAAG,IAAI;CAQ1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentVelocity.test.d.ts","sourceRoot":"","sources":["../../../src/instrumentation/instruments/instrumentVelocity.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testme.d.ts","sourceRoot":"","sources":["../../src/instrumentation/testme.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PublishInstrumentController } from './publishInstrumentController';
|
|
2
|
+
import { IContextBase, IPublishInstrumentControllerOptions } from './commonTypes';
|
|
3
|
+
export declare class AgentInstrumentController extends PublishInstrumentController {
|
|
4
|
+
/**
|
|
5
|
+
* Create the primary instrument publisher
|
|
6
|
+
* @param options
|
|
7
|
+
*/
|
|
8
|
+
constructor(options: IPublishInstrumentControllerOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Add additional instrument publishers. Usually invoked when adding workers to the app and/or async runners within a worker.
|
|
11
|
+
* @param processContext
|
|
12
|
+
* @returns Returns the newly created PublishInstrumentController
|
|
13
|
+
*/
|
|
14
|
+
AddPublishInstrumentController(processContext: IContextBase): PublishInstrumentController;
|
|
15
|
+
}
|
|
16
|
+
export declare const GetSTSInstrumentControllerPluginKey: () => symbol;
|
|
17
|
+
export declare const CompareSTSInstrumentControllerPluginKey: (val: symbol) => boolean;
|
|
18
|
+
export declare const useSTSInstrumentControllerPlugin: () => AgentInstrumentController;
|
|
19
|
+
export declare const GetSTSInstrumentController: (app: any) => AgentInstrumentController;
|
|
20
|
+
export declare const STSInstrumentControllerPlugin: {
|
|
21
|
+
install: (app: any, options: IPublishInstrumentControllerOptions) => void;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=agentinstrumentcontroller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentinstrumentcontroller.d.ts","sourceRoot":"","sources":["../../src/publish/agentinstrumentcontroller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAI3E,OAAO,EAAE,YAAY,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAA;AAEjF,qBAAa,yBAA0B,SAAQ,2BAA2B;IACtE;;;OAGA;gBACY,OAAO,EAAE,mCAAmC;IAIxD;;;;OAIA;IACA,8BAA8B,CAAC,cAAc,EAAE,YAAY,GAAG,2BAA2B;CAK5F;AAED,eAAO,MAAM,mCAAmC,QAAO,MAA0C,CAAA;AAEjG,eAAO,MAAM,uCAAuC,QAAS,MAAM,KAAG,OAAmD,CAAA;AAIzH,eAAO,MAAM,gCAAgC,QAAO,yBAAkG,CAAA;AAGtJ,eAAO,MAAM,0BAA0B,QAAS,GAAG,KAAG,yBAErD,CAAA;AAED,eAAO,MAAM,6BAA6B;mBAEvB,GAAG,WAAW,mCAAmC;CA2BnE,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { JSONObject, ISTSLogger } from '@nsshunt/stsutils';
|
|
2
|
+
import { InstrumentBaseOptions, InstrumentBase, GaugeTypes, Gauge } from '@nsshunt/stsinstrumentation';
|
|
3
|
+
export declare enum TransportType {
|
|
4
|
+
none = 0,
|
|
5
|
+
IPC = 1,// Inter-process communication (local)
|
|
6
|
+
websocket = 2,// node ws
|
|
7
|
+
RESTAPI = 4,// RESTful API
|
|
8
|
+
redis = 8,
|
|
9
|
+
kafka = 16,// https://www.npmjs.com/package/kafkajs
|
|
10
|
+
influxdb = 32,// https://github.com/influxdata/influxdb-client-js/ https://www.npmjs.com/package/@influxdata/influxdb-client
|
|
11
|
+
prometheus = 64,
|
|
12
|
+
gRPC = 128,// https://www.npmjs.com/package/@grpc/grpc-js
|
|
13
|
+
unixsocket = 256,// Uses https://www.npmjs.com/package/json-socket
|
|
14
|
+
socketio = 512,// https://socket.io
|
|
15
|
+
otelcollector = 1024,
|
|
16
|
+
messageport = 2048,
|
|
17
|
+
jsonrpc = 4096,// https://www.npmjs.com/package/jayson
|
|
18
|
+
postgresql = 8192,
|
|
19
|
+
grafanaloki = 16384,
|
|
20
|
+
logstash = 32768,
|
|
21
|
+
fluentbit = 65536,
|
|
22
|
+
fluentd = 131072,
|
|
23
|
+
inmemory = 262144
|
|
24
|
+
}
|
|
25
|
+
export declare function GetTransportMode(transport: string): TransportType;
|
|
26
|
+
export type Nid = string;
|
|
27
|
+
export interface IContextBase extends JSONObject {
|
|
28
|
+
serviceType?: string;
|
|
29
|
+
nid?: Nid;
|
|
30
|
+
}
|
|
31
|
+
export declare enum InstrumentPayloadType {
|
|
32
|
+
agent = "agent",
|
|
33
|
+
service = "service"
|
|
34
|
+
}
|
|
35
|
+
export interface IInstrumentPayload {
|
|
36
|
+
context: IContextBase;
|
|
37
|
+
instruments: Record<string, InstrumentBase>;
|
|
38
|
+
}
|
|
39
|
+
export type InstrumentDefinition = [Gauge, GaugeTypes, InstrumentBaseOptions?];
|
|
40
|
+
export type InstrumentDefinitions = InstrumentDefinition[];
|
|
41
|
+
export interface IPublisherTransport {
|
|
42
|
+
Publish(payload: IInstrumentPayload): Promise<boolean>;
|
|
43
|
+
Close(): Promise<boolean>;
|
|
44
|
+
}
|
|
45
|
+
export interface IPublishInstrumentControllerOptions {
|
|
46
|
+
processContext: IContextBase;
|
|
47
|
+
consoleLogging?: boolean;
|
|
48
|
+
instrumentLogging?: boolean;
|
|
49
|
+
httpServer?: boolean;
|
|
50
|
+
instrumentationObservationInterval?: number;
|
|
51
|
+
instrumentationTimeWindow?: number;
|
|
52
|
+
instrumentDefinitions?: InstrumentDefinitions;
|
|
53
|
+
publisherTransport: IPublisherTransport;
|
|
54
|
+
publishInterval: number;
|
|
55
|
+
logger: ISTSLogger;
|
|
56
|
+
}
|
|
57
|
+
export interface IPublishTransportBaseOptions {
|
|
58
|
+
id?: string;
|
|
59
|
+
transportType: TransportType;
|
|
60
|
+
logger: ISTSLogger;
|
|
61
|
+
}
|
|
62
|
+
export interface IPublishTransportRESTServerOptions extends IPublishTransportBaseOptions {
|
|
63
|
+
url?: string;
|
|
64
|
+
socketPath?: string;
|
|
65
|
+
agentOptions?: {
|
|
66
|
+
keepAlive: boolean;
|
|
67
|
+
maxSockets: number;
|
|
68
|
+
maxTotalSockets: number;
|
|
69
|
+
maxFreeSockets: number;
|
|
70
|
+
timeout: number;
|
|
71
|
+
rejectUnauthorized: boolean;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=commonTypes.d.ts.map
|