@opentelemetry/exporter-metrics-otlp-http
Advanced tools
Comparing version 0.52.1 to 0.53.0
@@ -16,2 +16,5 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './platform'; | ||
@@ -18,0 +21,0 @@ export * from './OTLPMetricExporterOptions'; |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './OTLPMetricExporter'; | ||
//# sourceMappingURL=index.js.map |
@@ -31,5 +31,4 @@ /* | ||
})(); | ||
import { baggageUtils, getEnv } from '@opentelemetry/core'; | ||
import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase'; | ||
import { OTLPExporterBrowserBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base'; | ||
import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer'; | ||
@@ -41,14 +40,9 @@ var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics'; | ||
function OTLPExporterBrowserProxy(config) { | ||
var _this = _super.call(this, config, JsonMetricsSerializer, 'application/json') || this; | ||
_this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)); | ||
return _this; | ||
return _super.call(this, config, JsonMetricsSerializer, 'application/json') || this; | ||
} | ||
OTLPExporterBrowserProxy.prototype.getDefaultUrl = function (config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_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; | ||
}; | ||
@@ -55,0 +49,0 @@ return OTLPExporterBrowserProxy; |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './node'; | ||
//# sourceMappingURL=index.js.map |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './OTLPMetricExporter'; | ||
//# sourceMappingURL=index.js.map |
@@ -55,14 +55,16 @@ /* | ||
function OTLPExporterNodeProxy(config) { | ||
var _this = _super.call(this, config, JsonMetricsSerializer, 'application/json') || this; | ||
_this.headers = __assign(__assign(__assign(__assign({}, _this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)); | ||
return _this; | ||
return _super.call(this, config, JsonMetricsSerializer, __assign(__assign(__assign(__assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })) || this; | ||
} | ||
OTLPExporterNodeProxy.prototype.getDefaultUrl = function (config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_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_METRICS_ENDPOINT.length > 0) { | ||
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT); | ||
} | ||
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { | ||
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
}; | ||
@@ -69,0 +71,0 @@ return OTLPExporterNodeProxy; |
@@ -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,2 +16,5 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './platform'; | ||
@@ -18,0 +21,0 @@ export * from './OTLPMetricExporterOptions'; |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './OTLPMetricExporter'; | ||
//# sourceMappingURL=index.js.map |
@@ -16,5 +16,4 @@ /* | ||
*/ | ||
import { baggageUtils, getEnv } from '@opentelemetry/core'; | ||
import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase'; | ||
import { OTLPExporterBrowserBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base'; | ||
import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base'; | ||
import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer'; | ||
@@ -26,12 +25,8 @@ const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics'; | ||
super(config, JsonMetricsSerializer, 'application/json'); | ||
this._headers = Object.assign(this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_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; | ||
} | ||
@@ -38,0 +33,0 @@ } |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './node'; | ||
//# sourceMappingURL=index.js.map |
@@ -16,3 +16,6 @@ /* | ||
*/ | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
export * from './OTLPMetricExporter'; | ||
//# sourceMappingURL=index.js.map |
@@ -28,13 +28,16 @@ /* | ||
constructor(config) { | ||
super(config, JsonMetricsSerializer, 'application/json'); | ||
this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)); | ||
super(config, JsonMetricsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_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_METRICS_ENDPOINT.length > 0) { | ||
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT); | ||
} | ||
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { | ||
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); | ||
} | ||
return DEFAULT_COLLECTOR_URL; | ||
} | ||
@@ -41,0 +44,0 @@ } |
@@ -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 |
@@ -28,2 +28,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
__exportStar(require("./platform"), exports); | ||
@@ -30,0 +33,0 @@ __exportStar(require("./OTLPMetricExporterOptions"), exports); |
@@ -28,3 +28,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
__exportStar(require("./OTLPMetricExporter"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -19,3 +19,2 @@ "use strict"; | ||
exports.OTLPMetricExporter = void 0; | ||
const core_1 = require("@opentelemetry/core"); | ||
const OTLPMetricExporterBase_1 = require("../../OTLPMetricExporterBase"); | ||
@@ -29,12 +28,8 @@ const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base"); | ||
super(config, otlp_transformer_1.JsonMetricsSerializer, 'application/json'); | ||
this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS)); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_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; | ||
} | ||
@@ -41,0 +36,0 @@ } |
@@ -28,3 +28,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
__exportStar(require("./node"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -28,3 +28,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- | ||
* TODO: Replace export * with named exports before next major version | ||
*/ | ||
__exportStar(require("./OTLPMetricExporter"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -31,13 +31,16 @@ "use strict"; | ||
constructor(config) { | ||
super(config, otlp_transformer_1.JsonMetricsSerializer, 'application/json'); | ||
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_METRICS_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)); | ||
super(config, otlp_transformer_1.JsonMetricsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })); | ||
} | ||
getDefaultUrl(config) { | ||
return typeof config.url === 'string' | ||
? config.url | ||
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0 | ||
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_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_METRICS_ENDPOINT.length > 0) { | ||
return (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_METRICS_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; | ||
} | ||
@@ -44,0 +47,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-metrics-otlp-http", | ||
"version": "0.52.1", | ||
"version": "0.53.0", | ||
"description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", | ||
@@ -25,3 +25,3 @@ "main": "build/src/index.js", | ||
"tdd:browser": "karma start", | ||
"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", | ||
@@ -68,6 +68,6 @@ "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", | ||
@@ -77,6 +77,6 @@ "@types/sinon": "17.0.3", | ||
"babel-loader": "8.3.0", | ||
"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", | ||
@@ -88,7 +88,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", | ||
@@ -103,11 +102,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-metrics": "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-metrics": "1.26.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http", | ||
"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
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
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
26
1304
149721
+ 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