@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/index.d.ts
CHANGED
|
@@ -1,140 +1,141 @@
|
|
|
1
|
-
import { IOInsights } from "../insights";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export type
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
32
|
-
export
|
|
33
|
-
export {
|
|
34
|
-
export
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
37
|
-
export type
|
|
38
|
-
export type
|
|
39
|
-
export type
|
|
40
|
-
export type
|
|
41
|
-
export type
|
|
42
|
-
export type
|
|
43
|
-
export type
|
|
44
|
-
export type
|
|
45
|
-
export type
|
|
46
|
-
export type
|
|
47
|
-
export type
|
|
48
|
-
export type
|
|
49
|
-
export type
|
|
50
|
-
export type
|
|
51
|
-
export type
|
|
52
|
-
export type
|
|
53
|
-
export type
|
|
54
|
-
export type
|
|
55
|
-
export type
|
|
56
|
-
export type
|
|
57
|
-
export type
|
|
58
|
-
export type
|
|
59
|
-
export type
|
|
60
|
-
export type
|
|
61
|
-
export type
|
|
62
|
-
export type
|
|
63
|
-
export type
|
|
64
|
-
export type
|
|
65
|
-
export type
|
|
66
|
-
export type
|
|
67
|
-
export type
|
|
68
|
-
export type
|
|
69
|
-
export type
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export type
|
|
74
|
-
export type
|
|
75
|
-
export type
|
|
76
|
-
export type
|
|
77
|
-
export type
|
|
78
|
-
export type
|
|
79
|
-
export type
|
|
80
|
-
export type
|
|
81
|
-
export type
|
|
82
|
-
export type
|
|
83
|
-
export type
|
|
84
|
-
export type
|
|
85
|
-
export type
|
|
86
|
-
export type
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
export
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export type
|
|
103
|
-
export
|
|
104
|
-
export {
|
|
105
|
-
export { type
|
|
106
|
-
export type
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
import { type
|
|
110
|
-
import { type
|
|
111
|
-
import { type
|
|
112
|
-
import { type
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import { type
|
|
116
|
-
import { type
|
|
117
|
-
import { type
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
|
|
124
|
-
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
*
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
1
|
+
import { IOInsights } from "../insights";
|
|
2
|
+
export * from "../insights";
|
|
3
|
+
export type API = IOInsights.API;
|
|
4
|
+
export interface ioInsightsBasePlugin {
|
|
5
|
+
resourceFromAttributes: (attributes: DetectedResourceAttributes) => Resource;
|
|
6
|
+
diag: DiagAPI;
|
|
7
|
+
}
|
|
8
|
+
export type Manager<TSettings> = IOInsights.Manager<TSettings>;
|
|
9
|
+
export type Settings = IOInsights.Settings;
|
|
10
|
+
export type Logger = IOInsights.Logger;
|
|
11
|
+
export { Builder } from "./builder";
|
|
12
|
+
export { Log4jsWrapper } from "./logger/log4jsWrapper";
|
|
13
|
+
export { Container } from "./container";
|
|
14
|
+
export declare const enum LoggerLogLevel {
|
|
15
|
+
NONE = 0,
|
|
16
|
+
ERROR = 30,
|
|
17
|
+
WARN = 50,
|
|
18
|
+
INFO = 60,
|
|
19
|
+
DEBUG = 70,
|
|
20
|
+
VERBOSE = 80,
|
|
21
|
+
ALL = 9999
|
|
22
|
+
}
|
|
23
|
+
export type ioInsightsMetricsPlugin = {
|
|
24
|
+
newMetricsManager(settings: IOInsights.Settings, dependencyContainer: IOInsights.MetricsDependencyContainer, metrProviderCreateFunc: IOInsights.MetricsMeterProviderCreateFunc, logger: IOInsights.Logger): IOInsights.MetricsManager;
|
|
25
|
+
};
|
|
26
|
+
export type MetricsManager = IOInsights.MetricsManager;
|
|
27
|
+
export type MetricsManagerBuilder = IOInsights.MetricsManagerBuilder;
|
|
28
|
+
export type MetricsSettings = IOInsights.MetricsSettings;
|
|
29
|
+
export type MetricsMeterProvider = IOInsights.MetricsMeterProvider;
|
|
30
|
+
export type MetricSettings = IOInsights.MetricSettings;
|
|
31
|
+
export type MetricType = IOInsights.MetricType;
|
|
32
|
+
export type Metric = IOInsights.Metric;
|
|
33
|
+
export { NullMetric } from "./metrics/null";
|
|
34
|
+
export { MetricsDependencyBuilder } from "./metrics/metricsDependencyBuilder";
|
|
35
|
+
export type MetricsDependencyContainer = IOInsights.MetricsDependencyContainer;
|
|
36
|
+
export type InstanceActionHandler = IOInsights.InstanceActionHandler;
|
|
37
|
+
export type InstanceActionHandlerArgs = IOInsights.InstanceActionHandlerArgs;
|
|
38
|
+
export type InstanceCrashHandler = IOInsights.InstanceCrashHandler;
|
|
39
|
+
export type InstanceCrashHandlerArgs = IOInsights.InstanceCrashHandlerArgs;
|
|
40
|
+
export type InstanceErrorHandler = IOInsights.InstanceErrorHandler;
|
|
41
|
+
export type InstanceErrorHandlerArgs = IOInsights.InstanceErrorHandlerArgs;
|
|
42
|
+
export type InstanceFocusedHandler = IOInsights.InstanceFocusedHandler;
|
|
43
|
+
export type InstanceFocusedHandlerArgs = IOInsights.InstanceFocusedHandlerArgs;
|
|
44
|
+
export type InstanceReadyHandler = IOInsights.InstanceReadyHandler;
|
|
45
|
+
export type InstanceReadyHandlerArgs = IOInsights.InstanceReadyHandlerArgs;
|
|
46
|
+
export type LayoutRestoredHandler = IOInsights.LayoutRestoredHandler;
|
|
47
|
+
export type LayoutRestoredHandlerArgs = IOInsights.LayoutRestoredHandlerArgs;
|
|
48
|
+
export type PlatformStartedHandler = IOInsights.PlatformStartedHandler;
|
|
49
|
+
export type PlatformStartedHandlerArgs = IOInsights.PlatformStartedHandlerArgs;
|
|
50
|
+
export type PlatformErrorHandler = IOInsights.PlatformErrorHandler;
|
|
51
|
+
export type PlatformErrorHandlerArgs = IOInsights.PlatformErrorHandlerArgs;
|
|
52
|
+
export type Unsubscribe = IOInsights.Unsubscribe;
|
|
53
|
+
export type WorkspaceActionHandlerArgs = IOInsights.WorkspaceActionHandlerArgs;
|
|
54
|
+
export type WorkspaceActionHandler = IOInsights.WorkspaceActionHandler;
|
|
55
|
+
export type WorkspaceLoadedHandlerArgs = IOInsights.WorkspaceLoadedHandlerArgs;
|
|
56
|
+
export type WorkspaceSavedHandler = IOInsights.WorkspaceSavedHandler;
|
|
57
|
+
export type WorkspaceSavedHandlerArgs = IOInsights.WorkspaceSavedHandlerArgs;
|
|
58
|
+
export type WorkspaceStartupHandlerArgs = IOInsights.WorkspaceStartupHandlerArgs;
|
|
59
|
+
export type WorkspaceAppsStartedHandlerArgs = IOInsights.WorkspaceAppsStartedHandlerArgs;
|
|
60
|
+
export type PerformanceProvider = IOInsights.PerformanceProvider;
|
|
61
|
+
export type AppCPU = IOInsights.AppCPU;
|
|
62
|
+
export type AppMemory = IOInsights.AppMemory;
|
|
63
|
+
export type SystemCPU = IOInsights.SystemCPU;
|
|
64
|
+
export type SystemMemory = IOInsights.SystemMemory;
|
|
65
|
+
export type WorkspaceTimedActionHandlerArgs = IOInsights.WorkspaceTimedActionHandlerArgs;
|
|
66
|
+
export type WorkspaceLoadedHandler = IOInsights.WorkspaceLoadedHandler;
|
|
67
|
+
export type WorkspaceRestoredHandler = IOInsights.WorkspaceRestoredHandler;
|
|
68
|
+
export type WorkspaceRestoredHandlerArgs = IOInsights.WorkspaceRestoredHandlerArgs;
|
|
69
|
+
export type WorkspaceGenericActionHandler<T extends WorkspaceActionHandlerArgs> = IOInsights.WorkspaceGenericActionHandler<T>;
|
|
70
|
+
export type ioInsightsTracesPlugin = {
|
|
71
|
+
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;
|
|
72
|
+
};
|
|
73
|
+
export type ClickstreamTraceConfig = IOInsights.ClickstreamTraceConfig;
|
|
74
|
+
export type UserJourneyTraceConfig = IOInsights.UserJourneyTraceConfig;
|
|
75
|
+
export type MarkerSpanCallback = IOInsights.MarkerSpanCallback;
|
|
76
|
+
export type TracesManagerBuilder = IOInsights.TracesManagerBuilder;
|
|
77
|
+
export type PropagationInfo = IOInsights.PropagationInfo;
|
|
78
|
+
export type PropagationInfoCarrier = IOInsights.PropagationInfoCarrier;
|
|
79
|
+
export type TracesManager = IOInsights.TracesManager;
|
|
80
|
+
export type TracesSettings = IOInsights.TracesSettings;
|
|
81
|
+
export type SamplingSettings = IOInsights.SamplingSettings;
|
|
82
|
+
export type SpanCreationOptions = IOInsights.SpanCreationOptions;
|
|
83
|
+
export type TracingState = IOInsights.TracingState;
|
|
84
|
+
export type WithSpanCallback<T> = IOInsights.WithSpanCallback<T>;
|
|
85
|
+
export type WithSpanOptions = IOInsights.WithSpanOptions;
|
|
86
|
+
export type WithSpanDecoratorOptions = IOInsights.WithSpanDecoratorOptions;
|
|
87
|
+
export type ioInsightsAutoInstrumentationsPlugin = {
|
|
88
|
+
registerInstrumentations: (options: AutoLoaderOptions) => void;
|
|
89
|
+
newDocumentLoadInstrumentation: (config?: DocumentLoadInstrumentationConfig) => DocumentLoadInstrumentation;
|
|
90
|
+
newUserInteractionInstrumentation: (config?: UserInteractionInstrumentationConfig) => UserInteractionInstrumentation;
|
|
91
|
+
newFetchInstrumentation: (config?: FetchInstrumentationConfig) => FetchInstrumentation;
|
|
92
|
+
newXMLHttpRequestInstrumentation: (config?: XMLHttpRequestInstrumentationConfig) => XMLHttpRequestInstrumentation;
|
|
93
|
+
};
|
|
94
|
+
import Traces, { withSpan } from "./traces/traces";
|
|
95
|
+
export { Traces, withSpan };
|
|
96
|
+
export declare const OTEL_PI_KEY = "__interopIOTracePropagationInfo";
|
|
97
|
+
import NullTracingState from "./traces/nullTracingState";
|
|
98
|
+
export { NullTracingState };
|
|
99
|
+
export type ioInsightsLogsPlugin = {
|
|
100
|
+
newLogsManager: (logger: IOInsights.Logger, settings: IOInsights.LogsSettings, otelSettings: IOInsights.Settings) => IOInsights.LogsManager;
|
|
101
|
+
};
|
|
102
|
+
export type LogsManager = IOInsights.LogsManager;
|
|
103
|
+
export type LogsSettings = IOInsights.LogsSettings;
|
|
104
|
+
export { Logs } from "./logs/logs";
|
|
105
|
+
export { type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
106
|
+
export { type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
107
|
+
export type UserInteractionInstrumentationConfig = IOInsights.UserInteractionInstrumentationConfig;
|
|
108
|
+
export { type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
109
|
+
import { type DocumentLoadInstrumentation, type DocumentLoadInstrumentationConfig } from "@opentelemetry/instrumentation-document-load";
|
|
110
|
+
import { type UserInteractionInstrumentation } from "@opentelemetry/instrumentation-user-interaction";
|
|
111
|
+
import { type FetchInstrumentation, type FetchInstrumentationConfig } from "@opentelemetry/instrumentation-fetch";
|
|
112
|
+
import { type XMLHttpRequestInstrumentation, type XMLHttpRequestInstrumentationConfig } from "@opentelemetry/instrumentation-xml-http-request";
|
|
113
|
+
import { type AutoLoaderOptions } from "@opentelemetry/instrumentation";
|
|
114
|
+
import { DiagAPI } from "@opentelemetry/api";
|
|
115
|
+
import { type DetectedResourceAttributes, type Resource } from "@opentelemetry/resources";
|
|
116
|
+
import { type InMemoryMetricExporter } from "@opentelemetry/sdk-metrics";
|
|
117
|
+
import { type InMemorySpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
118
|
+
import { type InMemoryLogRecordExporter } from "@opentelemetry/sdk-logs";
|
|
119
|
+
export { type InMemoryLogRecordExporter, type InMemoryMetricExporter, type InMemorySpanExporter };
|
|
120
|
+
import { registerInsightsPlugin, loadInsightsPlugin } from "./pluginLoader";
|
|
121
|
+
import { isNode } from "./utils/isNode";
|
|
122
|
+
import { safeStringify } from "./utils/safe-stringify";
|
|
123
|
+
import { getOTELData, flattenOtelAtributes, extractFilteringContextFromArgs, deep_value } from "./utils/otelUtils";
|
|
124
|
+
export { registerInsightsPlugin, loadInsightsPlugin };
|
|
125
|
+
export { isNode, safeStringify, flattenOtelAtributes, getOTELData, extractFilteringContextFromArgs, deep_value };
|
|
126
|
+
declare enum SpanStatusCode {
|
|
127
|
+
/**
|
|
128
|
+
* The default status.
|
|
129
|
+
*/
|
|
130
|
+
UNSET = 0,
|
|
131
|
+
/**
|
|
132
|
+
* The operation has been validated by an Application developer or
|
|
133
|
+
* Operator to have completed successfully.
|
|
134
|
+
*/
|
|
135
|
+
OK = 1,
|
|
136
|
+
/**
|
|
137
|
+
* The operation contains an error.
|
|
138
|
+
*/
|
|
139
|
+
ERROR = 2
|
|
140
|
+
}
|
|
141
|
+
export { SpanStatusCode };
|
package/dist/index.js
CHANGED
|
@@ -1,89 +1,102 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
exports.Traces =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
exports
|
|
47
|
-
var
|
|
48
|
-
Object.defineProperty(exports, "
|
|
49
|
-
|
|
50
|
-
Object.defineProperty(exports, "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
(function (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.SpanStatusCode = exports.deep_value = exports.extractFilteringContextFromArgs = exports.getOTELData = exports.flattenOtelAtributes = exports.safeStringify = exports.isNode = exports.loadInsightsPlugin = exports.registerInsightsPlugin = exports.Logs = exports.NullTracingState = exports.OTEL_PI_KEY = exports.withSpan = exports.Traces = exports.MetricsDependencyBuilder = exports.NullMetric = exports.Container = exports.Log4jsWrapper = exports.Builder = void 0;
|
|
43
|
+
__exportStar(require("../insights"), exports);
|
|
44
|
+
;
|
|
45
|
+
var builder_1 = require("./builder");
|
|
46
|
+
Object.defineProperty(exports, "Builder", { enumerable: true, get: function () { return builder_1.Builder; } });
|
|
47
|
+
var log4jsWrapper_1 = require("./logger/log4jsWrapper");
|
|
48
|
+
Object.defineProperty(exports, "Log4jsWrapper", { enumerable: true, get: function () { return log4jsWrapper_1.Log4jsWrapper; } });
|
|
49
|
+
var container_1 = require("./container");
|
|
50
|
+
Object.defineProperty(exports, "Container", { enumerable: true, get: function () { return container_1.Container; } });
|
|
51
|
+
var null_1 = require("./metrics/null");
|
|
52
|
+
Object.defineProperty(exports, "NullMetric", { enumerable: true, get: function () { return null_1.NullMetric; } });
|
|
53
|
+
var metricsDependencyBuilder_1 = require("./metrics/metricsDependencyBuilder");
|
|
54
|
+
Object.defineProperty(exports, "MetricsDependencyBuilder", { enumerable: true, get: function () { return metricsDependencyBuilder_1.MetricsDependencyBuilder; } });
|
|
55
|
+
const traces_1 = __importStar(require("./traces/traces"));
|
|
56
|
+
exports.Traces = traces_1.default;
|
|
57
|
+
Object.defineProperty(exports, "withSpan", { enumerable: true, get: function () { return traces_1.withSpan; } });
|
|
58
|
+
exports.OTEL_PI_KEY = "__interopIOTracePropagationInfo";
|
|
59
|
+
const nullTracingState_1 = __importDefault(require("./traces/nullTracingState"));
|
|
60
|
+
exports.NullTracingState = nullTracingState_1.default;
|
|
61
|
+
var logs_1 = require("./logs/logs");
|
|
62
|
+
Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return logs_1.Logs; } });
|
|
63
|
+
const pluginLoader_1 = require("./pluginLoader");
|
|
64
|
+
Object.defineProperty(exports, "registerInsightsPlugin", { enumerable: true, get: function () { return pluginLoader_1.registerInsightsPlugin; } });
|
|
65
|
+
Object.defineProperty(exports, "loadInsightsPlugin", { enumerable: true, get: function () { return pluginLoader_1.loadInsightsPlugin; } });
|
|
66
|
+
const isNode_1 = require("./utils/isNode");
|
|
67
|
+
Object.defineProperty(exports, "isNode", { enumerable: true, get: function () { return isNode_1.isNode; } });
|
|
68
|
+
const safe_stringify_1 = require("./utils/safe-stringify");
|
|
69
|
+
Object.defineProperty(exports, "safeStringify", { enumerable: true, get: function () { return safe_stringify_1.safeStringify; } });
|
|
70
|
+
const otelUtils_1 = require("./utils/otelUtils");
|
|
71
|
+
Object.defineProperty(exports, "getOTELData", { enumerable: true, get: function () { return otelUtils_1.getOTELData; } });
|
|
72
|
+
Object.defineProperty(exports, "flattenOtelAtributes", { enumerable: true, get: function () { return otelUtils_1.flattenOtelAtributes; } });
|
|
73
|
+
Object.defineProperty(exports, "extractFilteringContextFromArgs", { enumerable: true, get: function () { return otelUtils_1.extractFilteringContextFromArgs; } });
|
|
74
|
+
Object.defineProperty(exports, "deep_value", { enumerable: true, get: function () { return otelUtils_1.deep_value; } });
|
|
75
|
+
if (typeof Promise !== "undefined") {
|
|
76
|
+
Promise.allSettled = Promise.allSettled || ((promises) => Promise.all(promises.map((p) => p
|
|
77
|
+
.then((value) => ({
|
|
78
|
+
status: "fulfilled",
|
|
79
|
+
value
|
|
80
|
+
}))
|
|
81
|
+
.catch((reason) => ({
|
|
82
|
+
status: "rejected",
|
|
83
|
+
reason
|
|
84
|
+
})))));
|
|
85
|
+
}
|
|
86
|
+
var SpanStatusCode;
|
|
87
|
+
(function (SpanStatusCode) {
|
|
88
|
+
/**
|
|
89
|
+
* The default status.
|
|
90
|
+
*/
|
|
91
|
+
SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
|
|
92
|
+
/**
|
|
93
|
+
* The operation has been validated by an Application developer or
|
|
94
|
+
* Operator to have completed successfully.
|
|
95
|
+
*/
|
|
96
|
+
SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
|
|
97
|
+
/**
|
|
98
|
+
* The operation contains an error.
|
|
99
|
+
*/
|
|
100
|
+
SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
|
|
101
|
+
})(SpanStatusCode || (exports.SpanStatusCode = SpanStatusCode = {}));
|
|
89
102
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,8CAA4B;AAO3B,CAAC;AAKF,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wDAAuD;AAA9C,8GAAA,aAAa,OAAA;AACtB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AA0BlB,uCAA4C;AAAnC,kGAAA,UAAU,OAAA;AACnB,+EAA8E;AAArE,oIAAA,wBAAwB,OAAA;AAwEjC,0DAAoD;AAC3C,iBADF,gBAAM,CACE;AAAE,yFADC,iBAAQ,OACD;AACZ,QAAA,WAAW,GAAG,iCAAiC,CAAC;AAC7D,iFAAyD;AAChD,2BADF,0BAAgB,CACE;AAWzB,oCAAmC;AAA1B,4FAAA,IAAI,OAAA;AAkCb,iDAA4E;AAInE,uGAJA,qCAAsB,OAIA;AAAE,mGAJA,iCAAkB,OAIA;AAHnD,2CAAwC;AAI/B,uFAJA,eAAM,OAIA;AAHf,2DAAuD;AAGtC,8FAHR,8BAAa,OAGQ;AAF9B,iDAAmH;AAE7D,4FAF7C,uBAAW,OAE6C;AAAjC,qGAFV,gCAAoB,OAEU;AAAe,gHAFvB,2CAA+B,OAEuB;AAAE,2FAFvB,sBAAU,OAEuB;AAE9G,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;IACnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CACxE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;SACrB,IAAI,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;QACnB,MAAM,EAAE,WAAW;QACnB,KAAK;KACR,CAAC,CAAC;SACF,KAAK,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,CAAC;QACrB,MAAM,EAAE,UAAU;QAClB,MAAM;KACT,CAAC,CAAC,CACN,CACF,CAAC,CAAC;AACL,CAAC;AACD,IAAK,cAcJ;AAdD,WAAK,cAAc;IACjB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdI,cAAc,8BAAd,cAAc,QAclB"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as log4js from "log4js";
|
|
2
|
-
import { IOInsights } from "../../insights";
|
|
3
|
-
type logLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
4
|
-
type moreLogLevels = "off" | "trace" | "debug" | "info" | "warn" | "error";
|
|
5
|
-
type log4jsSubset = Pick<log4js.Logger, logLevel> & (Pick<log4js.Logger, "level"> | {
|
|
6
|
-
publishLevel: () => moreLogLevels | undefined;
|
|
7
|
-
});
|
|
8
|
-
export declare class Log4jsWrapper implements IOInsights.Logger {
|
|
9
|
-
private logger;
|
|
10
|
-
constructor(logger: log4jsSubset);
|
|
11
|
-
get level(): IOInsights.LoggerLogLevel;
|
|
12
|
-
error(message: string, ...args: unknown[]): void;
|
|
13
|
-
warn(message: string, ...args: unknown[]): void;
|
|
14
|
-
info(message: string, ...args: unknown[]): void;
|
|
15
|
-
debug(message: string, ...args: unknown[]): void;
|
|
16
|
-
verbose(message: string, ...args: unknown[]): void;
|
|
17
|
-
private convert;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import * as log4js from "log4js";
|
|
2
|
+
import { IOInsights } from "../../insights";
|
|
3
|
+
type logLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
4
|
+
type moreLogLevels = "off" | "trace" | "debug" | "info" | "warn" | "error";
|
|
5
|
+
type log4jsSubset = Pick<log4js.Logger, logLevel> & (Pick<log4js.Logger, "level"> | {
|
|
6
|
+
publishLevel: () => moreLogLevels | undefined;
|
|
7
|
+
});
|
|
8
|
+
export declare class Log4jsWrapper implements IOInsights.Logger {
|
|
9
|
+
private logger;
|
|
10
|
+
constructor(logger: log4jsSubset);
|
|
11
|
+
get level(): IOInsights.LoggerLogLevel;
|
|
12
|
+
error(message: string, ...args: unknown[]): void;
|
|
13
|
+
warn(message: string, ...args: unknown[]): void;
|
|
14
|
+
info(message: string, ...args: unknown[]): void;
|
|
15
|
+
debug(message: string, ...args: unknown[]): void;
|
|
16
|
+
verbose(message: string, ...args: unknown[]): void;
|
|
17
|
+
private convert;
|
|
18
|
+
}
|
|
19
|
+
export {};
|