getsentry / team-sdks

A meta repository for tracking work across all SDK teams.
0 stars 0 forks source link

enableTracing difference sampleRate #103

Closed mehmettevfiksahin closed 1 month ago

mehmettevfiksahin commented 1 year ago

Core or SDK?

Core Sentry product

Which part? Which one?

Configuration/Basic Options

Description

There is no obvious difference between the two. I don't understand, they seem to do the same job

Suggested Solution

Could be written more clearly

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 year ago

Routing to @getsentry/product-owners-docs for triage ⏲️

stephanie-anderson commented 1 year ago

Hey Mehmet, thanks for opening this issue!

enableTracing is a boolean value and activates or deactivates performance monitoring for your SDK. The config option sampleRate belongs to the error monitoring feature and regulates the percentage of errors being sent to Sentry.

However, if you meant the difference between enableTracing and tracesSampleRate (instead of sampleRate), then enableTracing will simply set tracesSampleRate internally to 1.0 (meaning 100% of transactions are sent to Sentry). If you have both options in your config, then enableTracing will be ignored and the value of tracesSampleRate will be taken instead.

FYI: We're currently restructuring our documentation around config options, which will also bring more clarity on what config options belong to which feature of Sentry