@interopio/otel 0.0.222 → 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 -140
- 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/container.js
CHANGED
|
@@ -1,160 +1,160 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Container = void 0;
|
|
13
|
-
const safe_stringify_1 = require("./utils/safe-stringify");
|
|
14
|
-
class Container {
|
|
15
|
-
static get instance() {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
return (_a = Container._instance) !== null && _a !== void 0 ? _a : (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.instance;
|
|
18
|
-
}
|
|
19
|
-
static get settings() {
|
|
20
|
-
var _a;
|
|
21
|
-
return (_a = Container._settings) !== null && _a !== void 0 ? _a : Container.instance.settings;
|
|
22
|
-
}
|
|
23
|
-
static set settings(value) {
|
|
24
|
-
Container._settings = value;
|
|
25
|
-
}
|
|
26
|
-
static errorless(callback, defaultValue) {
|
|
27
|
-
try {
|
|
28
|
-
if (typeof callback !== "function") {
|
|
29
|
-
return callback;
|
|
30
|
-
}
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
32
|
-
const toReturn = callback();
|
|
33
|
-
return toReturn;
|
|
34
|
-
}
|
|
35
|
-
catch (err) {
|
|
36
|
-
return Container.handleErrorlessMode(err, defaultValue);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
static errorlessDefined(callback, defaultValue) {
|
|
40
|
-
try {
|
|
41
|
-
if (typeof callback !== "function") {
|
|
42
|
-
return callback;
|
|
43
|
-
}
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
45
|
-
const toReturn = callback();
|
|
46
|
-
return toReturn;
|
|
47
|
-
}
|
|
48
|
-
catch (err) {
|
|
49
|
-
return Container.handleErrorlessMode(err, defaultValue);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
static errorlessAsync(callback, defaultValue) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
try {
|
|
55
|
-
if (typeof callback !== "function") {
|
|
56
|
-
return callback;
|
|
57
|
-
}
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
59
|
-
const toReturn = (yield callback)();
|
|
60
|
-
return toReturn;
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
return Container.handleErrorlessMode(err, defaultValue);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
-
static handleErrorlessMode(err, defaultValue) {
|
|
69
|
-
var _a, _b, _c, _d, _e;
|
|
70
|
-
let message = undefined;
|
|
71
|
-
try {
|
|
72
|
-
if (err === null || err === void 0 ? void 0 : err.message) {
|
|
73
|
-
message = (err === null || err === void 0 ? void 0 : err.message) + " " + ((_a = err === null || err === void 0 ? void 0 : err.stack) !== null && _a !== void 0 ? _a : new Error().stack);
|
|
74
|
-
}
|
|
75
|
-
if (!message) {
|
|
76
|
-
try {
|
|
77
|
-
message = (0, safe_stringify_1.safeStringify)(err) + " " + new Error().stack;
|
|
78
|
-
}
|
|
79
|
-
catch ( /*silent catch*/_f) { /*silent catch*/ }
|
|
80
|
-
}
|
|
81
|
-
if (!message) {
|
|
82
|
-
try {
|
|
83
|
-
message = (err === null || err === void 0 ? void 0 : err.toString()) + " " + new Error().stack;
|
|
84
|
-
}
|
|
85
|
-
catch ( /*silent catch*/_g) { /*silent catch*/ }
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch ( /*silent catch*/_h) { /*silent catch*/ }
|
|
89
|
-
if (!message) {
|
|
90
|
-
message = "unknown " + new Error().stack;
|
|
91
|
-
}
|
|
92
|
-
try {
|
|
93
|
-
if (!((_c = (_b = Container.instance) === null || _b === void 0 ? void 0 : _b.settings) === null || _c === void 0 ? void 0 : _c.errorlessMode)) {
|
|
94
|
-
(_d = Container.instance.logger) === null || _d === void 0 ? void 0 : _d.error("Observed error " + message);
|
|
95
|
-
throw err;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch (_j) {
|
|
99
|
-
throw err;
|
|
100
|
-
}
|
|
101
|
-
try {
|
|
102
|
-
(_e = Container.instance.logger) === null || _e === void 0 ? void 0 : _e.warn("Caught error " + message);
|
|
103
|
-
return defaultValue;
|
|
104
|
-
}
|
|
105
|
-
catch (_k) {
|
|
106
|
-
return defaultValue;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
constructor(_settings, _traces, metrics, logs, logger) {
|
|
110
|
-
var _a;
|
|
111
|
-
this._settings = _settings;
|
|
112
|
-
this._traces = _traces;
|
|
113
|
-
this.metrics = metrics;
|
|
114
|
-
this.logs = logs;
|
|
115
|
-
this.logger = logger;
|
|
116
|
-
this.started = false;
|
|
117
|
-
Container._instance = this;
|
|
118
|
-
globalThis.ioInsightsInternals = (_a = globalThis.ioInsightsInternals) !== null && _a !== void 0 ? _a : {};
|
|
119
|
-
globalThis.ioInsightsInternals.instance = this;
|
|
120
|
-
}
|
|
121
|
-
get traces() {
|
|
122
|
-
var _a, _b;
|
|
123
|
-
if ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _a === void 0 ? void 0 : _a.traces) {
|
|
124
|
-
return (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.traces;
|
|
125
|
-
}
|
|
126
|
-
return this._traces;
|
|
127
|
-
}
|
|
128
|
-
waitForFinalExport(timeoutMs) {
|
|
129
|
-
var _a, _b, _c;
|
|
130
|
-
return Promise.allSettled([
|
|
131
|
-
(_a = this.traces) === null || _a === void 0 ? void 0 : _a.waitForFinalExport(timeoutMs),
|
|
132
|
-
(_b = this.metrics) === null || _b === void 0 ? void 0 : _b.waitForFinalExport(timeoutMs),
|
|
133
|
-
(_c = this.logs) === null || _c === void 0 ? void 0 : _c.waitForFinalExport(timeoutMs)
|
|
134
|
-
]);
|
|
135
|
-
}
|
|
136
|
-
get settings() {
|
|
137
|
-
return this._settings;
|
|
138
|
-
}
|
|
139
|
-
start() {
|
|
140
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
// vnikolov TODO: maybe log this? don't silently refuse to start
|
|
142
|
-
const metricsPromise = this.metrics.settings.enabled ? this.metrics.start() : Promise.resolve();
|
|
143
|
-
const tracesPromise = this.traces.settings.enabled ? this.traces.start() : Promise.resolve();
|
|
144
|
-
const logsPromise = this.logs.settings.enabled ? this.logs.start() : Promise.resolve();
|
|
145
|
-
yield Promise.all([metricsPromise, tracesPromise, logsPromise]);
|
|
146
|
-
this.started = true;
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
stop() {
|
|
150
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
const metricsPromise = this.metrics.started ? this.metrics.stop() : Promise.resolve();
|
|
152
|
-
const tracesPromise = this.traces.started ? this.traces.stop() : Promise.resolve();
|
|
153
|
-
const logsPromise = this.logs.started ? this.logs.stop() : Promise.resolve();
|
|
154
|
-
yield Promise.all([metricsPromise, tracesPromise, logsPromise]);
|
|
155
|
-
this.started = false;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
exports.Container = Container;
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Container = void 0;
|
|
13
|
+
const safe_stringify_1 = require("./utils/safe-stringify");
|
|
14
|
+
class Container {
|
|
15
|
+
static get instance() {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (_a = Container._instance) !== null && _a !== void 0 ? _a : (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.instance;
|
|
18
|
+
}
|
|
19
|
+
static get settings() {
|
|
20
|
+
var _a;
|
|
21
|
+
return (_a = Container._settings) !== null && _a !== void 0 ? _a : Container.instance.settings;
|
|
22
|
+
}
|
|
23
|
+
static set settings(value) {
|
|
24
|
+
Container._settings = value;
|
|
25
|
+
}
|
|
26
|
+
static errorless(callback, defaultValue) {
|
|
27
|
+
try {
|
|
28
|
+
if (typeof callback !== "function") {
|
|
29
|
+
return callback;
|
|
30
|
+
}
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
32
|
+
const toReturn = callback();
|
|
33
|
+
return toReturn;
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
return Container.handleErrorlessMode(err, defaultValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
static errorlessDefined(callback, defaultValue) {
|
|
40
|
+
try {
|
|
41
|
+
if (typeof callback !== "function") {
|
|
42
|
+
return callback;
|
|
43
|
+
}
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
45
|
+
const toReturn = callback();
|
|
46
|
+
return toReturn;
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
return Container.handleErrorlessMode(err, defaultValue);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static errorlessAsync(callback, defaultValue) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
try {
|
|
55
|
+
if (typeof callback !== "function") {
|
|
56
|
+
return callback;
|
|
57
|
+
}
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
59
|
+
const toReturn = (yield callback)();
|
|
60
|
+
return toReturn;
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
return Container.handleErrorlessMode(err, defaultValue);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
+
static handleErrorlessMode(err, defaultValue) {
|
|
69
|
+
var _a, _b, _c, _d, _e;
|
|
70
|
+
let message = undefined;
|
|
71
|
+
try {
|
|
72
|
+
if (err === null || err === void 0 ? void 0 : err.message) {
|
|
73
|
+
message = (err === null || err === void 0 ? void 0 : err.message) + " " + ((_a = err === null || err === void 0 ? void 0 : err.stack) !== null && _a !== void 0 ? _a : new Error().stack);
|
|
74
|
+
}
|
|
75
|
+
if (!message) {
|
|
76
|
+
try {
|
|
77
|
+
message = (0, safe_stringify_1.safeStringify)(err) + " " + new Error().stack;
|
|
78
|
+
}
|
|
79
|
+
catch ( /*silent catch*/_f) { /*silent catch*/ }
|
|
80
|
+
}
|
|
81
|
+
if (!message) {
|
|
82
|
+
try {
|
|
83
|
+
message = (err === null || err === void 0 ? void 0 : err.toString()) + " " + new Error().stack;
|
|
84
|
+
}
|
|
85
|
+
catch ( /*silent catch*/_g) { /*silent catch*/ }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch ( /*silent catch*/_h) { /*silent catch*/ }
|
|
89
|
+
if (!message) {
|
|
90
|
+
message = "unknown " + new Error().stack;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
if (!((_c = (_b = Container.instance) === null || _b === void 0 ? void 0 : _b.settings) === null || _c === void 0 ? void 0 : _c.errorlessMode)) {
|
|
94
|
+
(_d = Container.instance.logger) === null || _d === void 0 ? void 0 : _d.error("Observed error " + message);
|
|
95
|
+
throw err;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (_j) {
|
|
99
|
+
throw err;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
(_e = Container.instance.logger) === null || _e === void 0 ? void 0 : _e.warn("Caught error " + message);
|
|
103
|
+
return defaultValue;
|
|
104
|
+
}
|
|
105
|
+
catch (_k) {
|
|
106
|
+
return defaultValue;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
constructor(_settings, _traces, metrics, logs, logger) {
|
|
110
|
+
var _a;
|
|
111
|
+
this._settings = _settings;
|
|
112
|
+
this._traces = _traces;
|
|
113
|
+
this.metrics = metrics;
|
|
114
|
+
this.logs = logs;
|
|
115
|
+
this.logger = logger;
|
|
116
|
+
this.started = false;
|
|
117
|
+
Container._instance = this;
|
|
118
|
+
globalThis.ioInsightsInternals = (_a = globalThis.ioInsightsInternals) !== null && _a !== void 0 ? _a : {};
|
|
119
|
+
globalThis.ioInsightsInternals.instance = this;
|
|
120
|
+
}
|
|
121
|
+
get traces() {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
if ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _a === void 0 ? void 0 : _a.traces) {
|
|
124
|
+
return (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ioInsightsInternals) === null || _b === void 0 ? void 0 : _b.traces;
|
|
125
|
+
}
|
|
126
|
+
return this._traces;
|
|
127
|
+
}
|
|
128
|
+
waitForFinalExport(timeoutMs) {
|
|
129
|
+
var _a, _b, _c;
|
|
130
|
+
return Promise.allSettled([
|
|
131
|
+
(_a = this.traces) === null || _a === void 0 ? void 0 : _a.waitForFinalExport(timeoutMs),
|
|
132
|
+
(_b = this.metrics) === null || _b === void 0 ? void 0 : _b.waitForFinalExport(timeoutMs),
|
|
133
|
+
(_c = this.logs) === null || _c === void 0 ? void 0 : _c.waitForFinalExport(timeoutMs)
|
|
134
|
+
]);
|
|
135
|
+
}
|
|
136
|
+
get settings() {
|
|
137
|
+
return this._settings;
|
|
138
|
+
}
|
|
139
|
+
start() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
// vnikolov TODO: maybe log this? don't silently refuse to start
|
|
142
|
+
const metricsPromise = this.metrics.settings.enabled ? this.metrics.start() : Promise.resolve();
|
|
143
|
+
const tracesPromise = this.traces.settings.enabled ? this.traces.start() : Promise.resolve();
|
|
144
|
+
const logsPromise = this.logs.settings.enabled ? this.logs.start() : Promise.resolve();
|
|
145
|
+
yield Promise.all([metricsPromise, tracesPromise, logsPromise]);
|
|
146
|
+
this.started = true;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
stop() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const metricsPromise = this.metrics.started ? this.metrics.stop() : Promise.resolve();
|
|
152
|
+
const tracesPromise = this.traces.started ? this.traces.stop() : Promise.resolve();
|
|
153
|
+
const logsPromise = this.logs.started ? this.logs.stop() : Promise.resolve();
|
|
154
|
+
yield Promise.all([metricsPromise, tracesPromise, logsPromise]);
|
|
155
|
+
this.started = false;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.Container = Container;
|
|
160
160
|
//# sourceMappingURL=container.js.map
|
package/dist/container.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2DAAuD;AAIvD,MAAa,SAAS;IAMX,MAAM,KAAK,QAAQ;;QACtB,OAAO,MAAA,SAAS,CAAC,SAAS,mCAAI,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,mBAAmB,0CAAE,QAAQ,CAAC;IAC5E,CAAC;IAEM,MAAM,KAAK,QAAQ;;QACtB,OAAO,MAAA,SAAS,CAAC,SAAS,mCAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC9D,CAAC;IAEM,MAAM,KAAK,QAAQ,CAAC,KAA0B;QACjD,SAAS,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,CAAC;IAEM,MAAM,CAAC,SAAS,CACnB,QAAuB,EACvB,YAA4B;QAC5B,IAAI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E,WAAW,CAAC,CAAC,CAAC;YAEhE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;KAAA;IAEY,IAAI;;YACb,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACtF,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACnF,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YAE7E,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;YAEhE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,CAAC;KAAA;CACJ;AAzJD,8BAyJC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { IOInsights } from "../insights";
|
|
2
|
-
export type API = IOInsights.API;
|
|
3
|
-
export interface ioInsightsBasePlugin {
|
|
4
|
-
resourceFromAttributes: (attributes: DetectedResourceAttributes) => Resource;
|
|
5
|
-
diag: DiagAPI;
|
|
6
|
-
}
|
|
7
|
-
export type Manager<TSettings> = IOInsights.Manager<TSettings>;
|
|
8
|
-
export type Settings = IOInsights.Settings;
|
|
9
|
-
export type Logger = IOInsights.Logger;
|
|
10
|
-
export { Builder } from "./builder";
|
|
11
|
-
export { Log4jsWrapper } from "./logger/log4jsWrapper";
|
|
12
|
-
export { Container } from "./container";
|
|
13
|
-
export declare const enum LoggerLogLevel {
|
|
14
|
-
NONE = 0,
|
|
15
|
-
ERROR = 30,
|
|
16
|
-
WARN = 50,
|
|
17
|
-
INFO = 60,
|
|
18
|
-
DEBUG = 70,
|
|
19
|
-
VERBOSE = 80,
|
|
20
|
-
ALL = 9999
|
|
21
|
-
}
|
|
22
|
-
export type ioInsightsMetricsPlugin = {
|
|
23
|
-
newMetricsManager(settings: IOInsights.Settings, dependencyContainer: IOInsights.MetricsDependencyContainer, metrProviderCreateFunc: IOInsights.MetricsMeterProviderCreateFunc, logger: IOInsights.Logger): IOInsights.MetricsManager;
|
|
24
|
-
};
|
|
25
|
-
export type MetricsManager = IOInsights.MetricsManager;
|
|
26
|
-
export type MetricsManagerBuilder = IOInsights.MetricsManagerBuilder;
|
|
27
|
-
export type MetricsSettings = IOInsights.MetricsSettings;
|
|
28
|
-
export type MetricsMeterProvider = IOInsights.MetricsMeterProvider;
|
|
29
|
-
export type MetricSettings = IOInsights.MetricSettings;
|
|
30
|
-
export type MetricType = IOInsights.MetricType;
|
|
31
|
-
export type Metric = IOInsights.Metric;
|
|
32
|
-
export { NullMetric } from "./metrics/null";
|
|
33
|
-
export { MetricsDependencyBuilder } from "./metrics/metricsDependencyBuilder";
|
|
34
|
-
export type MetricsDependencyContainer = IOInsights.MetricsDependencyContainer;
|
|
35
|
-
export type InstanceActionHandler = IOInsights.InstanceActionHandler;
|
|
36
|
-
export type InstanceActionHandlerArgs = IOInsights.InstanceActionHandlerArgs;
|
|
37
|
-
export type InstanceCrashHandler = IOInsights.InstanceCrashHandler;
|
|
38
|
-
export type InstanceCrashHandlerArgs = IOInsights.InstanceCrashHandlerArgs;
|
|
39
|
-
export type InstanceErrorHandler = IOInsights.InstanceErrorHandler;
|
|
40
|
-
export type InstanceErrorHandlerArgs = IOInsights.InstanceErrorHandlerArgs;
|
|
41
|
-
export type InstanceFocusedHandler = IOInsights.InstanceFocusedHandler;
|
|
42
|
-
export type InstanceFocusedHandlerArgs = IOInsights.InstanceFocusedHandlerArgs;
|
|
43
|
-
export type InstanceReadyHandler = IOInsights.InstanceReadyHandler;
|
|
44
|
-
export type InstanceReadyHandlerArgs = IOInsights.InstanceReadyHandlerArgs;
|
|
45
|
-
export type LayoutRestoredHandler = IOInsights.LayoutRestoredHandler;
|
|
46
|
-
export type LayoutRestoredHandlerArgs = IOInsights.LayoutRestoredHandlerArgs;
|
|
47
|
-
export type PlatformStartedHandler = IOInsights.PlatformStartedHandler;
|
|
48
|
-
export type PlatformStartedHandlerArgs = IOInsights.PlatformStartedHandlerArgs;
|
|
49
|
-
export type PlatformErrorHandler = IOInsights.PlatformErrorHandler;
|
|
50
|
-
export type PlatformErrorHandlerArgs = IOInsights.PlatformErrorHandlerArgs;
|
|
51
|
-
export type Unsubscribe = IOInsights.Unsubscribe;
|
|
52
|
-
export type WorkspaceActionHandlerArgs = IOInsights.WorkspaceActionHandlerArgs;
|
|
53
|
-
export type WorkspaceActionHandler = IOInsights.WorkspaceActionHandler;
|
|
54
|
-
export type WorkspaceLoadedHandlerArgs = IOInsights.WorkspaceLoadedHandlerArgs;
|
|
55
|
-
export type WorkspaceSavedHandler = IOInsights.WorkspaceSavedHandler;
|
|
56
|
-
export type WorkspaceSavedHandlerArgs = IOInsights.WorkspaceSavedHandlerArgs;
|
|
57
|
-
export type WorkspaceStartupHandlerArgs = IOInsights.WorkspaceStartupHandlerArgs;
|
|
58
|
-
export type WorkspaceAppsStartedHandlerArgs = IOInsights.WorkspaceAppsStartedHandlerArgs;
|
|
59
|
-
export type PerformanceProvider = IOInsights.PerformanceProvider;
|
|
60
|
-
export type AppCPU = IOInsights.AppCPU;
|
|
61
|
-
export type AppMemory = IOInsights.AppMemory;
|
|
62
|
-
export type SystemCPU = IOInsights.SystemCPU;
|
|
63
|
-
export type SystemMemory = IOInsights.SystemMemory;
|
|
64
|
-
export type WorkspaceTimedActionHandlerArgs = IOInsights.WorkspaceTimedActionHandlerArgs;
|
|
65
|
-
export type WorkspaceLoadedHandler = IOInsights.WorkspaceLoadedHandler;
|
|
66
|
-
export type WorkspaceRestoredHandler = IOInsights.WorkspaceRestoredHandler;
|
|
67
|
-
export type WorkspaceRestoredHandlerArgs = IOInsights.WorkspaceRestoredHandlerArgs;
|
|
68
|
-
export type WorkspaceGenericActionHandler<T extends WorkspaceActionHandlerArgs> = IOInsights.WorkspaceGenericActionHandler<T>;
|
|
69
|
-
export type ioInsightsTracesPlugin = {
|
|
70
|
-
newTracesManager(logger: IOInsights.Logger, otelSettings: IOInsights.Settings, traceLogger: IOInsights.Logger, metrics?: IOInsights.MetricsManager, store?: (source: string, pi: PropagationInfo) => Promise<void>, read?: (source: string) => Promise<PropagationInfo | null>): IOInsights.TracesManager;
|
|
71
|
-
};
|
|
72
|
-
export type ClickstreamTraceConfig = IOInsights.ClickstreamTraceConfig;
|
|
73
|
-
export type UserJourneyTraceConfig = IOInsights.UserJourneyTraceConfig;
|
|
74
|
-
export type MarkerSpanCallback = IOInsights.MarkerSpanCallback;
|
|
75
|
-
export type TracesManagerBuilder = IOInsights.TracesManagerBuilder;
|
|
76
|
-
export type PropagationInfo = IOInsights.PropagationInfo;
|
|
77
|
-
export type PropagationInfoCarrier = IOInsights.PropagationInfoCarrier;
|
|
78
|
-
export type TracesManager = IOInsights.TracesManager;
|
|
79
|
-
export type TracesSettings = IOInsights.TracesSettings;
|
|
80
|
-
export type SamplingSettings = IOInsights.SamplingSettings;
|
|
81
|
-
export type SpanCreationOptions = IOInsights.SpanCreationOptions;
|
|
82
|
-
export type TracingState = IOInsights.TracingState;
|
|
83
|
-
export type WithSpanCallback<T> = IOInsights.WithSpanCallback<T>;
|
|
84
|
-
export type WithSpanOptions = IOInsights.WithSpanOptions;
|
|
85
|
-
export type WithSpanDecoratorOptions = IOInsights.WithSpanDecoratorOptions;
|
|
86
|
-
export type ioInsightsAutoInstrumentationsPlugin = {
|
|
87
|
-
registerInstrumentations: (options: AutoLoaderOptions) => void;
|
|
88
|
-
newDocumentLoadInstrumentation: (config?: DocumentLoadInstrumentationConfig) => DocumentLoadInstrumentation;
|
|
89
|
-
newUserInteractionInstrumentation: (config?: UserInteractionInstrumentationConfig) => UserInteractionInstrumentation;
|
|
90
|
-
newFetchInstrumentation: (config?: FetchInstrumentationConfig) => FetchInstrumentation;
|
|
91
|
-
newXMLHttpRequestInstrumentation: (config?: XMLHttpRequestInstrumentationConfig) => XMLHttpRequestInstrumentation;
|
|
92
|
-
};
|
|
93
|
-
import Traces, { withSpan } from "./traces/traces";
|
|
94
|
-
export { Traces, withSpan };
|
|
95
|
-
export declare const OTEL_PI_KEY = "__interopIOTracePropagationInfo";
|
|
96
|
-
import NullTracingState from "./traces/nullTracingState";
|
|
97
|
-
export { NullTracingState };
|
|
98
|
-
export type ioInsightsLogsPlugin = {
|
|
99
|
-
newLogsManager: (logger: IOInsights.Logger, settings: IOInsights.LogsSettings, otelSettings: IOInsights.Settings) => IOInsights.LogsManager;
|
|
100
|
-
};
|
|
101
|
-
export type LogsManager = IOInsights.LogsManager;
|
|
102
|
-
export type LogsSettings = IOInsights.LogsSettings;
|
|
103
|
-
export { Logs } from "./logs/logs";
|
|
104
|
-
export { type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
105
|
-
export { type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
106
|
-
export type UserInteractionInstrumentationConfig = IOInsights.UserInteractionInstrumentationConfig;
|
|
107
|
-
export { type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
108
|
-
import { type DocumentLoadInstrumentation, type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
109
|
-
import { type UserInteractionInstrumentation } from "@opentelemetry/instrumentation-user-interaction";
|
|
110
|
-
import { type FetchInstrumentation, type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
111
|
-
import { type XMLHttpRequestInstrumentation, type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
112
|
-
import { type AutoLoaderOptions } from "@opentelemetry/instrumentation";
|
|
113
|
-
import { DiagAPI } from "@opentelemetry/api";
|
|
114
|
-
import { type DetectedResourceAttributes, type Resource } from "@opentelemetry/resources";
|
|
115
|
-
import { type InMemoryMetricExporter } from "@opentelemetry/sdk-metrics";
|
|
116
|
-
import { type InMemorySpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
117
|
-
import { type InMemoryLogRecordExporter } from "@opentelemetry/sdk-logs";
|
|
118
|
-
export { type InMemoryLogRecordExporter, type InMemoryMetricExporter, type InMemorySpanExporter };
|
|
119
|
-
import { registerInsightsPlugin, loadInsightsPlugin } from "./pluginLoader";
|
|
120
|
-
import { isNode } from "./utils/isNode";
|
|
121
|
-
import { safeStringify } from "./utils/safe-stringify";
|
|
122
|
-
import { getOTELData, flattenOtelAtributes, extractFilteringContextFromArgs, deep_value } from "./utils/otelUtils";
|
|
123
|
-
export { registerInsightsPlugin, loadInsightsPlugin };
|
|
124
|
-
export { isNode, safeStringify, flattenOtelAtributes, getOTELData, extractFilteringContextFromArgs, deep_value };
|
|
125
|
-
declare enum SpanStatusCode {
|
|
126
|
-
/**
|
|
127
|
-
* The default status.
|
|
128
|
-
*/
|
|
129
|
-
UNSET = 0,
|
|
130
|
-
/**
|
|
131
|
-
* The operation has been validated by an Application developer or
|
|
132
|
-
* Operator to have completed successfully.
|
|
133
|
-
*/
|
|
134
|
-
OK = 1,
|
|
135
|
-
/**
|
|
136
|
-
* The operation contains an error.
|
|
137
|
-
*/
|
|
138
|
-
ERROR = 2
|
|
139
|
-
}
|
|
140
|
-
export { SpanStatusCode };
|
|
1
|
+
import { IOInsights } from "../insights";
|
|
2
|
+
export type API = IOInsights.API;
|
|
3
|
+
export interface ioInsightsBasePlugin {
|
|
4
|
+
resourceFromAttributes: (attributes: DetectedResourceAttributes) => Resource;
|
|
5
|
+
diag: DiagAPI;
|
|
6
|
+
}
|
|
7
|
+
export type Manager<TSettings> = IOInsights.Manager<TSettings>;
|
|
8
|
+
export type Settings = IOInsights.Settings;
|
|
9
|
+
export type Logger = IOInsights.Logger;
|
|
10
|
+
export { Builder } from "./builder";
|
|
11
|
+
export { Log4jsWrapper } from "./logger/log4jsWrapper";
|
|
12
|
+
export { Container } from "./container";
|
|
13
|
+
export declare const enum LoggerLogLevel {
|
|
14
|
+
NONE = 0,
|
|
15
|
+
ERROR = 30,
|
|
16
|
+
WARN = 50,
|
|
17
|
+
INFO = 60,
|
|
18
|
+
DEBUG = 70,
|
|
19
|
+
VERBOSE = 80,
|
|
20
|
+
ALL = 9999
|
|
21
|
+
}
|
|
22
|
+
export type ioInsightsMetricsPlugin = {
|
|
23
|
+
newMetricsManager(settings: IOInsights.Settings, dependencyContainer: IOInsights.MetricsDependencyContainer, metrProviderCreateFunc: IOInsights.MetricsMeterProviderCreateFunc, logger: IOInsights.Logger): IOInsights.MetricsManager;
|
|
24
|
+
};
|
|
25
|
+
export type MetricsManager = IOInsights.MetricsManager;
|
|
26
|
+
export type MetricsManagerBuilder = IOInsights.MetricsManagerBuilder;
|
|
27
|
+
export type MetricsSettings = IOInsights.MetricsSettings;
|
|
28
|
+
export type MetricsMeterProvider = IOInsights.MetricsMeterProvider;
|
|
29
|
+
export type MetricSettings = IOInsights.MetricSettings;
|
|
30
|
+
export type MetricType = IOInsights.MetricType;
|
|
31
|
+
export type Metric = IOInsights.Metric;
|
|
32
|
+
export { NullMetric } from "./metrics/null";
|
|
33
|
+
export { MetricsDependencyBuilder } from "./metrics/metricsDependencyBuilder";
|
|
34
|
+
export type MetricsDependencyContainer = IOInsights.MetricsDependencyContainer;
|
|
35
|
+
export type InstanceActionHandler = IOInsights.InstanceActionHandler;
|
|
36
|
+
export type InstanceActionHandlerArgs = IOInsights.InstanceActionHandlerArgs;
|
|
37
|
+
export type InstanceCrashHandler = IOInsights.InstanceCrashHandler;
|
|
38
|
+
export type InstanceCrashHandlerArgs = IOInsights.InstanceCrashHandlerArgs;
|
|
39
|
+
export type InstanceErrorHandler = IOInsights.InstanceErrorHandler;
|
|
40
|
+
export type InstanceErrorHandlerArgs = IOInsights.InstanceErrorHandlerArgs;
|
|
41
|
+
export type InstanceFocusedHandler = IOInsights.InstanceFocusedHandler;
|
|
42
|
+
export type InstanceFocusedHandlerArgs = IOInsights.InstanceFocusedHandlerArgs;
|
|
43
|
+
export type InstanceReadyHandler = IOInsights.InstanceReadyHandler;
|
|
44
|
+
export type InstanceReadyHandlerArgs = IOInsights.InstanceReadyHandlerArgs;
|
|
45
|
+
export type LayoutRestoredHandler = IOInsights.LayoutRestoredHandler;
|
|
46
|
+
export type LayoutRestoredHandlerArgs = IOInsights.LayoutRestoredHandlerArgs;
|
|
47
|
+
export type PlatformStartedHandler = IOInsights.PlatformStartedHandler;
|
|
48
|
+
export type PlatformStartedHandlerArgs = IOInsights.PlatformStartedHandlerArgs;
|
|
49
|
+
export type PlatformErrorHandler = IOInsights.PlatformErrorHandler;
|
|
50
|
+
export type PlatformErrorHandlerArgs = IOInsights.PlatformErrorHandlerArgs;
|
|
51
|
+
export type Unsubscribe = IOInsights.Unsubscribe;
|
|
52
|
+
export type WorkspaceActionHandlerArgs = IOInsights.WorkspaceActionHandlerArgs;
|
|
53
|
+
export type WorkspaceActionHandler = IOInsights.WorkspaceActionHandler;
|
|
54
|
+
export type WorkspaceLoadedHandlerArgs = IOInsights.WorkspaceLoadedHandlerArgs;
|
|
55
|
+
export type WorkspaceSavedHandler = IOInsights.WorkspaceSavedHandler;
|
|
56
|
+
export type WorkspaceSavedHandlerArgs = IOInsights.WorkspaceSavedHandlerArgs;
|
|
57
|
+
export type WorkspaceStartupHandlerArgs = IOInsights.WorkspaceStartupHandlerArgs;
|
|
58
|
+
export type WorkspaceAppsStartedHandlerArgs = IOInsights.WorkspaceAppsStartedHandlerArgs;
|
|
59
|
+
export type PerformanceProvider = IOInsights.PerformanceProvider;
|
|
60
|
+
export type AppCPU = IOInsights.AppCPU;
|
|
61
|
+
export type AppMemory = IOInsights.AppMemory;
|
|
62
|
+
export type SystemCPU = IOInsights.SystemCPU;
|
|
63
|
+
export type SystemMemory = IOInsights.SystemMemory;
|
|
64
|
+
export type WorkspaceTimedActionHandlerArgs = IOInsights.WorkspaceTimedActionHandlerArgs;
|
|
65
|
+
export type WorkspaceLoadedHandler = IOInsights.WorkspaceLoadedHandler;
|
|
66
|
+
export type WorkspaceRestoredHandler = IOInsights.WorkspaceRestoredHandler;
|
|
67
|
+
export type WorkspaceRestoredHandlerArgs = IOInsights.WorkspaceRestoredHandlerArgs;
|
|
68
|
+
export type WorkspaceGenericActionHandler<T extends WorkspaceActionHandlerArgs> = IOInsights.WorkspaceGenericActionHandler<T>;
|
|
69
|
+
export type ioInsightsTracesPlugin = {
|
|
70
|
+
newTracesManager(logger: IOInsights.Logger, otelSettings: IOInsights.Settings, traceLogger: IOInsights.Logger, metrics?: IOInsights.MetricsManager, store?: (source: string, pi: PropagationInfo) => Promise<void>, read?: (source: string) => Promise<PropagationInfo | null>): IOInsights.TracesManager;
|
|
71
|
+
};
|
|
72
|
+
export type ClickstreamTraceConfig = IOInsights.ClickstreamTraceConfig;
|
|
73
|
+
export type UserJourneyTraceConfig = IOInsights.UserJourneyTraceConfig;
|
|
74
|
+
export type MarkerSpanCallback = IOInsights.MarkerSpanCallback;
|
|
75
|
+
export type TracesManagerBuilder = IOInsights.TracesManagerBuilder;
|
|
76
|
+
export type PropagationInfo = IOInsights.PropagationInfo;
|
|
77
|
+
export type PropagationInfoCarrier = IOInsights.PropagationInfoCarrier;
|
|
78
|
+
export type TracesManager = IOInsights.TracesManager;
|
|
79
|
+
export type TracesSettings = IOInsights.TracesSettings;
|
|
80
|
+
export type SamplingSettings = IOInsights.SamplingSettings;
|
|
81
|
+
export type SpanCreationOptions = IOInsights.SpanCreationOptions;
|
|
82
|
+
export type TracingState = IOInsights.TracingState;
|
|
83
|
+
export type WithSpanCallback<T> = IOInsights.WithSpanCallback<T>;
|
|
84
|
+
export type WithSpanOptions = IOInsights.WithSpanOptions;
|
|
85
|
+
export type WithSpanDecoratorOptions = IOInsights.WithSpanDecoratorOptions;
|
|
86
|
+
export type ioInsightsAutoInstrumentationsPlugin = {
|
|
87
|
+
registerInstrumentations: (options: AutoLoaderOptions) => void;
|
|
88
|
+
newDocumentLoadInstrumentation: (config?: DocumentLoadInstrumentationConfig) => DocumentLoadInstrumentation;
|
|
89
|
+
newUserInteractionInstrumentation: (config?: UserInteractionInstrumentationConfig) => UserInteractionInstrumentation;
|
|
90
|
+
newFetchInstrumentation: (config?: FetchInstrumentationConfig) => FetchInstrumentation;
|
|
91
|
+
newXMLHttpRequestInstrumentation: (config?: XMLHttpRequestInstrumentationConfig) => XMLHttpRequestInstrumentation;
|
|
92
|
+
};
|
|
93
|
+
import Traces, { withSpan } from "./traces/traces";
|
|
94
|
+
export { Traces, withSpan };
|
|
95
|
+
export declare const OTEL_PI_KEY = "__interopIOTracePropagationInfo";
|
|
96
|
+
import NullTracingState from "./traces/nullTracingState";
|
|
97
|
+
export { NullTracingState };
|
|
98
|
+
export type ioInsightsLogsPlugin = {
|
|
99
|
+
newLogsManager: (logger: IOInsights.Logger, settings: IOInsights.LogsSettings, otelSettings: IOInsights.Settings) => IOInsights.LogsManager;
|
|
100
|
+
};
|
|
101
|
+
export type LogsManager = IOInsights.LogsManager;
|
|
102
|
+
export type LogsSettings = IOInsights.LogsSettings;
|
|
103
|
+
export { Logs } from "./logs/logs";
|
|
104
|
+
export { type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
105
|
+
export { type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
106
|
+
export type UserInteractionInstrumentationConfig = IOInsights.UserInteractionInstrumentationConfig;
|
|
107
|
+
export { type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
108
|
+
import { type DocumentLoadInstrumentation, type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
109
|
+
import { type UserInteractionInstrumentation } from "@opentelemetry/instrumentation-user-interaction";
|
|
110
|
+
import { type FetchInstrumentation, type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
111
|
+
import { type XMLHttpRequestInstrumentation, type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
112
|
+
import { type AutoLoaderOptions } from "@opentelemetry/instrumentation";
|
|
113
|
+
import { DiagAPI } from "@opentelemetry/api";
|
|
114
|
+
import { type DetectedResourceAttributes, type Resource } from "@opentelemetry/resources";
|
|
115
|
+
import { type InMemoryMetricExporter } from "@opentelemetry/sdk-metrics";
|
|
116
|
+
import { type InMemorySpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
117
|
+
import { type InMemoryLogRecordExporter } from "@opentelemetry/sdk-logs";
|
|
118
|
+
export { type InMemoryLogRecordExporter, type InMemoryMetricExporter, type InMemorySpanExporter };
|
|
119
|
+
import { registerInsightsPlugin, loadInsightsPlugin } from "./pluginLoader";
|
|
120
|
+
import { isNode } from "./utils/isNode";
|
|
121
|
+
import { safeStringify } from "./utils/safe-stringify";
|
|
122
|
+
import { getOTELData, flattenOtelAtributes, extractFilteringContextFromArgs, deep_value } from "./utils/otelUtils";
|
|
123
|
+
export { registerInsightsPlugin, loadInsightsPlugin };
|
|
124
|
+
export { isNode, safeStringify, flattenOtelAtributes, getOTELData, extractFilteringContextFromArgs, deep_value };
|
|
125
|
+
declare enum SpanStatusCode {
|
|
126
|
+
/**
|
|
127
|
+
* The default status.
|
|
128
|
+
*/
|
|
129
|
+
UNSET = 0,
|
|
130
|
+
/**
|
|
131
|
+
* The operation has been validated by an Application developer or
|
|
132
|
+
* Operator to have completed successfully.
|
|
133
|
+
*/
|
|
134
|
+
OK = 1,
|
|
135
|
+
/**
|
|
136
|
+
* The operation contains an error.
|
|
137
|
+
*/
|
|
138
|
+
ERROR = 2
|
|
139
|
+
}
|
|
140
|
+
export { SpanStatusCode };
|