in src/monitor.ts [131:199]
validateOptions() {
const {
collector,
service,
pagePath,
serviceVersion,
jsErrors,
apiErrors,
resourceErrors,
autoTracePerf,
useWebVitals,
enableSPA,
traceSDKInternal,
detailMode,
noTraceOrigins,
traceTimeInterval,
customTags,
vue,
} = this.customOptions;
this.validateTags(customTags);
if (typeof collector !== 'string') {
this.customOptions.collector = location.origin;
}
if (typeof service !== 'string') {
this.customOptions.service = '';
}
if (typeof pagePath !== 'string') {
this.customOptions.pagePath = '';
}
if (typeof serviceVersion !== 'string') {
this.customOptions.serviceVersion = '';
}
if (typeof jsErrors !== 'boolean') {
this.customOptions.jsErrors = true;
}
if (typeof apiErrors !== 'boolean') {
this.customOptions.apiErrors = true;
}
if (typeof resourceErrors !== 'boolean') {
this.customOptions.resourceErrors = true;
}
if (typeof autoTracePerf !== 'boolean') {
this.customOptions.autoTracePerf = true;
}
if (typeof useWebVitals !== 'boolean') {
this.customOptions.useWebVitals = false;
}
if (typeof enableSPA !== 'boolean') {
this.customOptions.enableSPA = false;
}
if (typeof traceSDKInternal !== 'boolean') {
this.customOptions.traceSDKInternal = false;
}
if (typeof detailMode !== 'boolean') {
this.customOptions.detailMode = true;
}
if (typeof detailMode !== 'boolean') {
this.customOptions.detailMode = true;
}
if (!Array.isArray(noTraceOrigins)) {
this.customOptions.noTraceOrigins = [];
}
if (typeof traceTimeInterval !== 'number') {
this.customOptions.traceTimeInterval = 60000;
}
if (typeof vue !== 'function') {
this.customOptions.vue = undefined;
}
},