Skip to content

Comments

ref(tracing): Don't track transaction sampling method#5775

Merged
AbhiPrasad merged 1 commit intomasterfrom
abhi-transaction-sampling-method
Sep 19, 2022
Merged

ref(tracing): Don't track transaction sampling method#5775
AbhiPrasad merged 1 commit intomasterfrom
abhi-transaction-sampling-method

Conversation

@AbhiPrasad
Copy link
Contributor

@AbhiPrasad AbhiPrasad commented Sep 19, 2022

In our initial work on Dynamic Sampling (#3068), we added the ability to track transaction sampling method.

https://github.com/getsentry/sentry-javascript/pull/3068/files#diff-337facb22f742f05b3326aed66ca6b0d5eb9c782c7c03c88ef0170fd97dc410dR104-R109

export enum TransactionSamplingMethod {
  Explicit = 'explicitly_set',
  Sampler = 'client_sampler',
  Rate = 'client_rate',
  Inheritance = 'inheritance',
}

To use this info, we set the transaction sampling method and sample rate on the transaction event header:

sample_rates: [{ id: samplingMethod, rate: sampleRate }],

In Relay this is used here: https://github.com/getsentry/relay/blob/4b16d279ccf21d3c1d975b652ffca01ebd72a500/relay-general/src/protocol/metrics.rs#L7-L16

This is no longer needed for dynamic sampling context with the introduction of Dynamic Sampling Context, so we can remove this code.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.47 KB (-0.21% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.16 KB (-0.18% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.06 KB (-0.23% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 53.08 KB (-0.21% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.85 KB (-0.2% 🔽)
@sentry/browser - Webpack (minified) 64.49 KB (-0.17% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.88 KB (-0.2% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.73 KB (-0.21% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.93 KB (-0.37% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.33 KB (-0.37% 🔽)

@AbhiPrasad AbhiPrasad self-assigned this Sep 19, 2022
@AbhiPrasad AbhiPrasad merged commit 4f8f07b into master Sep 19, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-transaction-sampling-method branch September 19, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants