diff --git a/CHANGELOG.md b/CHANGELOG.md index 52101f5fc367..8b0a68bbff64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - [node] feat: Transactions handling for RequestHandler in Express/Hapi - [node] feat: Allow requestHandler to be configured - [node] feat: Make node transactions a pluggable integration with tests +- [core] feat: getRequestheaders should handle legacy DSNs +- [core] fix: correct sampleRate behaviour ## 4.0.6 diff --git a/packages/core/src/baseclient.ts b/packages/core/src/baseclient.ts index dd1de3a74f82..a2baab18ca5b 100644 --- a/packages/core/src/baseclient.ts +++ b/packages/core/src/baseclient.ts @@ -347,7 +347,9 @@ export abstract class BaseClient implement const { beforeSend, sampleRate } = this.getOptions(); - if (typeof sampleRate === 'number' && sampleRate > Math.random()) { + // 1.0 === 100% events are sent + // 0.0 === 0% events are sent + if (typeof sampleRate === 'number' && Math.random() > sampleRate) { return { status: Status.Skipped, };