UNPKG

@grafana/faro-web-sdk

Version:

Faro instrumentations, metas, transports for web.

28 lines 1.29 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(), ]; 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({ disabledLevels: options.captureConsoleDisabledLevels, })); } return instrumentations; } //# sourceMappingURL=getWebInstrumentations.js.map