@opentelemetry/otlp-exporter-base 0.53.0 → 0.54.0
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/build/esm/OTLPExporterBase.d.ts +0 -8
- package/build/esm/OTLPExporterBase.js +0 -8
- package/build/esm/OTLPExporterBase.js.map +1 -1
- package/build/esm/configuration/otlp-http-configuration.d.ts +13 -0
- package/build/esm/configuration/otlp-http-configuration.js +67 -0
- package/build/esm/configuration/otlp-http-configuration.js.map +1 -0
- package/build/esm/configuration/otlp-http-env-configuration.d.ts +9 -0
- package/build/esm/configuration/otlp-http-env-configuration.js +104 -0
- package/build/esm/configuration/otlp-http-env-configuration.js.map +1 -0
- package/build/esm/configuration/shared-configuration.d.ts +22 -0
- package/build/esm/configuration/shared-configuration.js +44 -0
- package/build/esm/configuration/shared-configuration.js.map +1 -0
- package/build/esm/configuration/shared-env-configuration.d.ts +3 -0
- package/build/esm/configuration/shared-env-configuration.js +44 -0
- package/build/esm/configuration/shared-env-configuration.js.map +1 -0
- package/build/esm/index.d.ts +3 -1
- package/build/esm/index.js +3 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/platform/browser/OTLPExporterBrowserBase.d.ts +4 -3
- package/build/esm/platform/browser/OTLPExporterBrowserBase.js +18 -10
- package/build/esm/platform/browser/OTLPExporterBrowserBase.js.map +1 -1
- package/build/esm/platform/browser/xhr-transport.js +1 -1
- package/build/esm/platform/browser/xhr-transport.js.map +1 -1
- package/build/esm/platform/node/OTLPExporterNodeBase.d.ts +2 -2
- package/build/esm/platform/node/OTLPExporterNodeBase.js +18 -27
- package/build/esm/platform/node/OTLPExporterNodeBase.js.map +1 -1
- package/build/esm/platform/node/convert-legacy-agent-options.d.ts +12 -0
- package/build/esm/platform/node/convert-legacy-agent-options.js +27 -0
- package/build/esm/platform/node/convert-legacy-agent-options.js.map +1 -0
- package/build/esm/types.d.ts +1 -2
- package/build/esm/types.js.map +1 -1
- package/build/esm/util.d.ts +1 -27
- package/build/esm/util.js +1 -89
- package/build/esm/util.js.map +1 -1
- package/build/esm/version.d.ts +1 -1
- package/build/esm/version.js +1 -1
- package/build/esm/version.js.map +1 -1
- package/build/esnext/OTLPExporterBase.d.ts +0 -8
- package/build/esnext/OTLPExporterBase.js +0 -8
- package/build/esnext/OTLPExporterBase.js.map +1 -1
- package/build/esnext/configuration/otlp-http-configuration.d.ts +13 -0
- package/build/esnext/configuration/otlp-http-configuration.js +56 -0
- package/build/esnext/configuration/otlp-http-configuration.js.map +1 -0
- package/build/esnext/configuration/otlp-http-env-configuration.d.ts +9 -0
- package/build/esnext/configuration/otlp-http-env-configuration.js +93 -0
- package/build/esnext/configuration/otlp-http-env-configuration.js.map +1 -0
- package/build/esnext/configuration/shared-configuration.d.ts +22 -0
- package/build/esnext/configuration/shared-configuration.js +44 -0
- package/build/esnext/configuration/shared-configuration.js.map +1 -0
- package/build/esnext/configuration/shared-env-configuration.d.ts +3 -0
- package/build/esnext/configuration/shared-env-configuration.js +44 -0
- package/build/esnext/configuration/shared-env-configuration.js.map +1 -0
- package/build/esnext/index.d.ts +3 -1
- package/build/esnext/index.js +3 -1
- package/build/esnext/index.js.map +1 -1
- package/build/esnext/platform/browser/OTLPExporterBrowserBase.d.ts +4 -3
- package/build/esnext/platform/browser/OTLPExporterBrowserBase.js +18 -10
- package/build/esnext/platform/browser/OTLPExporterBrowserBase.js.map +1 -1
- package/build/esnext/platform/browser/xhr-transport.js +1 -1
- package/build/esnext/platform/browser/xhr-transport.js.map +1 -1
- package/build/esnext/platform/node/OTLPExporterNodeBase.d.ts +2 -2
- package/build/esnext/platform/node/OTLPExporterNodeBase.js +18 -27
- package/build/esnext/platform/node/OTLPExporterNodeBase.js.map +1 -1
- package/build/esnext/platform/node/convert-legacy-agent-options.d.ts +12 -0
- package/build/esnext/platform/node/convert-legacy-agent-options.js +27 -0
- package/build/esnext/platform/node/convert-legacy-agent-options.js.map +1 -0
- package/build/esnext/types.d.ts +1 -2
- package/build/esnext/types.js.map +1 -1
- package/build/esnext/util.d.ts +1 -27
- package/build/esnext/util.js +1 -89
- package/build/esnext/util.js.map +1 -1
- package/build/esnext/version.d.ts +1 -1
- package/build/esnext/version.js +1 -1
- package/build/esnext/version.js.map +1 -1
- package/build/src/OTLPExporterBase.d.ts +0 -8
- package/build/src/OTLPExporterBase.js +0 -8
- package/build/src/OTLPExporterBase.js.map +1 -1
- package/build/src/configuration/otlp-http-configuration.d.ts +13 -0
- package/build/src/configuration/otlp-http-configuration.js +61 -0
- package/build/src/configuration/otlp-http-configuration.js.map +1 -0
- package/build/src/configuration/otlp-http-env-configuration.d.ts +9 -0
- package/build/src/configuration/otlp-http-env-configuration.js +97 -0
- package/build/src/configuration/otlp-http-env-configuration.js.map +1 -0
- package/build/src/configuration/shared-configuration.d.ts +22 -0
- package/build/src/configuration/shared-configuration.js +50 -0
- package/build/src/configuration/shared-configuration.js.map +1 -0
- package/build/src/configuration/shared-env-configuration.d.ts +3 -0
- package/build/src/configuration/shared-env-configuration.js +48 -0
- package/build/src/configuration/shared-env-configuration.js.map +1 -0
- package/build/src/index.d.ts +3 -1
- package/build/src/index.js +7 -6
- package/build/src/index.js.map +1 -1
- package/build/src/platform/browser/OTLPExporterBrowserBase.d.ts +4 -3
- package/build/src/platform/browser/OTLPExporterBrowserBase.js +18 -10
- package/build/src/platform/browser/OTLPExporterBrowserBase.js.map +1 -1
- package/build/src/platform/browser/xhr-transport.js +3 -3
- package/build/src/platform/browser/xhr-transport.js.map +1 -1
- package/build/src/platform/node/OTLPExporterNodeBase.d.ts +2 -2
- package/build/src/platform/node/OTLPExporterNodeBase.js +18 -27
- package/build/src/platform/node/OTLPExporterNodeBase.js.map +1 -1
- package/build/src/platform/node/convert-legacy-agent-options.d.ts +12 -0
- package/build/src/platform/node/convert-legacy-agent-options.js +31 -0
- package/build/src/platform/node/convert-legacy-agent-options.js.map +1 -0
- package/build/src/types.d.ts +1 -2
- package/build/src/types.js.map +1 -1
- package/build/src/util.d.ts +1 -27
- package/build/src/util.js +3 -97
- package/build/src/util.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +8 -11
- package/build/esm/platform/node/util.d.ts +0 -3
- package/build/esm/platform/node/util.js +0 -30
- package/build/esm/platform/node/util.js.map +0 -1
- package/build/esnext/platform/node/util.d.ts +0 -3
- package/build/esnext/platform/node/util.js +0 -30
- package/build/esnext/platform/node/util.js.map +0 -1
- package/build/src/platform/node/util.d.ts +0 -3
- package/build/src/platform/node/util.js +0 -34
- package/build/src/platform/node/util.js.map +0 -1
package/build/src/util.js
CHANGED
|
@@ -15,19 +15,13 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.validateAndNormalizeHeaders = void 0;
|
|
19
19
|
const api_1 = require("@opentelemetry/api");
|
|
20
|
-
const core_1 = require("@opentelemetry/core");
|
|
21
|
-
const DEFAULT_TRACE_TIMEOUT = 10000;
|
|
22
|
-
exports.DEFAULT_EXPORT_MAX_ATTEMPTS = 5;
|
|
23
|
-
exports.DEFAULT_EXPORT_INITIAL_BACKOFF = 1000;
|
|
24
|
-
exports.DEFAULT_EXPORT_MAX_BACKOFF = 5000;
|
|
25
|
-
exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5;
|
|
26
20
|
/**
|
|
27
21
|
* Parses headers from config leaving only those that have defined values
|
|
28
22
|
* @param partialHeaders
|
|
29
23
|
*/
|
|
30
|
-
function
|
|
24
|
+
function validateAndNormalizeHeaders(partialHeaders = {}) {
|
|
31
25
|
const headers = {};
|
|
32
26
|
Object.entries(partialHeaders).forEach(([key, value]) => {
|
|
33
27
|
if (typeof value !== 'undefined') {
|
|
@@ -39,93 +33,5 @@ function parseHeaders(partialHeaders = {}) {
|
|
|
39
33
|
});
|
|
40
34
|
return headers;
|
|
41
35
|
}
|
|
42
|
-
exports.
|
|
43
|
-
/**
|
|
44
|
-
* Adds path (version + signal) to a no per-signal endpoint
|
|
45
|
-
* @param url
|
|
46
|
-
* @param path
|
|
47
|
-
* @returns url + path
|
|
48
|
-
*/
|
|
49
|
-
function appendResourcePathToUrl(url, path) {
|
|
50
|
-
if (!url.endsWith('/')) {
|
|
51
|
-
url = url + '/';
|
|
52
|
-
}
|
|
53
|
-
return url + path;
|
|
54
|
-
}
|
|
55
|
-
exports.appendResourcePathToUrl = appendResourcePathToUrl;
|
|
56
|
-
/**
|
|
57
|
-
* Adds root path to signal specific endpoint when endpoint contains no path part and no root path
|
|
58
|
-
* @param url
|
|
59
|
-
* @returns url
|
|
60
|
-
*/
|
|
61
|
-
function appendRootPathToUrlIfNeeded(url) {
|
|
62
|
-
try {
|
|
63
|
-
const parsedUrl = new URL(url);
|
|
64
|
-
if (parsedUrl.pathname === '') {
|
|
65
|
-
parsedUrl.pathname = parsedUrl.pathname + '/';
|
|
66
|
-
}
|
|
67
|
-
return parsedUrl.toString();
|
|
68
|
-
}
|
|
69
|
-
catch (_a) {
|
|
70
|
-
api_1.diag.warn(`Could not parse export URL: '${url}'`);
|
|
71
|
-
return url;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.appendRootPathToUrlIfNeeded = appendRootPathToUrlIfNeeded;
|
|
75
|
-
/**
|
|
76
|
-
* Configure exporter trace timeout value from passed in value or environment variables
|
|
77
|
-
* @param timeoutMillis
|
|
78
|
-
* @returns timeout value in milliseconds
|
|
79
|
-
*/
|
|
80
|
-
function configureExporterTimeout(timeoutMillis) {
|
|
81
|
-
if (typeof timeoutMillis === 'number') {
|
|
82
|
-
if (timeoutMillis <= 0) {
|
|
83
|
-
// OTLP exporter configured timeout - using default value of 10000ms
|
|
84
|
-
return invalidTimeout(timeoutMillis, DEFAULT_TRACE_TIMEOUT);
|
|
85
|
-
}
|
|
86
|
-
return timeoutMillis;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return getExporterTimeoutFromEnv();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.configureExporterTimeout = configureExporterTimeout;
|
|
93
|
-
function getExporterTimeoutFromEnv() {
|
|
94
|
-
var _a;
|
|
95
|
-
const definedTimeout = Number((_a = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) !== null && _a !== void 0 ? _a : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);
|
|
96
|
-
if (definedTimeout <= 0) {
|
|
97
|
-
// OTLP exporter configured timeout - using default value of 10000ms
|
|
98
|
-
return invalidTimeout(definedTimeout, DEFAULT_TRACE_TIMEOUT);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
return definedTimeout;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
// OTLP exporter configured timeout - using default value of 10000ms
|
|
105
|
-
function invalidTimeout(timeout, defaultTimeout) {
|
|
106
|
-
api_1.diag.warn('Timeout must be greater than 0', timeout);
|
|
107
|
-
return defaultTimeout;
|
|
108
|
-
}
|
|
109
|
-
exports.invalidTimeout = invalidTimeout;
|
|
110
|
-
function isExportRetryable(statusCode) {
|
|
111
|
-
const retryCodes = [429, 502, 503, 504];
|
|
112
|
-
return retryCodes.includes(statusCode);
|
|
113
|
-
}
|
|
114
|
-
exports.isExportRetryable = isExportRetryable;
|
|
115
|
-
function parseRetryAfterToMills(retryAfter) {
|
|
116
|
-
if (retryAfter == null) {
|
|
117
|
-
return -1;
|
|
118
|
-
}
|
|
119
|
-
const seconds = Number.parseInt(retryAfter, 10);
|
|
120
|
-
if (Number.isInteger(seconds)) {
|
|
121
|
-
return seconds > 0 ? seconds * 1000 : -1;
|
|
122
|
-
}
|
|
123
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives
|
|
124
|
-
const delay = new Date(retryAfter).getTime() - Date.now();
|
|
125
|
-
if (delay >= 0) {
|
|
126
|
-
return delay;
|
|
127
|
-
}
|
|
128
|
-
return 0;
|
|
129
|
-
}
|
|
130
|
-
exports.parseRetryAfterToMills = parseRetryAfterToMills;
|
|
36
|
+
exports.validateAndNormalizeHeaders = validateAndNormalizeHeaders;
|
|
131
37
|
//# sourceMappingURL=util.js.map
|
package/build/src/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAE1C;;;GAGG;AACH,SAAgB,2BAA2B,CACzC,iBAAmD,EAAE;IAErD,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;SAC9B;aAAM;YACL,UAAI,CAAC,IAAI,CACP,WAAW,GAAG,wBAAwB,KAAK,uBAAuB,CACnE,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAdD,kEAcC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function validateAndNormalizeHeaders(\n partialHeaders: Partial<Record<string, unknown>> = {}\n): Record<string, string> {\n const headers: Record<string, string> = {};\n Object.entries(partialHeaders).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n } else {\n diag.warn(\n `Header \"${key}\" has invalid value (${value}) and will be ignored`\n );\n }\n });\n return headers;\n}\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.54.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/build/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/otlp-exporter-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "OpenTelemetry OTLP Exporter base (for internal use only)",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"module": "build/esm/index.js",
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
"prepublishOnly": "npm run compile",
|
|
18
18
|
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
19
19
|
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
20
|
-
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
21
|
-
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
22
20
|
"lint": "eslint . --ext .ts",
|
|
23
21
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
24
22
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
@@ -62,18 +60,17 @@
|
|
|
62
60
|
"access": "public"
|
|
63
61
|
},
|
|
64
62
|
"dependencies": {
|
|
65
|
-
"@opentelemetry/core": "1.
|
|
66
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
63
|
+
"@opentelemetry/core": "1.27.0",
|
|
64
|
+
"@opentelemetry/otlp-transformer": "0.54.0"
|
|
67
65
|
},
|
|
68
66
|
"devDependencies": {
|
|
69
67
|
"@babel/core": "7.25.2",
|
|
70
|
-
"@babel/preset-env": "7.25.
|
|
68
|
+
"@babel/preset-env": "7.25.4",
|
|
71
69
|
"@opentelemetry/api": "1.9.0",
|
|
72
|
-
"@types/mocha": "10.0.
|
|
70
|
+
"@types/mocha": "10.0.8",
|
|
73
71
|
"@types/node": "18.6.5",
|
|
74
72
|
"@types/sinon": "17.0.3",
|
|
75
73
|
"babel-plugin-istanbul": "7.0.0",
|
|
76
|
-
"codecov": "3.8.3",
|
|
77
74
|
"cross-var": "1.1.0",
|
|
78
75
|
"karma": "6.4.4",
|
|
79
76
|
"karma-chrome-launcher": "3.1.0",
|
|
@@ -87,14 +84,14 @@
|
|
|
87
84
|
"sinon": "15.1.2",
|
|
88
85
|
"ts-loader": "9.5.1",
|
|
89
86
|
"typescript": "4.4.4",
|
|
90
|
-
"webpack": "5.
|
|
87
|
+
"webpack": "5.94.0",
|
|
91
88
|
"webpack-cli": "5.1.4",
|
|
92
89
|
"webpack-merge": "5.10.0"
|
|
93
90
|
},
|
|
94
91
|
"peerDependencies": {
|
|
95
|
-
"@opentelemetry/api": "^1.
|
|
92
|
+
"@opentelemetry/api": "^1.3.0"
|
|
96
93
|
},
|
|
97
94
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-exporter-base",
|
|
98
95
|
"sideEffects": false,
|
|
99
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "eb3ca4fb07ee31c62093f5fcec56575573c902ce"
|
|
100
97
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { CompressionAlgorithm } from './types';
|
|
17
|
-
import { getEnv } from '@opentelemetry/core';
|
|
18
|
-
export function configureCompression(compression) {
|
|
19
|
-
if (compression) {
|
|
20
|
-
return compression;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
var definedCompression = getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||
|
|
24
|
-
getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;
|
|
25
|
-
return definedCompression === CompressionAlgorithm.GZIP
|
|
26
|
-
? CompressionAlgorithm.GZIP
|
|
27
|
-
: CompressionAlgorithm.NONE;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/platform/node/util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,oBAAoB,CAClC,WAA6C;IAE7C,IAAI,WAAW,EAAE;QACf,OAAO,WAAW,CAAC;KACpB;SAAM;QACL,IAAM,kBAAkB,GACtB,MAAM,EAAE,CAAC,qCAAqC;YAC9C,MAAM,EAAE,CAAC,8BAA8B,CAAC;QAC1C,OAAO,kBAAkB,KAAK,oBAAoB,CAAC,IAAI;YACrD,CAAC,CAAC,oBAAoB,CAAC,IAAI;YAC3B,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC;KAC/B;AACH,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CompressionAlgorithm } from './types';\nimport { getEnv } from '@opentelemetry/core';\n\nexport function configureCompression(\n compression: CompressionAlgorithm | undefined\n): CompressionAlgorithm {\n if (compression) {\n return compression;\n } else {\n const definedCompression =\n getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||\n getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;\n return definedCompression === CompressionAlgorithm.GZIP\n ? CompressionAlgorithm.GZIP\n : CompressionAlgorithm.NONE;\n }\n}\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { CompressionAlgorithm } from './types';
|
|
17
|
-
import { getEnv } from '@opentelemetry/core';
|
|
18
|
-
export function configureCompression(compression) {
|
|
19
|
-
if (compression) {
|
|
20
|
-
return compression;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
const definedCompression = getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||
|
|
24
|
-
getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;
|
|
25
|
-
return definedCompression === CompressionAlgorithm.GZIP
|
|
26
|
-
? CompressionAlgorithm.GZIP
|
|
27
|
-
: CompressionAlgorithm.NONE;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/platform/node/util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,oBAAoB,CAClC,WAA6C;IAE7C,IAAI,WAAW,EAAE;QACf,OAAO,WAAW,CAAC;KACpB;SAAM;QACL,MAAM,kBAAkB,GACtB,MAAM,EAAE,CAAC,qCAAqC;YAC9C,MAAM,EAAE,CAAC,8BAA8B,CAAC;QAC1C,OAAO,kBAAkB,KAAK,oBAAoB,CAAC,IAAI;YACrD,CAAC,CAAC,oBAAoB,CAAC,IAAI;YAC3B,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC;KAC/B;AACH,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CompressionAlgorithm } from './types';\nimport { getEnv } from '@opentelemetry/core';\n\nexport function configureCompression(\n compression: CompressionAlgorithm | undefined\n): CompressionAlgorithm {\n if (compression) {\n return compression;\n } else {\n const definedCompression =\n getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||\n getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;\n return definedCompression === CompressionAlgorithm.GZIP\n ? CompressionAlgorithm.GZIP\n : CompressionAlgorithm.NONE;\n }\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright The OpenTelemetry Authors
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.configureCompression = void 0;
|
|
19
|
-
const types_1 = require("./types");
|
|
20
|
-
const core_1 = require("@opentelemetry/core");
|
|
21
|
-
function configureCompression(compression) {
|
|
22
|
-
if (compression) {
|
|
23
|
-
return compression;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||
|
|
27
|
-
(0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION;
|
|
28
|
-
return definedCompression === types_1.CompressionAlgorithm.GZIP
|
|
29
|
-
? types_1.CompressionAlgorithm.GZIP
|
|
30
|
-
: types_1.CompressionAlgorithm.NONE;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.configureCompression = configureCompression;
|
|
34
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/platform/node/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mCAA+C;AAC/C,8CAA6C;AAE7C,SAAgB,oBAAoB,CAClC,WAA6C;IAE7C,IAAI,WAAW,EAAE;QACf,OAAO,WAAW,CAAC;KACpB;SAAM;QACL,MAAM,kBAAkB,GACtB,IAAA,aAAM,GAAE,CAAC,qCAAqC;YAC9C,IAAA,aAAM,GAAE,CAAC,8BAA8B,CAAC;QAC1C,OAAO,kBAAkB,KAAK,4BAAoB,CAAC,IAAI;YACrD,CAAC,CAAC,4BAAoB,CAAC,IAAI;YAC3B,CAAC,CAAC,4BAAoB,CAAC,IAAI,CAAC;KAC/B;AACH,CAAC;AAbD,oDAaC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CompressionAlgorithm } from './types';\nimport { getEnv } from '@opentelemetry/core';\n\nexport function configureCompression(\n compression: CompressionAlgorithm | undefined\n): CompressionAlgorithm {\n if (compression) {\n return compression;\n } else {\n const definedCompression =\n getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||\n getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;\n return definedCompression === CompressionAlgorithm.GZIP\n ? CompressionAlgorithm.GZIP\n : CompressionAlgorithm.NONE;\n }\n}\n"]}
|