UNPKG

@grafana/faro-web-sdk

Version:

Faro instrumentations, metas, transports for web.

27 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getWebInstrumentations = getWebInstrumentations; var instrumentations_1 = require("../instrumentations"); function getWebInstrumentations(options) { if (options === void 0) { options = {}; } var instrumentations = [ new instrumentations_1.UserActionInstrumentation(), new instrumentations_1.ErrorsInstrumentation(), new instrumentations_1.WebVitalsInstrumentation(), new instrumentations_1.SessionInstrumentation(), new instrumentations_1.ViewInstrumentation(), new instrumentations_1.NavigationInstrumentation(), ]; if (options.enablePerformanceInstrumentation !== false) { // unshift to ensure that initialization starts before the other instrumentations instrumentations.unshift(new instrumentations_1.PerformanceInstrumentation()); } if (options.enableContentSecurityPolicyInstrumentation !== false) { instrumentations.push(new instrumentations_1.CSPInstrumentation()); } if (options.captureConsole !== false) { instrumentations.push(new instrumentations_1.ConsoleInstrumentation()); } return instrumentations; } //# sourceMappingURL=getWebInstrumentations.js.map