raven
Advanced tools
Comparing version 1.1.5 to 1.2.0
@@ -0,1 +1,4 @@ | ||
# 1.2.0 - 3/16/2017 | ||
- Add sampleRate config option [See #292] | ||
# 1.1.5 - 3/16/2017 | ||
@@ -2,0 +5,0 @@ - Fix memory leak in http autoBreadcrumb instrumentation [See #296] |
@@ -79,2 +79,3 @@ 'use strict'; | ||
this.shouldSendCallback = options.shouldSendCallback; | ||
this.sampleRate = typeof options.sampleRate === 'undefined' ? 1 : options.sampleRate; | ||
this.parseUser = options.parseUser; | ||
@@ -192,2 +193,3 @@ | ||
if (this.shouldSendCallback && !this.shouldSendCallback(kwargs)) shouldSend = false; | ||
if (Math.random() >= this.sampleRate) shouldSend = false; | ||
@@ -198,2 +200,3 @@ if (shouldSend) { | ||
// wish there was a good way to communicate to cb why we didn't send; worth considering cb api change? | ||
// could be shouldSendCallback, could be disabled, could be sample rate | ||
// avoiding setImmediate here because node 0.8 | ||
@@ -200,0 +203,0 @@ cb && setTimeout(function () { |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"repository": "git://github.com/getsentry/raven-node.git", | ||
@@ -15,0 +15,0 @@ "author": "Matt Robenolt <matt@ydekproductions.com>", |
Sorry, the diff of this file is not supported yet
367343
1487