New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@grafana/faro-instrumentation-performance-timeline

Package Overview
Dependencies
Maintainers
22
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grafana/faro-instrumentation-performance-timeline - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

2

dist/bundle/faro-instrumentation-performance-timeline.iife.js

@@ -1,1 +0,1 @@

var GrafanaFaroInstrumentationPerformanceTimeline=function(e){"use strict";function r(e,r){return typeof e===r}const t=e=>!(e=>r(e,"null"))(e)&&r(e,"object"),n=e=>function(e,r){return Object.prototype.toString.call(e)===`[object ${r}]`}(e,"Array");var o;function i(){}!function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.LOG="log",e.WARN="warn",e.ERROR="error"}(o||(o={})),o.LOG,o.TRACE,o.DEBUG,o.INFO,o.LOG,o.WARN,o.ERROR;var s={exports:{}},a={exports:{}};a.exports=function(e,r){var t,n,o,i,s,a,c,f;for(t=3&e.length,n=e.length-t,o=r,s=3432918353,a=461845907,f=0;f<n;)c=255&e.charCodeAt(f)|(255&e.charCodeAt(++f))<<8|(255&e.charCodeAt(++f))<<16|(255&e.charCodeAt(++f))<<24,++f,o=27492+(65535&(i=5*(65535&(o=(o^=c=(65535&(c=(c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295)<<15|c>>>17))*a+(((c>>>16)*a&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(c=0,t){case 3:c^=(255&e.charCodeAt(f+2))<<16;case 2:c^=(255&e.charCodeAt(f+1))<<8;case 1:o^=c=(65535&(c=(c=(65535&(c^=255&e.charCodeAt(f)))*s+(((c>>>16)*s&65535)<<16)&4294967295)<<15|c>>>17))*a+(((c>>>16)*a&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0};var c=a.exports,f={exports:{}};!function(e){e.exports=function(e,r){for(var t,n=e.length,o=r^n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:o^=(255&e.charCodeAt(i+2))<<16;case 2:o^=(255&e.charCodeAt(i+1))<<8;case 1:o=1540483477*(65535&(o^=255&e.charCodeAt(i)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0}}(f);var u,l,h=c,g=f.exports;s.exports=h,s.exports.murmur3=h,s.exports.murmur2=g,function(e){e.EXCEPTION="exception",e.LOG="log",e.MEASUREMENT="measurement",e.TRACE="trace",e.EVENT="event"}(u||(u={})),u.EXCEPTION,u.LOG,u.MEASUREMENT,u.TRACE,u.EVENT,function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.VERBOSE=4]="VERBOSE"}(l||(l={}));const p={debug:i,error:i,info:i,prefix:"Faro",warn:i};l.ERROR;const d=Object.assign({},console);class m{constructor(){this.unpatchedConsole=d,this.internalLogger=p,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}}class v extends m{constructor(){super(...arguments),this.api={},this.transports={}}}const E=[{type:"navigation",buffered:!0},{type:"resource",buffered:!0}];return e.DEFAULT_PERFORMANCE_TIMELINE_ENTRY_TYPES=E,e.PerformanceTimelineInstrumentation=class extends v{constructor(e){var r,t,n;super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-performance-timeline",this.version="1.2.3",this.resourceTimingBufferSize=null!==(r=null==e?void 0:e.resourceTimingBufferSize)&&void 0!==r?r:250,this.maxResourceTimingBufferSize=null!==(t=null==e?void 0:e.maxResourceTimingBufferSize)&&void 0!==t?t:500,this.observeEntryTypes=null!==(n=null==e?void 0:e.observeEntryTypes)&&void 0!==n?n:E}initialize(){"PerformanceObserver"in window?(this.validateIfObservedEntryTypesSupportedByBrowser(),this.setIgnoredUrls(),this.configureResourceTimingBuffer(),this.registerPerformanceObserver(),this.observe()):this.internalLogger.info("Browser does not support PerformanceObserver, stopping initialization of PerformanceTimelineInstrumentation")}validateIfObservedEntryTypesSupportedByBrowser(){const e=[];for(const r of this.observeEntryTypes)PerformanceObserver.supportedEntryTypes.includes(r.type)||e.push(r.type);e.length>0&&(this.observeEntryTypes=this.observeEntryTypes.filter((r=>!e.includes(r.type))),this.internalLogger.info(`The following entryTypes are not supported by this browser: ${e}. Observing only supported entryTypes which are: ${this.observeEntryTypes.map((({type:e})=>e))}`))}setIgnoredUrls(){var e,r;this.ignoredUrls=null!==(r=null===(e=this.options)||void 0===e?void 0:e.ignoredUrls)&&void 0!==r?r:this.getIgnoreUrls()}configureResourceTimingBuffer(){performance.setResourceTimingBufferSize(this.resourceTimingBufferSize),performance.addEventListener("resourcetimingbufferfull",(()=>{this.internalLogger.info(`Resource Timing Buffer is full! Increasing buffer size to ${this.maxResourceTimingBufferSize}.`),performance.setResourceTimingBufferSize(this.maxResourceTimingBufferSize)}))}registerPerformanceObserver(){this.observer=new PerformanceObserver(this.handlePerformanceEntry.bind(this))}handlePerformanceEntry(e,r,t=0){var n,o;for(const r of e.getEntries()){if(null===(n=this.ignoredUrls)||void 0===n?void 0:n.some((e=>null!=r.name.match(e)))){this.internalLogger.info("Drop performance entry because it matches one of the ignored URLs");continue}let e=r.toJSON();if("function"==typeof(null===(o=this.options)||void 0===o?void 0:o.beforeEmit)){const r=this.options.beforeEmit(e);if(!1===r){this.internalLogger.info("Performance entry dropped because beforeEmit returned false.");continue}e=r}this.api.pushEvent("faro.performanceEntry",this.objectValuesToString(e))}t>0&&this.internalLogger.warn(`${t} entries got dropped due to the browser buffer being full.`)}observe(){var e;null===(e=this.observeEntryTypes)||void 0===e||e.forEach((e=>{var r;null===(r=this.observer)||void 0===r||r.observe(e)}))}getIgnoreUrls(){var e;return null===(e=this.transports.transports)||void 0===e?void 0:e.flatMap((e=>e.getIgnoreUrls()))}objectValuesToString(e={}){const r={};for(const[o,i]of Object.entries(e))n(i)?r[o]=0===i.length?JSON.stringify(i):i.map((e=>this.objectValuesToString(e))).toString():t(i)?r[o]=this.objectValuesToString():r[o]=i.toString();return r}},e}({});
var GrafanaFaroInstrumentationPerformanceTimeline=function(e){"use strict";function r(e,r){return typeof e===r}const n=e=>!(e=>r(e,"null"))(e)&&r(e,"object"),t=e=>function(e,r){return Object.prototype.toString.call(e)===`[object ${r}]`}(e,"Array");function i(){}var o;!function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.VERBOSE=4]="VERBOSE"}(o||(o={}));const s={debug:i,error:i,info:i,prefix:"Faro",warn:i};o.ERROR;const a=Object.assign({},console);class f{constructor(){this.unpatchedConsole=a,this.internalLogger=s,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}}class u extends f{constructor(){super(...arguments),this.api={},this.transports={}}}const l=[{type:"navigation",buffered:!0},{type:"resource",buffered:!0}];return e.DEFAULT_PERFORMANCE_TIMELINE_ENTRY_TYPES=l,e.PerformanceTimelineInstrumentation=class extends u{constructor(e){var r,n,t;super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-performance-timeline",this.version="1.2.4",this.resourceTimingBufferSize=null!==(r=null==e?void 0:e.resourceTimingBufferSize)&&void 0!==r?r:250,this.maxResourceTimingBufferSize=null!==(n=null==e?void 0:e.maxResourceTimingBufferSize)&&void 0!==n?n:500,this.observeEntryTypes=null!==(t=null==e?void 0:e.observeEntryTypes)&&void 0!==t?t:l}initialize(){"PerformanceObserver"in window?(this.validateIfObservedEntryTypesSupportedByBrowser(),this.setIgnoredUrls(),this.configureResourceTimingBuffer(),this.registerPerformanceObserver(),this.observe()):this.internalLogger.info("Browser does not support PerformanceObserver, stopping initialization of PerformanceTimelineInstrumentation")}validateIfObservedEntryTypesSupportedByBrowser(){const e=[];for(const r of this.observeEntryTypes)PerformanceObserver.supportedEntryTypes.includes(r.type)||e.push(r.type);e.length>0&&(this.observeEntryTypes=this.observeEntryTypes.filter((r=>!e.includes(r.type))),this.internalLogger.info(`The following entryTypes are not supported by this browser: ${e}. Observing only supported entryTypes which are: ${this.observeEntryTypes.map((({type:e})=>e))}`))}setIgnoredUrls(){var e,r;this.ignoredUrls=null!==(r=null===(e=this.options)||void 0===e?void 0:e.ignoredUrls)&&void 0!==r?r:this.getIgnoreUrls()}configureResourceTimingBuffer(){performance.setResourceTimingBufferSize(this.resourceTimingBufferSize),performance.addEventListener("resourcetimingbufferfull",(()=>{this.internalLogger.info(`Resource Timing Buffer is full! Increasing buffer size to ${this.maxResourceTimingBufferSize}.`),performance.setResourceTimingBufferSize(this.maxResourceTimingBufferSize)}))}registerPerformanceObserver(){this.observer=new PerformanceObserver(this.handlePerformanceEntry.bind(this))}handlePerformanceEntry(e,r,n=0){var t,i;for(const r of e.getEntries()){if(null===(t=this.ignoredUrls)||void 0===t?void 0:t.some((e=>null!=r.name.match(e)))){this.internalLogger.info("Drop performance entry because it matches one of the ignored URLs");continue}let e=r.toJSON();if("function"==typeof(null===(i=this.options)||void 0===i?void 0:i.beforeEmit)){const r=this.options.beforeEmit(e);if(!1===r){this.internalLogger.info("Performance entry dropped because beforeEmit returned false.");continue}e=r}this.api.pushEvent("faro.performanceEntry",this.objectValuesToString(e))}n>0&&this.internalLogger.warn(`${n} entries got dropped due to the browser buffer being full.`)}observe(){var e;null===(e=this.observeEntryTypes)||void 0===e||e.forEach((e=>{var r;null===(r=this.observer)||void 0===r||r.observe(e)}))}getIgnoreUrls(){var e;return null===(e=this.transports.transports)||void 0===e?void 0:e.flatMap((e=>e.getIgnoreUrls()))}objectValuesToString(e={}){const r={};for(const[i,o]of Object.entries(e))t(o)?r[i]=0===o.length?JSON.stringify(o):o.map((e=>this.objectValuesToString(e))).toString():n(o)?r[i]=this.objectValuesToString():r[i]=o.toString();return r}},e}({});

@@ -17,3 +17,3 @@ import { BaseInstrumentation } from '@grafana/faro-core';

readonly name = "@grafana/faro-web-sdk:instrumentation-performance-timeline";
readonly version = "1.2.3";
readonly version = "1.2.4";
private resourceTimingBufferSize;

@@ -20,0 +20,0 @@ private maxResourceTimingBufferSize;

@@ -17,3 +17,3 @@ import { BaseInstrumentation } from '@grafana/faro-core';

readonly name = "@grafana/faro-web-sdk:instrumentation-performance-timeline";
readonly version = "1.2.3";
readonly version = "1.2.4";
private resourceTimingBufferSize;

@@ -20,0 +20,0 @@ private maxResourceTimingBufferSize;

{
"name": "@grafana/faro-instrumentation-performance-timeline",
"version": "1.2.3",
"version": "1.2.4",
"description": "Faro instrumentation to capture Browser Performance Timeline data.",

@@ -53,3 +53,3 @@ "keywords": [

"devDependencies": {
"@grafana/faro-core": "^1.2.3"
"@grafana/faro-core": "^1.2.4"
},

@@ -59,3 +59,3 @@ "publishConfig": {

},
"gitHead": "e15cdf130a4400c4e4f8d597b58a2dc7d488522a"
"gitHead": "72cda534dc953ddaa37a0192ef956ac6ea505962"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc