Loading...
(function(){<br />
let canvas = document.createElement('canvas'),<br />
ctx = canvas.getContext('2d'),<br />
w = canvas.width = innerWidth,<br />
h = canvas.height = innerHeight,<br />
particles = [],<br />
properties = {<br />
bgColor : 'rgba(17, 17, 19, 1)',<br />
particleColor : 'rgba(255, 40, 40, 1)',<br />
particleRadius : 3,<br />
particleCount : 60,<br />
particleMaxVelocity : 0.5,<br />
lineLength : 150,<br />
particleLife : 6,<br />
};<br />
<br />
document.querySelector('body').appendChild(canvas);<br />
<br />
window.onresize = function() {<br />
w = canvas.width = innerWidth;<br />
h = canvas.height = innerHeight;<br />
}<br />
<br />
class Particle {<br />
constructor() {<br />
this.x = Math.random()*w;<br />Loading...
The number of transactions captured by Sentry is controlled by the tracesSampleRate configuration option. It accepts values from 0 to 1.
For example, a value of 0.01 means that only 1% of all transactions in the traffic stream will be sampled.
Documentation:
https://docs.sentry.io/platforms/javascript/configuration/sampling/#setting-a-uniform-sample-rate
1Sentry.init({2 dsn: '',3 tracesSampleRate: 0.01,4});
For more granular transaction filtering, you can use tracesSampler.
1Sentry.init({2 <span class="comment">// ...</span>34 tracesSampler: samplingContext => {5 <span class="comment">// Examine provided context data (including parent decision, if any) along</span>6 <span class="comment">// with anything in the global namespace to compute the sample rate or</span>7 <span class="comment">// sampling decision for this transaction</span>89 if ("...") {10 <span class="comment">// These are important - take a big sample</span>11 return 1;12 } else if ("...") {13 <span class="comment">// These are less important or happen much more frequently - only take 1%</span>14 return 0.01;15 } else if ("...") {16 <span class="comment">// These aren't something worth tracking - drop all transactions like this</span>17 return 0;18 } else {19 <span class="comment">// Default sample rate</span>20 return 0.5;21 }22 };23});