@interopio/otel 0.0.221 → 0.0.223
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 +43 -43
- package/dist/builder.js +164 -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 +140 -141
- package/dist/index.js +97 -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 +0 -1
- package/package.json +25 -25
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;
|
package/dist/utils/otelUtils.js
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractFilteringContextFromArgs = exports.deep_value = exports.getOTELData = exports.flattenOtelAtributes = void 0;
|
|
4
|
-
const container_1 = require("../container");
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
-
const flattenOtelAtributes = (data, maxDepth) => {
|
|
7
|
-
if (data === undefined ||
|
|
8
|
-
data === null) {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
if (typeof data !== "object") {
|
|
12
|
-
data = { unknownAttribute: data };
|
|
13
|
-
}
|
|
14
|
-
const toReturn = {};
|
|
15
|
-
for (const [key, value] of Object.entries(data)) {
|
|
16
|
-
const otelValues = (0, exports.getOTELData)(key, value, 0, maxDepth);
|
|
17
|
-
for (const [otelKey, otelValue] of otelValues) {
|
|
18
|
-
toReturn[otelKey] = otelValue;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return toReturn;
|
|
22
|
-
};
|
|
23
|
-
exports.flattenOtelAtributes = flattenOtelAtributes;
|
|
24
|
-
const getOTELData = (key, value, depth, maxDepth) => {
|
|
25
|
-
depth += 1;
|
|
26
|
-
if (depth > maxDepth) {
|
|
27
|
-
return [[key, "<depth exceeded>"]];
|
|
28
|
-
}
|
|
29
|
-
const isObject = Boolean(value && typeof value === "object");
|
|
30
|
-
const isValidPrimitiveValue = typeof value === "number" || typeof value === "string" || typeof value === "boolean";
|
|
31
|
-
if (isValidPrimitiveValue) {
|
|
32
|
-
return [[key, value]];
|
|
33
|
-
}
|
|
34
|
-
if (isAttributeArray(value)) {
|
|
35
|
-
return [[key, value]].concat(flatten(key, value, depth, maxDepth));
|
|
36
|
-
}
|
|
37
|
-
else if (isObject) {
|
|
38
|
-
return flatten(key, value, depth, maxDepth);
|
|
39
|
-
}
|
|
40
|
-
else if (typeof value === "function") {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
else if (value) {
|
|
44
|
-
return [[key, value + ""]];
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.getOTELData = getOTELData;
|
|
51
|
-
const flatten = (key, obj, depth, maxDepth) => {
|
|
52
|
-
const toReturn = [];
|
|
53
|
-
for (const [key2, val2] of Object.entries(obj)) {
|
|
54
|
-
for (const [key3, val3] of (0, exports.getOTELData)(key2, val2, depth, maxDepth)) {
|
|
55
|
-
toReturn.push([key + "." + key3, val3]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return toReturn;
|
|
59
|
-
};
|
|
60
|
-
const isAttributeArray = (value) => {
|
|
61
|
-
if (!Array.isArray(value)) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
return value.every((item) => item === null ||
|
|
65
|
-
item === undefined ||
|
|
66
|
-
typeof item === "string" ||
|
|
67
|
-
typeof item === "number" ||
|
|
68
|
-
typeof item === "boolean");
|
|
69
|
-
};
|
|
70
|
-
// todo vnikolov: document all the places where deep_value is used in the spec, as well
|
|
71
|
-
// as the regex matches
|
|
72
|
-
const deep_value = function (obj, path) {
|
|
73
|
-
// eslint-disable-next-line no-var
|
|
74
|
-
if (!path) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
// eslint-disable-next-line no-var
|
|
78
|
-
for (var i = 0, path = path.split("."), len = path.length; i < len; i++) {
|
|
79
|
-
if (obj === null || obj === undefined) {
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
obj = obj[path[i]];
|
|
83
|
-
}
|
|
84
|
-
return obj;
|
|
85
|
-
};
|
|
86
|
-
exports.deep_value = deep_value;
|
|
87
|
-
// https://stackoverflow.com/a/8817473
|
|
88
|
-
const extractFilteringContextFromArgs = (template, args, that) => {
|
|
89
|
-
let filteringContext = {};
|
|
90
|
-
if (typeof template.thisMapping === "function") {
|
|
91
|
-
filteringContext = Object.assign(Object.assign({}, filteringContext), container_1.Container.errorless(() => template.thisMapping.apply(that, [that])));
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
Object.keys(template.thisMapping || {}).forEach((keyOrPath) => {
|
|
95
|
-
if (!keyOrPath || !template.thisMapping) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const filteringContextKey = template.thisMapping[keyOrPath];
|
|
99
|
-
filteringContext[filteringContextKey] = (0, exports.deep_value)(that, keyOrPath);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
if (typeof template.argMapping === "function") {
|
|
103
|
-
filteringContext = Object.assign(Object.assign({}, filteringContext), container_1.Container.errorless(() => template.argMapping.apply(that, args)));
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
Object.keys(template.argMapping || {}).forEach((keyOrPath) => {
|
|
107
|
-
if (!keyOrPath || !template.argMapping) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
const filteringContextKey = template.argMapping[keyOrPath];
|
|
111
|
-
const value = (0, exports.deep_value)(args, keyOrPath);
|
|
112
|
-
if (typeof value === "string" ||
|
|
113
|
-
typeof value === "number") {
|
|
114
|
-
filteringContext[filteringContextKey] = value;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return filteringContext;
|
|
119
|
-
};
|
|
120
|
-
exports.extractFilteringContextFromArgs = extractFilteringContextFromArgs;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractFilteringContextFromArgs = exports.deep_value = exports.getOTELData = exports.flattenOtelAtributes = void 0;
|
|
4
|
+
const container_1 = require("../container");
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
const flattenOtelAtributes = (data, maxDepth) => {
|
|
7
|
+
if (data === undefined ||
|
|
8
|
+
data === null) {
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
if (typeof data !== "object") {
|
|
12
|
+
data = { unknownAttribute: data };
|
|
13
|
+
}
|
|
14
|
+
const toReturn = {};
|
|
15
|
+
for (const [key, value] of Object.entries(data)) {
|
|
16
|
+
const otelValues = (0, exports.getOTELData)(key, value, 0, maxDepth);
|
|
17
|
+
for (const [otelKey, otelValue] of otelValues) {
|
|
18
|
+
toReturn[otelKey] = otelValue;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return toReturn;
|
|
22
|
+
};
|
|
23
|
+
exports.flattenOtelAtributes = flattenOtelAtributes;
|
|
24
|
+
const getOTELData = (key, value, depth, maxDepth) => {
|
|
25
|
+
depth += 1;
|
|
26
|
+
if (depth > maxDepth) {
|
|
27
|
+
return [[key, "<depth exceeded>"]];
|
|
28
|
+
}
|
|
29
|
+
const isObject = Boolean(value && typeof value === "object");
|
|
30
|
+
const isValidPrimitiveValue = typeof value === "number" || typeof value === "string" || typeof value === "boolean";
|
|
31
|
+
if (isValidPrimitiveValue) {
|
|
32
|
+
return [[key, value]];
|
|
33
|
+
}
|
|
34
|
+
if (isAttributeArray(value)) {
|
|
35
|
+
return [[key, value]].concat(flatten(key, value, depth, maxDepth));
|
|
36
|
+
}
|
|
37
|
+
else if (isObject) {
|
|
38
|
+
return flatten(key, value, depth, maxDepth);
|
|
39
|
+
}
|
|
40
|
+
else if (typeof value === "function") {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
else if (value) {
|
|
44
|
+
return [[key, value + ""]];
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.getOTELData = getOTELData;
|
|
51
|
+
const flatten = (key, obj, depth, maxDepth) => {
|
|
52
|
+
const toReturn = [];
|
|
53
|
+
for (const [key2, val2] of Object.entries(obj)) {
|
|
54
|
+
for (const [key3, val3] of (0, exports.getOTELData)(key2, val2, depth, maxDepth)) {
|
|
55
|
+
toReturn.push([key + "." + key3, val3]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return toReturn;
|
|
59
|
+
};
|
|
60
|
+
const isAttributeArray = (value) => {
|
|
61
|
+
if (!Array.isArray(value)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return value.every((item) => item === null ||
|
|
65
|
+
item === undefined ||
|
|
66
|
+
typeof item === "string" ||
|
|
67
|
+
typeof item === "number" ||
|
|
68
|
+
typeof item === "boolean");
|
|
69
|
+
};
|
|
70
|
+
// todo vnikolov: document all the places where deep_value is used in the spec, as well
|
|
71
|
+
// as the regex matches
|
|
72
|
+
const deep_value = function (obj, path) {
|
|
73
|
+
// eslint-disable-next-line no-var
|
|
74
|
+
if (!path) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
// eslint-disable-next-line no-var
|
|
78
|
+
for (var i = 0, path = path.split("."), len = path.length; i < len; i++) {
|
|
79
|
+
if (obj === null || obj === undefined) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
obj = obj[path[i]];
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
};
|
|
86
|
+
exports.deep_value = deep_value;
|
|
87
|
+
// https://stackoverflow.com/a/8817473
|
|
88
|
+
const extractFilteringContextFromArgs = (template, args, that) => {
|
|
89
|
+
let filteringContext = {};
|
|
90
|
+
if (typeof template.thisMapping === "function") {
|
|
91
|
+
filteringContext = Object.assign(Object.assign({}, filteringContext), container_1.Container.errorless(() => template.thisMapping.apply(that, [that])));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
Object.keys(template.thisMapping || {}).forEach((keyOrPath) => {
|
|
95
|
+
if (!keyOrPath || !template.thisMapping) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const filteringContextKey = template.thisMapping[keyOrPath];
|
|
99
|
+
filteringContext[filteringContextKey] = (0, exports.deep_value)(that, keyOrPath);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (typeof template.argMapping === "function") {
|
|
103
|
+
filteringContext = Object.assign(Object.assign({}, filteringContext), container_1.Container.errorless(() => template.argMapping.apply(that, args)));
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
Object.keys(template.argMapping || {}).forEach((keyOrPath) => {
|
|
107
|
+
if (!keyOrPath || !template.argMapping) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const filteringContextKey = template.argMapping[keyOrPath];
|
|
111
|
+
const value = (0, exports.deep_value)(args, keyOrPath);
|
|
112
|
+
if (typeof value === "string" ||
|
|
113
|
+
typeof value === "number") {
|
|
114
|
+
filteringContext[filteringContextKey] = value;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return filteringContext;
|
|
119
|
+
};
|
|
120
|
+
exports.extractFilteringContextFromArgs = extractFilteringContextFromArgs;
|
|
121
121
|
//# sourceMappingURL=otelUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otelUtils.js","sourceRoot":"","sources":["../../src/utils/otelUtils.ts"],"names":[],"mappings":";;;AACA,4CAAyC;AAEzC,uDAAuD;AAChD,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,EAAE;IACrE,IAAI,IAAI,KAAK,SAAS;QACpB,IAAI,KAAK,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"otelUtils.js","sourceRoot":"","sources":["../../src/utils/otelUtils.ts"],"names":[],"mappings":";;;AACA,4CAAyC;AAEzC,uDAAuD;AAChD,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,EAAE;IACrE,IAAI,IAAI,KAAK,SAAS;QACpB,IAAI,KAAK,IAAI,EAAE,CAAC;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;IACpC,CAAC;IACD,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;QACxD,KAAK,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,UAAU,EAAE,CAAC;YAC7C,QAAgB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;QACzC,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAhBW,QAAA,oBAAoB,wBAgB/B;AAEK,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,KAAa,EA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AU,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC3D,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;gBACvC,OAAO;YACT,CAAC;YACD,MAAM,mBAAmB,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC3D,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAC3B,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC5B,gBAAgB,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC;YAChD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAnCW,QAAA,+BAA+B,mCAmC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function safeStringify(obj: any): string;
|
|
1
|
+
export declare function safeStringify(obj: any): string;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.safeStringify =
|
|
4
|
-
const is_plain_object_1 = require("./is-plain-object");
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
function safeStringify(obj) {
|
|
7
|
-
if (!obj) {
|
|
8
|
-
return JSON.stringify(obj);
|
|
9
|
-
}
|
|
10
|
-
return JSON.stringify(obj, (k, v) => {
|
|
11
|
-
if (!v || typeof v !== "object")
|
|
12
|
-
return v;
|
|
13
|
-
if (!(0, is_plain_object_1.isPlainObject)(v))
|
|
14
|
-
return Object.prototype.toString.call(v);
|
|
15
|
-
return v;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
exports.safeStringify = safeStringify;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.safeStringify = safeStringify;
|
|
4
|
+
const is_plain_object_1 = require("./is-plain-object");
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
function safeStringify(obj) {
|
|
7
|
+
if (!obj) {
|
|
8
|
+
return JSON.stringify(obj);
|
|
9
|
+
}
|
|
10
|
+
return JSON.stringify(obj, (k, v) => {
|
|
11
|
+
if (!v || typeof v !== "object")
|
|
12
|
+
return v;
|
|
13
|
+
if (!(0, is_plain_object_1.isPlainObject)(v))
|
|
14
|
+
return Object.prototype.toString.call(v);
|
|
15
|
+
return v;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
19
18
|
//# sourceMappingURL=safe-stringify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-stringify.js","sourceRoot":"","sources":["../../src/utils/safe-stringify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"safe-stringify.js","sourceRoot":"","sources":["../../src/utils/safe-stringify.ts"],"names":[],"mappings":";;AAGA,sCASC;AAZD,uDAAkD;AAElD,8DAA8D;AAC9D,SAAgB,aAAa,CAAC,GAAQ;IAClC,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAA,+BAAa,EAAC,CAAC,CAAC;YAAE,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChE,OAAO,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/insights.d.ts
CHANGED
|
@@ -39,7 +39,6 @@ import {
|
|
|
39
39
|
} from "@opentelemetry/sdk-logs";
|
|
40
40
|
import { MeterProvider, MeterProviderOptions, type MetricReader, type PeriodicExportingMetricReaderOptions, type PushMetricExporter } from "@opentelemetry/sdk-metrics";
|
|
41
41
|
import { type OTLPMetricExporterOptions } from "@opentelemetry/exporter-metrics-otlp-http";
|
|
42
|
-
import { deprecate } from "util";
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* @docname Insights
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interopio/otel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.223",
|
|
4
4
|
"description": "io.Insights observability library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,33 +25,33 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentelemetry/api": "^1.9.
|
|
29
|
-
"@opentelemetry/api-logs": "^0.
|
|
30
|
-
"@opentelemetry/exporter-logs-otlp-http": "^0.
|
|
31
|
-
"@opentelemetry/exporter-metrics-otlp-http": "^0.
|
|
32
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
33
|
-
"@opentelemetry/instrumentation": "^0.
|
|
34
|
-
"@opentelemetry/instrumentation-document-load": "^0.
|
|
35
|
-
"@opentelemetry/instrumentation-fetch": "^0.
|
|
36
|
-
"@opentelemetry/instrumentation-user-interaction": "^0.
|
|
37
|
-
"@opentelemetry/instrumentation-xml-http-request": "^0.
|
|
38
|
-
"@opentelemetry/otlp-exporter-base": "^0.
|
|
39
|
-
"@opentelemetry/resources": "^2.
|
|
40
|
-
"@opentelemetry/sdk-logs": "^0.
|
|
41
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
42
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
28
|
+
"@opentelemetry/api": "^1.9.1",
|
|
29
|
+
"@opentelemetry/api-logs": "^0.215.0",
|
|
30
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.215.0",
|
|
31
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.215.0",
|
|
32
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.215.0",
|
|
33
|
+
"@opentelemetry/instrumentation": "^0.215.0",
|
|
34
|
+
"@opentelemetry/instrumentation-document-load": "^0.59.0",
|
|
35
|
+
"@opentelemetry/instrumentation-fetch": "^0.215.0",
|
|
36
|
+
"@opentelemetry/instrumentation-user-interaction": "^0.58.0",
|
|
37
|
+
"@opentelemetry/instrumentation-xml-http-request": "^0.215.0",
|
|
38
|
+
"@opentelemetry/otlp-exporter-base": "^0.215.0",
|
|
39
|
+
"@opentelemetry/resources": "^2.7.0",
|
|
40
|
+
"@opentelemetry/sdk-logs": "^0.215.0",
|
|
41
|
+
"@opentelemetry/sdk-metrics": "^2.7.0",
|
|
42
|
+
"@opentelemetry/sdk-trace-base": "^2.7.0",
|
|
43
43
|
"log4js": "^6.9.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/chai": "^
|
|
46
|
+
"@types/chai": "^5.2.3",
|
|
47
47
|
"@types/mocha": "^10.0.10",
|
|
48
|
-
"@types/node": "^
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
50
|
-
"@typescript-eslint/parser": "^
|
|
51
|
-
"chai": "^
|
|
52
|
-
"eslint": "^
|
|
53
|
-
"mocha": "^
|
|
54
|
-
"rimraf": "^
|
|
55
|
-
"typescript": "^
|
|
48
|
+
"@types/node": "^25.6.0",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
|
50
|
+
"@typescript-eslint/parser": "^8.58.2",
|
|
51
|
+
"chai": "^6.2.2",
|
|
52
|
+
"eslint": "^10.2.0",
|
|
53
|
+
"mocha": "^11.7.5",
|
|
54
|
+
"rimraf": "^6.1.3",
|
|
55
|
+
"typescript": "^6.0.3"
|
|
56
56
|
}
|
|
57
57
|
}
|