@opentelemetry/exporter-logs-otlp-http 0.40.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/LICENSE +201 -0
- package/README.md +114 -0
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.js +17 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/platform/browser/OTLPLogExporter.d.ts +13 -0
- package/build/esm/platform/browser/OTLPLogExporter.js +68 -0
- package/build/esm/platform/browser/OTLPLogExporter.js.map +1 -0
- package/build/esm/platform/browser/index.d.ts +2 -0
- package/build/esm/platform/browser/index.js +17 -0
- package/build/esm/platform/browser/index.js.map +1 -0
- package/build/esm/platform/config.d.ts +9 -0
- package/build/esm/platform/config.js +34 -0
- package/build/esm/platform/config.js.map +1 -0
- package/build/esm/platform/index.d.ts +2 -0
- package/build/esm/platform/index.js +17 -0
- package/build/esm/platform/index.js.map +1 -0
- package/build/esm/platform/node/OTLPLogExporter.d.ts +13 -0
- package/build/esm/platform/node/OTLPLogExporter.js +68 -0
- package/build/esm/platform/node/OTLPLogExporter.js.map +1 -0
- package/build/esm/platform/node/index.d.ts +2 -0
- package/build/esm/platform/node/index.js +17 -0
- package/build/esm/platform/node/index.js.map +1 -0
- package/build/esm/version.d.ts +2 -0
- package/build/esm/version.js +18 -0
- package/build/esm/version.js.map +1 -0
- package/build/esnext/index.d.ts +2 -0
- package/build/esnext/index.js +17 -0
- package/build/esnext/index.js.map +1 -0
- package/build/esnext/platform/browser/OTLPLogExporter.d.ts +13 -0
- package/build/esnext/platform/browser/OTLPLogExporter.js +36 -0
- package/build/esnext/platform/browser/OTLPLogExporter.js.map +1 -0
- package/build/esnext/platform/browser/index.d.ts +2 -0
- package/build/esnext/platform/browser/index.js +17 -0
- package/build/esnext/platform/browser/index.js.map +1 -0
- package/build/esnext/platform/config.d.ts +9 -0
- package/build/esnext/platform/config.js +34 -0
- package/build/esnext/platform/config.js.map +1 -0
- package/build/esnext/platform/index.d.ts +2 -0
- package/build/esnext/platform/index.js +17 -0
- package/build/esnext/platform/index.js.map +1 -0
- package/build/esnext/platform/node/OTLPLogExporter.d.ts +13 -0
- package/build/esnext/platform/node/OTLPLogExporter.js +36 -0
- package/build/esnext/platform/node/OTLPLogExporter.js.map +1 -0
- package/build/esnext/platform/node/index.d.ts +2 -0
- package/build/esnext/platform/node/index.js +17 -0
- package/build/esnext/platform/node/index.js.map +1 -0
- package/build/esnext/version.d.ts +2 -0
- package/build/esnext/version.js +18 -0
- package/build/esnext/version.js.map +1 -0
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +21 -0
- package/build/src/index.js.map +1 -0
- package/build/src/platform/browser/OTLPLogExporter.d.ts +13 -0
- package/build/src/platform/browser/OTLPLogExporter.js +40 -0
- package/build/src/platform/browser/OTLPLogExporter.js.map +1 -0
- package/build/src/platform/browser/index.d.ts +2 -0
- package/build/src/platform/browser/index.js +21 -0
- package/build/src/platform/browser/index.js.map +1 -0
- package/build/src/platform/config.d.ts +9 -0
- package/build/src/platform/config.js +38 -0
- package/build/src/platform/config.js.map +1 -0
- package/build/src/platform/index.d.ts +2 -0
- package/build/src/platform/index.js +21 -0
- package/build/src/platform/index.js.map +1 -0
- package/build/src/platform/node/OTLPLogExporter.d.ts +13 -0
- package/build/src/platform/node/OTLPLogExporter.js +40 -0
- package/build/src/platform/node/OTLPLogExporter.js.map +1 -0
- package/build/src/platform/node/index.d.ts +2 -0
- package/build/src/platform/node/index.js +21 -0
- package/build/src/platform/node/index.js.map +1 -0
- package/build/src/version.d.ts +2 -0
- package/build/src/version.js +21 -0
- package/build/src/version.js.map +1 -0
- package/package.json +110 -0
|
@@ -0,0 +1,40 @@
|
|
|
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.OTLPLogExporter = void 0;
|
|
19
|
+
const core_1 = require("@opentelemetry/core");
|
|
20
|
+
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
|
+
const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
|
|
22
|
+
const config_1 = require("../config");
|
|
23
|
+
/**
|
|
24
|
+
* Collector Logs Exporter for Node
|
|
25
|
+
*/
|
|
26
|
+
class OTLPLogExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
|
|
27
|
+
constructor(config = {}) {
|
|
28
|
+
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env
|
|
29
|
+
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config));
|
|
30
|
+
this.headers = Object.assign(Object.assign({}, this.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_HEADERS));
|
|
31
|
+
}
|
|
32
|
+
convert(logRecords) {
|
|
33
|
+
return (0, otlp_transformer_1.createExportLogsServiceRequest)(logRecords);
|
|
34
|
+
}
|
|
35
|
+
getDefaultUrl(config) {
|
|
36
|
+
return (0, config_1.getDefaultUrl)(config);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.OTLPLogExporter = OTLPLogExporter;
|
|
40
|
+
//# sourceMappingURL=OTLPLogExporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,8CAA2D;AAC3D,0EAAyE;AACzE,sEAAiF;AAEjF,sCAA0C;AAE1C;;GAEG;AACH,MAAa,eACX,SAAQ,yCAAkE;IAG1E,YAAY,SAAqC,EAAE;QACjD,4CAA4C;QAC5C,KAAK,iBACH,aAAa,EAAE,IAAA,aAAM,GAAE,CAAC,+BAA+B,IACpD,MAAM,EACT,CAAC;QACH,IAAI,CAAC,OAAO,mCACP,IAAI,CAAC,OAAO,GACZ,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,+BAA+B,CACzC,CACF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,UAA+B;QACrC,OAAO,IAAA,iDAA8B,EAAC,UAAU,CAAC,CAAC;IACpD,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,IAAA,sBAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AAzBD,0CAyBC","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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceRequest } from '@opentelemetry/otlp-transformer';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { createExportLogsServiceRequest } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceRequest>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env\n super({\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n });\n this.headers = {\n ...this.headers,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n };\n }\n\n convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest {\n return createExportLogsServiceRequest(logRecords);\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return getDefaultUrl(config);\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.OTLPLogExporter = void 0;
|
|
19
|
+
var OTLPLogExporter_1 = require("./OTLPLogExporter");
|
|
20
|
+
Object.defineProperty(exports, "OTLPLogExporter", { enumerable: true, get: function () { return OTLPLogExporter_1.OTLPLogExporter; } });
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAoD;AAA3C,kHAAA,eAAe,OAAA","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\nexport { OTLPLogExporter } from './OTLPLogExporter';\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.VERSION = void 0;
|
|
19
|
+
// this is autogenerated file, see scripts/version-update.js
|
|
20
|
+
exports.VERSION = '0.40.0';
|
|
21
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +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.40.0';\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentelemetry/exporter-logs-otlp-http",
|
|
3
|
+
"version": "0.40.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "OpenTelemetry Collector Logs Exporter allows user to send collected logs to the OpenTelemetry Collector",
|
|
8
|
+
"author": "OpenTelemetry Authors",
|
|
9
|
+
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "build/src/index.js",
|
|
12
|
+
"module": "build/esm/index.js",
|
|
13
|
+
"esnext": "build/esnext/index.js",
|
|
14
|
+
"types": "build/src/index.d.ts",
|
|
15
|
+
"browser": {
|
|
16
|
+
"./src/platform/index.ts": "./src/platform/browser/index.ts",
|
|
17
|
+
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
|
|
18
|
+
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
|
|
19
|
+
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/open-telemetry/opentelemetry-js.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=14"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepublishOnly": "npm run compile",
|
|
33
|
+
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
34
|
+
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
35
|
+
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
36
|
+
"lint": "eslint . --ext .ts",
|
|
37
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
38
|
+
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
39
|
+
"tdd:browser": "karma start",
|
|
40
|
+
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
|
|
41
|
+
"test:browser": "nyc karma start --single-run",
|
|
42
|
+
"version": "node ../../../scripts/version-update.js",
|
|
43
|
+
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
44
|
+
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
|
|
45
|
+
"prewatch": "npm run precompile",
|
|
46
|
+
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
47
|
+
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"opentelemetry",
|
|
51
|
+
"nodejs",
|
|
52
|
+
"browser",
|
|
53
|
+
"tracing",
|
|
54
|
+
"profiling",
|
|
55
|
+
"logs",
|
|
56
|
+
"stats"
|
|
57
|
+
],
|
|
58
|
+
"files": [
|
|
59
|
+
"build/esm/**/*.js",
|
|
60
|
+
"build/esm/**/*.js.map",
|
|
61
|
+
"build/esm/**/*.d.ts",
|
|
62
|
+
"build/esnext/**/*.js",
|
|
63
|
+
"build/esnext/**/*.js.map",
|
|
64
|
+
"build/esnext/**/*.d.ts",
|
|
65
|
+
"build/src/**/*.js",
|
|
66
|
+
"build/src/**/*.js.map",
|
|
67
|
+
"build/src/**/*.d.ts",
|
|
68
|
+
"doc",
|
|
69
|
+
"LICENSE",
|
|
70
|
+
"README.md"
|
|
71
|
+
],
|
|
72
|
+
"sideEffects": false,
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@babel/core": "7.16.0",
|
|
75
|
+
"@opentelemetry/api-logs": "0.40.0",
|
|
76
|
+
"@types/mocha": "10.0.0",
|
|
77
|
+
"@types/node": "18.6.5",
|
|
78
|
+
"@types/sinon": "10.0.13",
|
|
79
|
+
"@types/webpack-env": "1.16.3",
|
|
80
|
+
"babel-loader": "8.2.3",
|
|
81
|
+
"codecov": "3.8.3",
|
|
82
|
+
"cpx": "1.5.0",
|
|
83
|
+
"istanbul-instrumenter-loader": "3.0.1",
|
|
84
|
+
"karma": "6.3.16",
|
|
85
|
+
"karma-chrome-launcher": "3.1.0",
|
|
86
|
+
"karma-coverage-istanbul-reporter": "3.0.3",
|
|
87
|
+
"karma-mocha": "2.0.1",
|
|
88
|
+
"karma-spec-reporter": "0.0.32",
|
|
89
|
+
"karma-webpack": "4.0.2",
|
|
90
|
+
"mocha": "10.0.0",
|
|
91
|
+
"nyc": "15.1.0",
|
|
92
|
+
"sinon": "14.0.0",
|
|
93
|
+
"ts-loader": "8.4.0",
|
|
94
|
+
"ts-mocha": "10.0.0",
|
|
95
|
+
"typescript": "4.4.4",
|
|
96
|
+
"webpack": "4.46.0",
|
|
97
|
+
"webpack-cli": "4.9.1",
|
|
98
|
+
"webpack-merge": "5.8.0"
|
|
99
|
+
},
|
|
100
|
+
"peerDependencies": {
|
|
101
|
+
"@opentelemetry/api-logs": ">=0.38.0"
|
|
102
|
+
},
|
|
103
|
+
"dependencies": {
|
|
104
|
+
"@opentelemetry/core": "1.14.0",
|
|
105
|
+
"@opentelemetry/otlp-exporter-base": "0.40.0",
|
|
106
|
+
"@opentelemetry/otlp-transformer": "0.40.0",
|
|
107
|
+
"@opentelemetry/sdk-logs": "0.40.0"
|
|
108
|
+
},
|
|
109
|
+
"gitHead": "edebbcc757535bc88f01340409dbbecc0bb6ccf8"
|
|
110
|
+
}
|