@opentelemetry/exporter-trace-otlp-proto
Advanced tools
Comparing version 0.52.1 to 0.53.0
@@ -31,4 +31,3 @@ /* | ||
})(); | ||
import { getEnv, baggageUtils } from '@opentelemetry/core'; | ||
import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { ProtobufTraceSerializer, } from '@opentelemetry/otlp-transformer'; | ||
@@ -44,14 +43,9 @@ var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces'; | ||
if (config === void 0) { config = {}; } | ||
var _this = _super.call(this, config, ProtobufTraceSerializer, 'application/x-protobuf') || this; | ||
_this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); | ||
return _this; | ||
return _super.call(this, config, ProtobufTraceSerializer, 'application/x-protobuf') || this; | ||
} | ||
OTLPTraceExporter.prototype.getDefaultUrl = function (config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
}; | ||
@@ -58,0 +52,0 @@ return OTLPTraceExporter; |
@@ -58,14 +58,16 @@ /* | ||
if (config === void 0) { config = {}; } | ||
var _this = _super.call(this, config, ProtobufTraceSerializer, 'application/x-protobuf') || this; | ||
_this.headers = __assign(__assign(__assign(__assign({}, _this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)); | ||
return _this; | ||
return _super.call(this, config, ProtobufTraceSerializer, __assign(__assign(__assign(__assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/x-protobuf' })) || this; | ||
} | ||
OTLPTraceExporter.prototype.getDefaultUrl = function (config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
var env = getEnv(); | ||
if (env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0) { | ||
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT); | ||
} | ||
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { | ||
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
}; | ||
@@ -72,0 +74,0 @@ return OTLPTraceExporter; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.52.1"; | ||
export declare const VERSION = "0.53.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '0.52.1'; | ||
export var VERSION = '0.53.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -16,4 +16,3 @@ /* | ||
*/ | ||
import { getEnv, baggageUtils } from '@opentelemetry/core'; | ||
import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { ProtobufTraceSerializer, } from '@opentelemetry/otlp-transformer'; | ||
@@ -28,14 +27,10 @@ const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces'; | ||
super(config, ProtobufTraceSerializer, 'application/x-protobuf'); | ||
this._headers = Object.assign(this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
} | ||
} | ||
//# sourceMappingURL=OTLPTraceExporter.js.map |
@@ -30,15 +30,18 @@ /* | ||
constructor(config = {}) { | ||
super(config, ProtobufTraceSerializer, 'application/x-protobuf'); | ||
this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)); | ||
super(config, ProtobufTraceSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/x-protobuf' })); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
const env = getEnv(); | ||
if (env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0) { | ||
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT); | ||
} | ||
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { | ||
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
} | ||
} | ||
//# sourceMappingURL=OTLPTraceExporter.js.map |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.52.1"; | ||
export declare const VERSION = "0.53.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '0.52.1'; | ||
export const VERSION = '0.53.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -19,3 +19,2 @@ "use strict"; | ||
exports.OTLPTraceExporter = void 0; | ||
const core_1 = require("@opentelemetry/core"); | ||
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base"); | ||
@@ -31,12 +30,8 @@ const otlp_transformer_1 = require("@opentelemetry/otlp-transformer"); | ||
super(config, otlp_transformer_1.ProtobufTraceSerializer, 'application/x-protobuf'); | ||
this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
} | ||
@@ -43,0 +38,0 @@ } |
@@ -33,13 +33,16 @@ "use strict"; | ||
constructor(config = {}) { | ||
super(config, otlp_transformer_1.ProtobufTraceSerializer, 'application/x-protobuf'); | ||
this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)); | ||
super(config, otlp_transformer_1.ProtobufTraceSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/x-protobuf' })); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) | ||
: DEFAULT_COLLECTOR_URL; | ||
if (typeof config.url === 'string') { | ||
return config.url; | ||
} | ||
const env = (0, core_1.getEnv)(); | ||
if (env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0) { | ||
return (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT); | ||
} | ||
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { | ||
return (0, otlp_exporter_base_1.appendResourcePathToUrl)(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
} | ||
@@ -46,0 +49,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.52.1"; | ||
export declare const VERSION = "0.53.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.52.1'; | ||
exports.VERSION = '0.53.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-trace-otlp-proto", | ||
"version": "0.52.1", | ||
"version": "0.53.0", | ||
"description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP", | ||
@@ -23,3 +23,3 @@ "main": "build/src/index.js", | ||
"tdd": "npm run test -- --watch-extensions ts --watch", | ||
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", | ||
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", | ||
"test:browser": "karma start --single-run", | ||
@@ -67,12 +67,12 @@ "version": "node ../../../scripts/version-update.js", | ||
"devDependencies": { | ||
"@babel/core": "7.24.7", | ||
"@babel/preset-env": "7.24.7", | ||
"@babel/core": "7.25.2", | ||
"@babel/preset-env": "7.25.3", | ||
"@opentelemetry/api": "1.9.0", | ||
"@types/mocha": "10.0.6", | ||
"@types/mocha": "10.0.7", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "17.0.3", | ||
"babel-plugin-istanbul": "6.1.1", | ||
"babel-plugin-istanbul": "7.0.0", | ||
"codecov": "3.8.3", | ||
"cross-var": "1.1.0", | ||
"karma": "6.4.3", | ||
"karma": "6.4.4", | ||
"karma-chrome-launcher": "3.1.0", | ||
@@ -84,7 +84,6 @@ "karma-coverage": "2.2.1", | ||
"lerna": "6.6.2", | ||
"mocha": "10.2.0", | ||
"mocha": "10.7.3", | ||
"nyc": "15.1.0", | ||
"sinon": "15.1.2", | ||
"ts-loader": "9.5.1", | ||
"ts-mocha": "10.0.0", | ||
"typescript": "4.4.4", | ||
@@ -99,11 +98,11 @@ "webpack": "5.89.0", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.25.1", | ||
"@opentelemetry/otlp-exporter-base": "0.52.1", | ||
"@opentelemetry/otlp-transformer": "0.52.1", | ||
"@opentelemetry/resources": "1.25.1", | ||
"@opentelemetry/sdk-trace-base": "1.25.1" | ||
"@opentelemetry/core": "1.26.0", | ||
"@opentelemetry/otlp-exporter-base": "0.53.0", | ||
"@opentelemetry/otlp-transformer": "0.53.0", | ||
"@opentelemetry/resources": "1.26.0", | ||
"@opentelemetry/sdk-trace-base": "1.26.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto", | ||
"sideEffects": false, | ||
"gitHead": "0608f405573901e54db01e44c533009cf28be262" | ||
"gitHead": "720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24
81260
631
+ Added@opentelemetry/api-logs@0.53.0(transitive)
+ Added@opentelemetry/core@1.26.0(transitive)
+ Added@opentelemetry/otlp-exporter-base@0.53.0(transitive)
+ Added@opentelemetry/otlp-transformer@0.53.0(transitive)
+ Added@opentelemetry/resources@1.26.0(transitive)
+ Added@opentelemetry/sdk-logs@0.53.0(transitive)
+ Added@opentelemetry/sdk-metrics@1.26.0(transitive)
+ Added@opentelemetry/sdk-trace-base@1.26.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.27.0(transitive)
- Removed@opentelemetry/api-logs@0.52.1(transitive)
- Removed@opentelemetry/core@1.25.1(transitive)
- Removed@opentelemetry/otlp-exporter-base@0.52.1(transitive)
- Removed@opentelemetry/otlp-transformer@0.52.1(transitive)
- Removed@opentelemetry/resources@1.25.1(transitive)
- Removed@opentelemetry/sdk-logs@0.52.1(transitive)
- Removed@opentelemetry/sdk-metrics@1.25.1(transitive)
- Removed@opentelemetry/sdk-trace-base@1.25.1(transitive)
- Removed@opentelemetry/semantic-conventions@1.25.1(transitive)
- Removedlodash.merge@4.6.2(transitive)
Updated@opentelemetry/core@1.26.0