@binance/sentry-miniapp
Version:
28 lines • 1.04 kB
JavaScript
import { API, initAPIDetails } from "@sentry/core";
import { SentryError, makePromiseBuffer } from "@sentry/utils";
/** Base Transport class implementation */
var BaseTransport = /** @class */ (function () {
function BaseTransport(options) {
this.options = options;
/** A simple buffer holding all requests. */
this._buffer = makePromiseBuffer(30);
this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();
this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);
// this.sessionUrl = new API(this.options.dsn).getStoreEndpoint
}
/**
* @inheritDoc
*/
BaseTransport.prototype.sendEvent = function (_) {
throw new SentryError("Transport Class has to implement `sendEvent` method");
};
/**
* @inheritDoc
*/
BaseTransport.prototype.close = function (timeout) {
return this._buffer.drain(timeout);
};
return BaseTransport;
}());
export { BaseTransport };
//# sourceMappingURL=base.js.map