@interopio/otel 0.0.222 → 0.0.224
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/dist/builder.d.ts +32 -43
- package/dist/builder.js +167 -164
- package/dist/builder.js.map +1 -1
- package/dist/constants.d.ts +7 -7
- package/dist/constants.js +10 -10
- package/dist/container.d.ts +24 -24
- package/dist/container.js +159 -159
- package/dist/container.js.map +1 -1
- package/dist/index.d.ts +141 -140
- package/dist/index.js +101 -88
- package/dist/index.js.map +1 -1
- package/dist/logger/log4jsWrapper.d.ts +19 -19
- package/dist/logger/log4jsWrapper.js +59 -59
- package/dist/logger/log4jsWrapper.js.map +1 -1
- package/dist/logger/logWrapper.d.ts +12 -12
- package/dist/logger/logWrapper.js +53 -53
- package/dist/logger/logWrapper.js.map +1 -1
- package/dist/logger/null.d.ts +9 -9
- package/dist/logger/null.js +24 -24
- package/dist/logs/builder.d.ts +9 -9
- package/dist/logs/builder.js +41 -41
- package/dist/logs/builder.js.map +1 -1
- package/dist/logs/logs.d.ts +8 -8
- package/dist/logs/logs.js +23 -23
- package/dist/logs/logs.js.map +1 -1
- package/dist/logs/nullManager.d.ts +7 -7
- package/dist/logs/nullManager.js +17 -17
- package/dist/logs/nullManager.js.map +1 -1
- package/dist/metrics/builder.d.ts +13 -13
- package/dist/metrics/builder.js +49 -49
- package/dist/metrics/builder.js.map +1 -1
- package/dist/metrics/metricsDependencyBuilder.d.ts +51 -51
- package/dist/metrics/metricsDependencyBuilder.js +154 -154
- package/dist/metrics/null.d.ts +11 -11
- package/dist/metrics/null.js +25 -25
- package/dist/metrics/nullMetricsManager.d.ts +8 -8
- package/dist/metrics/nullMetricsManager.js +24 -24
- package/dist/metrics/nullMetricsManager.js.map +1 -1
- package/dist/metrics/nullPerfProvider.d.ts +7 -7
- package/dist/metrics/nullPerfProvider.js +18 -18
- package/dist/nullManager.d.ts +8 -8
- package/dist/nullManager.js +23 -23
- package/dist/pluginLoader.d.ts +3 -3
- package/dist/pluginLoader.js +35 -36
- package/dist/pluginLoader.js.map +1 -1
- package/dist/traces/builder.d.ts +21 -21
- package/dist/traces/builder.js +72 -72
- package/dist/traces/builder.js.map +1 -1
- package/dist/traces/nullTracesManager.d.ts +20 -20
- package/dist/traces/nullTracesManager.js +109 -109
- package/dist/traces/nullTracesManager.js.map +1 -1
- package/dist/traces/nullTracingState.d.ts +25 -25
- package/dist/traces/nullTracingState.js +61 -61
- package/dist/traces/nullTracingState.js.map +1 -1
- package/dist/traces/traces.d.ts +32 -32
- package/dist/traces/traces.js +148 -148
- package/dist/traces/traces.js.map +1 -1
- package/dist/utils/is-plain-object.d.ts +1 -1
- package/dist/utils/is-plain-object.js +35 -36
- package/dist/utils/is-plain-object.js.map +1 -1
- package/dist/utils/isNode.d.ts +1 -1
- package/dist/utils/isNode.js +21 -22
- package/dist/utils/isNode.js.map +1 -1
- package/dist/utils/otelUtils.d.ts +7 -7
- package/dist/utils/otelUtils.js +120 -120
- package/dist/utils/otelUtils.js.map +1 -1
- package/dist/utils/safe-stringify.d.ts +1 -1
- package/dist/utils/safe-stringify.js +17 -18
- package/dist/utils/safe-stringify.js.map +1 -1
- package/insights.d.ts +7 -2
- package/package.json +25 -25
package/dist/traces/traces.js
CHANGED
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.withSpan = void 0;
|
|
16
|
-
const otelUtils_1 = require("../utils/otelUtils");
|
|
17
|
-
const nullTracesManager_1 = require("./nullTracesManager");
|
|
18
|
-
const nullTracingState_1 = __importDefault(require("./nullTracingState"));
|
|
19
|
-
/**
|
|
20
|
-
* Null-safe singleton class that can be invoked even if you haven't initialized
|
|
21
|
-
* the library (yet?), or if you don't have access to the current manager instance.
|
|
22
|
-
*/
|
|
23
|
-
class Traces {
|
|
24
|
-
static get instance() {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
if ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _a === void 0 ? void 0 : _a.traces) {
|
|
27
|
-
return (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.traces;
|
|
28
|
-
}
|
|
29
|
-
if (!Traces._instance) {
|
|
30
|
-
Traces._instance = new nullTracesManager_1.NullTracesManager(undefined, undefined, undefined);
|
|
31
|
-
}
|
|
32
|
-
return Traces._instance;
|
|
33
|
-
}
|
|
34
|
-
static set instance(value) {
|
|
35
|
-
Traces._instance = value;
|
|
36
|
-
}
|
|
37
|
-
static get currentTracingState() {
|
|
38
|
-
var _a;
|
|
39
|
-
return ((_a = Traces.instance) === null || _a === void 0 ? void 0 : _a.currentTracingState) || new nullTracingState_1.default("unknown", null, true);
|
|
40
|
-
}
|
|
41
|
-
static set currentTracingState(value) {
|
|
42
|
-
if (Traces.instance) {
|
|
43
|
-
Traces.instance.currentTracingState = value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
static removePropagationInfo(propagationInfoCarrier) {
|
|
47
|
-
Traces.extractPropagationInfo(propagationInfoCarrier, true);
|
|
48
|
-
return propagationInfoCarrier;
|
|
49
|
-
}
|
|
50
|
-
static extractPropagationInfo(propagationInfoCarrier, deleteProperty) {
|
|
51
|
-
if (propagationInfoCarrier === null || propagationInfoCarrier === void 0 ? void 0 : propagationInfoCarrier.traceparent) {
|
|
52
|
-
return propagationInfoCarrier;
|
|
53
|
-
}
|
|
54
|
-
const nestedPropagationInfo = propagationInfoCarrier === null || propagationInfoCarrier === void 0 ? void 0 : propagationInfoCarrier.__interopIOTracePropagationInfo;
|
|
55
|
-
if (nestedPropagationInfo) {
|
|
56
|
-
if (deleteProperty === true) {
|
|
57
|
-
delete propagationInfoCarrier.__interopIOTracePropagationInfo;
|
|
58
|
-
}
|
|
59
|
-
return nestedPropagationInfo;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
withSequenceSpanEx(source, traceName, filteringContextOrCallback, optionsOrCallback, callback) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
return Traces.instance.withSequenceSpanEx(source, traceName, filteringContextOrCallback, optionsOrCallback, callback);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
withSequenceSpan(source, filteringContextOrCallback, optionsOrCallback, callback) {
|
|
71
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
return Traces.instance.withSequenceSpan(source, filteringContextOrCallback, optionsOrCallback, callback);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
static withSpan(source, filteringContextOrDecoratorOptionsOrCallback, propagationInfoOrCallback, optionsOrCallback, callback) {
|
|
76
|
-
// decorator or wrapping a function
|
|
77
|
-
if (!(filteringContextOrDecoratorOptionsOrCallback instanceof Function) &&
|
|
78
|
-
(!filteringContextOrDecoratorOptionsOrCallback ||
|
|
79
|
-
filteringContextOrDecoratorOptionsOrCallback.argMapping ||
|
|
80
|
-
filteringContextOrDecoratorOptionsOrCallback.thisMapping ||
|
|
81
|
-
filteringContextOrDecoratorOptionsOrCallback.defaults) &&
|
|
82
|
-
!propagationInfoOrCallback &&
|
|
83
|
-
!optionsOrCallback &&
|
|
84
|
-
!callback) {
|
|
85
|
-
return function (target, propertyKey, descriptor) {
|
|
86
|
-
let originalFn;
|
|
87
|
-
if (descriptor) {
|
|
88
|
-
// decorator
|
|
89
|
-
originalFn = descriptor.value;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
// wrapping function directly
|
|
93
|
-
originalFn = target;
|
|
94
|
-
}
|
|
95
|
-
let tracedFunction = function (...args) {
|
|
96
|
-
return Traces.withSpan(source, filteringContextOrDecoratorOptionsOrCallback
|
|
97
|
-
? (0, otelUtils_1.extractFilteringContextFromArgs)(filteringContextOrDecoratorOptionsOrCallback, args, this)
|
|
98
|
-
: {}, null, filteringContextOrDecoratorOptionsOrCallback, () => {
|
|
99
|
-
return originalFn.apply(this, args);
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
if (Traces.isAsyncFunction(originalFn)) {
|
|
103
|
-
// fix for interception API using toString() to check for async functions
|
|
104
|
-
const inner = tracedFunction;
|
|
105
|
-
tracedFunction = function __insightsAsyncTracedFunction(...args) {
|
|
106
|
-
return inner.apply(this, args);
|
|
107
|
-
};
|
|
108
|
-
Object.defineProperty(tracedFunction, Symbol.toStringTag, {
|
|
109
|
-
value: "AsyncFunction",
|
|
110
|
-
configurable: true,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
if (descriptor) {
|
|
114
|
-
descriptor.value = tracedFunction;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return tracedFunction;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return Traces.instance.withSpan(source, filteringContextOrDecoratorOptionsOrCallback, propagationInfoOrCallback, optionsOrCallback, callback);
|
|
122
|
-
}
|
|
123
|
-
static isAsyncFunction(value) {
|
|
124
|
-
return value && {}.toString.call(value) === '[object AsyncFunction]';
|
|
125
|
-
}
|
|
126
|
-
static withSpans(tracingMap, objectToTrace) {
|
|
127
|
-
for (const tracingMapPropertyName in tracingMap) {
|
|
128
|
-
if (typeof objectToTrace[tracingMapPropertyName] === "function") {
|
|
129
|
-
const originalMethod = objectToTrace[tracingMapPropertyName];
|
|
130
|
-
const tracingMapPropertyValue = tracingMap[tracingMapPropertyName];
|
|
131
|
-
if (!tracingMapPropertyValue) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
let wrapperMaker;
|
|
135
|
-
if (typeof tracingMapPropertyValue === "string") {
|
|
136
|
-
wrapperMaker = Traces.withSpan(tracingMapPropertyValue);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
wrapperMaker = Traces.withSpan(tracingMapPropertyValue.source, tracingMapPropertyValue.decoratorOptions);
|
|
140
|
-
}
|
|
141
|
-
objectToTrace[tracingMapPropertyName] = wrapperMaker(originalMethod);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return objectToTrace;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
exports.default = Traces;
|
|
148
|
-
exports.withSpan = Traces.withSpan;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.withSpan = void 0;
|
|
16
|
+
const otelUtils_1 = require("../utils/otelUtils");
|
|
17
|
+
const nullTracesManager_1 = require("./nullTracesManager");
|
|
18
|
+
const nullTracingState_1 = __importDefault(require("./nullTracingState"));
|
|
19
|
+
/**
|
|
20
|
+
* Null-safe singleton class that can be invoked even if you haven't initialized
|
|
21
|
+
* the library (yet?), or if you don't have access to the current manager instance.
|
|
22
|
+
*/
|
|
23
|
+
class Traces {
|
|
24
|
+
static get instance() {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
if ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _a === void 0 ? void 0 : _a.traces) {
|
|
27
|
+
return (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.traces;
|
|
28
|
+
}
|
|
29
|
+
if (!Traces._instance) {
|
|
30
|
+
Traces._instance = new nullTracesManager_1.NullTracesManager(undefined, undefined, undefined);
|
|
31
|
+
}
|
|
32
|
+
return Traces._instance;
|
|
33
|
+
}
|
|
34
|
+
static set instance(value) {
|
|
35
|
+
Traces._instance = value;
|
|
36
|
+
}
|
|
37
|
+
static get currentTracingState() {
|
|
38
|
+
var _a;
|
|
39
|
+
return ((_a = Traces.instance) === null || _a === void 0 ? void 0 : _a.currentTracingState) || new nullTracingState_1.default("unknown", null, true);
|
|
40
|
+
}
|
|
41
|
+
static set currentTracingState(value) {
|
|
42
|
+
if (Traces.instance) {
|
|
43
|
+
Traces.instance.currentTracingState = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
static removePropagationInfo(propagationInfoCarrier) {
|
|
47
|
+
Traces.extractPropagationInfo(propagationInfoCarrier, true);
|
|
48
|
+
return propagationInfoCarrier;
|
|
49
|
+
}
|
|
50
|
+
static extractPropagationInfo(propagationInfoCarrier, deleteProperty) {
|
|
51
|
+
if (propagationInfoCarrier === null || propagationInfoCarrier === void 0 ? void 0 : propagationInfoCarrier.traceparent) {
|
|
52
|
+
return propagationInfoCarrier;
|
|
53
|
+
}
|
|
54
|
+
const nestedPropagationInfo = propagationInfoCarrier === null || propagationInfoCarrier === void 0 ? void 0 : propagationInfoCarrier.__interopIOTracePropagationInfo;
|
|
55
|
+
if (nestedPropagationInfo) {
|
|
56
|
+
if (deleteProperty === true) {
|
|
57
|
+
delete propagationInfoCarrier.__interopIOTracePropagationInfo;
|
|
58
|
+
}
|
|
59
|
+
return nestedPropagationInfo;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
withSequenceSpanEx(source, traceName, filteringContextOrCallback, optionsOrCallback, callback) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
return Traces.instance.withSequenceSpanEx(source, traceName, filteringContextOrCallback, optionsOrCallback, callback);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
withSequenceSpan(source, filteringContextOrCallback, optionsOrCallback, callback) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
return Traces.instance.withSequenceSpan(source, filteringContextOrCallback, optionsOrCallback, callback);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
static withSpan(source, filteringContextOrDecoratorOptionsOrCallback, propagationInfoOrCallback, optionsOrCallback, callback) {
|
|
76
|
+
// decorator or wrapping a function
|
|
77
|
+
if (!(filteringContextOrDecoratorOptionsOrCallback instanceof Function) &&
|
|
78
|
+
(!filteringContextOrDecoratorOptionsOrCallback ||
|
|
79
|
+
filteringContextOrDecoratorOptionsOrCallback.argMapping ||
|
|
80
|
+
filteringContextOrDecoratorOptionsOrCallback.thisMapping ||
|
|
81
|
+
filteringContextOrDecoratorOptionsOrCallback.defaults) &&
|
|
82
|
+
!propagationInfoOrCallback &&
|
|
83
|
+
!optionsOrCallback &&
|
|
84
|
+
!callback) {
|
|
85
|
+
return function (target, propertyKey, descriptor) {
|
|
86
|
+
let originalFn;
|
|
87
|
+
if (descriptor) {
|
|
88
|
+
// decorator
|
|
89
|
+
originalFn = descriptor.value;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// wrapping function directly
|
|
93
|
+
originalFn = target;
|
|
94
|
+
}
|
|
95
|
+
let tracedFunction = function (...args) {
|
|
96
|
+
return Traces.withSpan(source, filteringContextOrDecoratorOptionsOrCallback
|
|
97
|
+
? (0, otelUtils_1.extractFilteringContextFromArgs)(filteringContextOrDecoratorOptionsOrCallback, args, this)
|
|
98
|
+
: {}, null, filteringContextOrDecoratorOptionsOrCallback, () => {
|
|
99
|
+
return originalFn.apply(this, args);
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
if (Traces.isAsyncFunction(originalFn)) {
|
|
103
|
+
// fix for interception API using toString() to check for async functions
|
|
104
|
+
const inner = tracedFunction;
|
|
105
|
+
tracedFunction = function __insightsAsyncTracedFunction(...args) {
|
|
106
|
+
return inner.apply(this, args);
|
|
107
|
+
};
|
|
108
|
+
Object.defineProperty(tracedFunction, Symbol.toStringTag, {
|
|
109
|
+
value: "AsyncFunction",
|
|
110
|
+
configurable: true,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (descriptor) {
|
|
114
|
+
descriptor.value = tracedFunction;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
return tracedFunction;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return Traces.instance.withSpan(source, filteringContextOrDecoratorOptionsOrCallback, propagationInfoOrCallback, optionsOrCallback, callback);
|
|
122
|
+
}
|
|
123
|
+
static isAsyncFunction(value) {
|
|
124
|
+
return value && {}.toString.call(value) === '[object AsyncFunction]';
|
|
125
|
+
}
|
|
126
|
+
static withSpans(tracingMap, objectToTrace) {
|
|
127
|
+
for (const tracingMapPropertyName in tracingMap) {
|
|
128
|
+
if (typeof objectToTrace[tracingMapPropertyName] === "function") {
|
|
129
|
+
const originalMethod = objectToTrace[tracingMapPropertyName];
|
|
130
|
+
const tracingMapPropertyValue = tracingMap[tracingMapPropertyName];
|
|
131
|
+
if (!tracingMapPropertyValue) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
let wrapperMaker;
|
|
135
|
+
if (typeof tracingMapPropertyValue === "string") {
|
|
136
|
+
wrapperMaker = Traces.withSpan(tracingMapPropertyValue);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
wrapperMaker = Traces.withSpan(tracingMapPropertyValue.source, tracingMapPropertyValue.decoratorOptions);
|
|
140
|
+
}
|
|
141
|
+
objectToTrace[tracingMapPropertyName] = wrapperMaker(originalMethod);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return objectToTrace;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.default = Traces;
|
|
148
|
+
exports.withSpan = Traces.withSpan;
|
|
149
149
|
//# sourceMappingURL=traces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/traces/traces.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,kDAAqE;AACrE,2DAAwD;AACxD,0EAAkD;AAIlD;;;GAGG;AACH,MAAqB,MAAM;IAElB,MAAM,KAAK,QAAQ;;QACxB,IAAI,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,mBAAmB,0CAAE,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/traces/traces.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,kDAAqE;AACrE,2DAAwD;AACxD,0EAAkD;AAIlD;;;GAGG;AACH,MAAqB,MAAM;IAElB,MAAM,KAAK,QAAQ;;QACxB,IAAI,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,mBAAmB,0CAAE,MAAM,EAAE,CAAC;YAC5C,OAAO,MAAA,UAAU,a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AE,CAAC;gBAChE,MAAM,cAAc,GAAG,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAC7D,MAAM,uBAAuB,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;gBACnE,IAAI,CAAC,uBAAuB,EAAE,CAAC;oBAC7B,SAAS;gBACX,CAAC;gBACD,IAAI,YAAsB,CAAC;gBAC3B,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;oBAChD,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;gBAC1D,CAAC;qBAAM,CAAC;oBACN,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,MAAM,EAAE,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;gBAC3G,CAAC;gBACD,aAAa,CAAC,sBAAsB,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAjSD,yBAiSC;AAEY,QAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isPlainObject(o: any): boolean;
|
|
1
|
+
export declare function isPlainObject(o: any): boolean;
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// https://github.com/jonschlinkert/is-plain-object/blob/master/is-plain-object.js
|
|
3
|
-
// cf204a3
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.isPlainObject =
|
|
6
|
-
/*!
|
|
7
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
function isObject(o) {
|
|
13
|
-
return Object.prototype.toString.call(o) === '[object Object]';
|
|
14
|
-
}
|
|
15
|
-
function isPlainObject(o) {
|
|
16
|
-
let ctor;
|
|
17
|
-
let prot;
|
|
18
|
-
if (isObject(o) === false)
|
|
19
|
-
return false;
|
|
20
|
-
// If has modified constructor
|
|
21
|
-
ctor = o.constructor;
|
|
22
|
-
if (ctor === undefined)
|
|
23
|
-
return true;
|
|
24
|
-
// If has modified prototype
|
|
25
|
-
prot = ctor.prototype;
|
|
26
|
-
if (isObject(prot) === false)
|
|
27
|
-
return false;
|
|
28
|
-
// If constructor does not have an Object-specific method
|
|
29
|
-
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
// Most likely a plain Object
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
;
|
|
1
|
+
"use strict";
|
|
2
|
+
// https://github.com/jonschlinkert/is-plain-object/blob/master/is-plain-object.js
|
|
3
|
+
// cf204a3
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isPlainObject = isPlainObject;
|
|
6
|
+
/*!
|
|
7
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
+
* Released under the MIT License.
|
|
11
|
+
*/
|
|
12
|
+
function isObject(o) {
|
|
13
|
+
return Object.prototype.toString.call(o) === '[object Object]';
|
|
14
|
+
}
|
|
15
|
+
function isPlainObject(o) {
|
|
16
|
+
let ctor;
|
|
17
|
+
let prot;
|
|
18
|
+
if (isObject(o) === false)
|
|
19
|
+
return false;
|
|
20
|
+
// If has modified constructor
|
|
21
|
+
ctor = o.constructor;
|
|
22
|
+
if (ctor === undefined)
|
|
23
|
+
return true;
|
|
24
|
+
// If has modified prototype
|
|
25
|
+
prot = ctor.prototype;
|
|
26
|
+
if (isObject(prot) === false)
|
|
27
|
+
return false;
|
|
28
|
+
// If constructor does not have an Object-specific method
|
|
29
|
+
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
// Most likely a plain Object
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
;
|
|
37
36
|
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../../src/utils/is-plain-object.ts"],"names":[],"mappings":";AAAA,kFAAkF;AAClF,UAAU
|
|
1
|
+
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../../src/utils/is-plain-object.ts"],"names":[],"mappings":";AAAA,kFAAkF;AAClF,UAAU;;AAaV,sCAqBC;AAhCD;;;;;GAKG;AAEH,SAAS,QAAQ,CAAC,CAAM;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,CAAC;AACjE,CAAC;AAED,SAAgB,aAAa,CAAC,CAAM;IAClC,IAAI,IAAI,CAAC;IACT,IAAI,IAAI,CAAC;IAET,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAExC,8BAA8B;IAC9B,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC;IACrB,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAEpC,4BAA4B;IAC5B,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;IACtB,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAE3C,yDAAyD;IACzD,IAAI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,KAAK,KAAK,EAAE,CAAC;QACnD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6BAA6B;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC;AAAA,CAAC"}
|
package/dist/utils/isNode.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isNode(): boolean;
|
|
1
|
+
export declare function isNode(): boolean;
|
package/dist/utils/isNode.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNode =
|
|
4
|
-
let _isNode;
|
|
5
|
-
function isNode() {
|
|
6
|
-
if (typeof _isNode !== "undefined") {
|
|
7
|
-
return _isNode;
|
|
8
|
-
}
|
|
9
|
-
if (typeof window !== "undefined") {
|
|
10
|
-
_isNode = false;
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
// Only Node.JS has a process variable that is of [[Class]] process
|
|
14
|
-
try {
|
|
15
|
-
_isNode = Object.prototype.toString.call(global.process) === "[object process]";
|
|
16
|
-
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
_isNode = false;
|
|
19
|
-
}
|
|
20
|
-
return _isNode;
|
|
21
|
-
}
|
|
22
|
-
exports.isNode = isNode;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNode = isNode;
|
|
4
|
+
let _isNode;
|
|
5
|
+
function isNode() {
|
|
6
|
+
if (typeof _isNode !== "undefined") {
|
|
7
|
+
return _isNode;
|
|
8
|
+
}
|
|
9
|
+
if (typeof window !== "undefined") {
|
|
10
|
+
_isNode = false;
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
// Only Node.JS has a process variable that is of [[Class]] process
|
|
14
|
+
try {
|
|
15
|
+
_isNode = Object.prototype.toString.call(global.process) === "[object process]";
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
_isNode = false;
|
|
19
|
+
}
|
|
20
|
+
return _isNode;
|
|
21
|
+
}
|
|
23
22
|
//# sourceMappingURL=isNode.js.map
|
package/dist/utils/isNode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNode.js","sourceRoot":"","sources":["../../src/utils/isNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isNode.js","sourceRoot":"","sources":["../../src/utils/isNode.ts"],"names":[],"mappings":";;AAEA,wBAiBC;AAnBD,IAAI,OAAgB,CAAC;AAErB,SAAgB,MAAM;IAClB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,GAAG,KAAK,CAAC;QAChB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,mEAAmE;IACnE,IAAI,CAAC;QACD,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,kBAAkB,CAAC;IACpF,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,GAAG,KAAK,CAAC;IACpB,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IOInsights } from "../../insights";
|
|
2
|
-
export declare const flattenOtelAtributes: (data: object, maxDepth: number) => {};
|
|
3
|
-
export declare const getOTELData: (key: string, value: any, depth: number, maxDepth: number) => any[];
|
|
4
|
-
export declare const deep_value: (obj: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, path: any) => any;
|
|
7
|
-
export declare const extractFilteringContextFromArgs: (template: IOInsights.FilteringContext, args: any[], that: any) => any;
|
|
1
|
+
import { IOInsights } from "../../insights";
|
|
2
|
+
export declare const flattenOtelAtributes: (data: object, maxDepth: number) => {};
|
|
3
|
+
export declare const getOTELData: (key: string, value: any, depth: number, maxDepth: number) => any[];
|
|
4
|
+
export declare const deep_value: (obj: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}, path: any) => any;
|
|
7
|
+
export declare const extractFilteringContextFromArgs: (template: IOInsights.FilteringContext, args: any[], that: any) => any;
|