Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/exporter-collector

Package Overview
Dependencies
Maintainers
4
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/exporter-collector - npm Package Compare versions

Comparing version 0.24.1-alpha.14 to 0.24.1-alpha.15

27

build/esm/platform/browser/CollectorExporterBrowserBase.js

@@ -72,24 +72,17 @@ /*

var body = JSON.stringify(serviceRequest);
var promise = new Promise(function (resolve) {
var _onSuccess = function () {
onSuccess();
_onFinish();
};
var _onError = function (error) {
onError(error);
_onFinish();
};
var _onFinish = function () {
resolve();
var index = _this._sendingPromises.indexOf(promise);
_this._sendingPromises.splice(index, 1);
};
var promise = new Promise(function (resolve, reject) {
if (_this._useXHR) {
sendWithXhr(body, _this.url, _this._headers, _onSuccess, _onError);
sendWithXhr(body, _this.url, _this._headers, resolve, reject);
}
else {
sendWithBeacon(body, _this.url, { type: 'application/json' }, _onSuccess, _onError);
sendWithBeacon(body, _this.url, { type: 'application/json' }, resolve, reject);
}
});
})
.then(onSuccess, onError);
this._sendingPromises.push(promise);
var popPromise = function () {
var index = _this._sendingPromises.indexOf(promise);
_this._sendingPromises.splice(index, 1);
};
promise.then(popPromise, popPromise);
};

@@ -96,0 +89,0 @@ return CollectorExporterBrowserBase;

@@ -64,19 +64,12 @@ /*

var serviceRequest = this.convert(objects);
var promise = new Promise(function (resolve) {
var _onSuccess = function () {
onSuccess();
_onFinish();
};
var _onError = function (error) {
onError(error);
_onFinish();
};
var _onFinish = function () {
resolve();
var index = _this._sendingPromises.indexOf(promise);
_this._sendingPromises.splice(index, 1);
};
sendWithHttp(_this, JSON.stringify(serviceRequest), 'application/json', _onSuccess, _onError);
});
var promise = new Promise(function (resolve, reject) {
sendWithHttp(_this, JSON.stringify(serviceRequest), 'application/json', resolve, reject);
})
.then(onSuccess, onError);
this._sendingPromises.push(promise);
var popPromise = function () {
var index = _this._sendingPromises.indexOf(promise);
_this._sendingPromises.splice(index, 1);
};
promise.then(popPromise, popPromise);
};

@@ -83,0 +76,0 @@ CollectorExporterNodeBase.prototype.onShutdown = function () { };

@@ -56,24 +56,17 @@ "use strict";

const body = JSON.stringify(serviceRequest);
const promise = new Promise(resolve => {
const _onSuccess = () => {
onSuccess();
_onFinish();
};
const _onError = (error) => {
onError(error);
_onFinish();
};
const _onFinish = () => {
resolve();
const index = this._sendingPromises.indexOf(promise);
this._sendingPromises.splice(index, 1);
};
const promise = new Promise((resolve, reject) => {
if (this._useXHR) {
util_2.sendWithXhr(body, this.url, this._headers, _onSuccess, _onError);
util_2.sendWithXhr(body, this.url, this._headers, resolve, reject);
}
else {
util_2.sendWithBeacon(body, this.url, { type: 'application/json' }, _onSuccess, _onError);
util_2.sendWithBeacon(body, this.url, { type: 'application/json' }, resolve, reject);
}
});
})
.then(onSuccess, onError);
this._sendingPromises.push(promise);
const popPromise = () => {
const index = this._sendingPromises.indexOf(promise);
this._sendingPromises.splice(index, 1);
};
promise.then(popPromise, popPromise);
}

@@ -80,0 +73,0 @@ }

@@ -48,19 +48,12 @@ "use strict";

const serviceRequest = this.convert(objects);
const promise = new Promise(resolve => {
const _onSuccess = () => {
onSuccess();
_onFinish();
};
const _onError = (error) => {
onError(error);
_onFinish();
};
const _onFinish = () => {
resolve();
const index = this._sendingPromises.indexOf(promise);
this._sendingPromises.splice(index, 1);
};
util_2.sendWithHttp(this, JSON.stringify(serviceRequest), 'application/json', _onSuccess, _onError);
});
const promise = new Promise((resolve, reject) => {
util_2.sendWithHttp(this, JSON.stringify(serviceRequest), 'application/json', resolve, reject);
})
.then(onSuccess, onError);
this._sendingPromises.push(promise);
const popPromise = () => {
const index = this._sendingPromises.indexOf(promise);
this._sendingPromises.splice(index, 1);
};
promise.then(popPromise, popPromise);
}

@@ -67,0 +60,0 @@ onShutdown() { }

{
"name": "@opentelemetry/exporter-collector",
"version": "0.24.1-alpha.14+4553b29d",
"version": "0.24.1-alpha.15+90ea0fed",
"description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector",

@@ -88,8 +88,8 @@ "main": "build/src/index.js",

"@opentelemetry/api-metrics": "^0.24.0",
"@opentelemetry/core": "^0.24.1-alpha.14+4553b29d",
"@opentelemetry/resources": "^0.24.1-alpha.14+4553b29d",
"@opentelemetry/sdk-metrics-base": "^0.24.1-alpha.14+4553b29d",
"@opentelemetry/sdk-trace-base": "^0.24.1-alpha.14+4553b29d"
"@opentelemetry/core": "^0.24.0",
"@opentelemetry/resources": "^0.24.0",
"@opentelemetry/sdk-metrics-base": "^0.24.0",
"@opentelemetry/sdk-trace-base": "^0.24.0"
},
"gitHead": "4553b29d4a04b5b7e4bf87cad64dc2fc8c740d8e"
"gitHead": "90ea0fed52f406005550862f9b645803f89e36a9"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc