Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Add sampleRate config option #292

Merged
merged 2 commits into from
Mar 15, 2017
Merged

Add sampleRate config option #292

merged 2 commits into from
Mar 15, 2017

Conversation

LewisJEllis
Copy link
Contributor

Basically the same thing as getsentry/sentry-javascript#885

/cc @benvinegar @dcramer

@LewisJEllis LewisJEllis requested a review from benvinegar March 10, 2017 03:30
Copy link
Contributor

@benvinegar benvinegar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs test.

@LewisJEllis
Copy link
Contributor Author

Added tests. Feels kinda messy compared to the raven-js parallels with the nice sinon setup :/

Copy link
Contributor

@benvinegar benvinegar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍗

@benvinegar benvinegar merged commit 4fc592b into master Mar 15, 2017
@benvinegar benvinegar deleted the sample-rate branch March 15, 2017 23:41
@MarkHerhold
Copy link

MarkHerhold commented Mar 20, 2017

Sorry for the dumb question, but what is the use case for this?

@benvinegar
Copy link
Contributor

@MarkHerhold – This is analogous to rate-limiting, except the rate-limiting occurs on the client, not the server. This has the upside of sending less traffic to sentry.io ($) / your own Sentry server at the expense of losing data.

Sampling is often necessary for very high traffic applications.

@MarkHerhold
Copy link

MarkHerhold commented Mar 20, 2017

Ah, so this would be for applications that are utilizing Sentry more like a logging service rather than an error tracker?

@benvinegar
Copy link
Contributor

benvinegar commented Mar 20, 2017

It's more like – if you have 1 million active users, and they all hit the same error, do you really need 1 million error reports to be sent? Probably not.

So, if you have an app with a really huge active user count, you can probably safely suppress a fraction of error reports using sampleRate to save bandwidth, $, etc. This is 100% at the discretion of the application author; it is not enabled by default.

@MarkHerhold
Copy link

Got it, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants