@grafana/faro-react
Version:
Faro package that enables easier integration in projects built with React.
39 lines • 1.78 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReactIntegration = void 0;
var faro_web_sdk_1 = require("@grafana/faro-web-sdk");
var dependencies_1 = require("./dependencies");
var router_1 = require("./router");
var ReactIntegration = /** @class */ (function (_super) {
__extends(ReactIntegration, _super);
function ReactIntegration(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this) || this;
_this.options = options;
_this.name = '@grafana/faro-react';
_this.version = faro_web_sdk_1.VERSION;
return _this;
}
ReactIntegration.prototype.initialize = function () {
(0, dependencies_1.setDependencies)(this.internalLogger, this.api);
(0, router_1.initializeReactRouterInstrumentation)(this.options);
};
return ReactIntegration;
}(faro_web_sdk_1.BaseInstrumentation));
exports.ReactIntegration = ReactIntegration;
//# sourceMappingURL=instrumentation.js.map
;