getsentry / sentry-native

Sentry SDK for C, C++ and native applications.
MIT License
399 stars 169 forks source link

sample_rate not useful for crash report #879

Open NikoLXQ opened 1 year ago

NikoLXQ commented 1 year ago

Description

The Sentry options, set the sample rate value. it only using in sentry_capture_event(). not useful for crash auto catch and report. it's difference with ios (sentry-cocoa).

When does the problem happen

Environment

Steps To Reproduce

Log output

supervacuus commented 1 year ago

Hi @NikoLXQ! I am unaware of how other SDKs apply the sample rate to crashes. That is a sensible feature if it can be configured correctly. I also don't know why it wasn't introduced yet. I will discuss this with the team.

CC: @kahest, @markushi, @bitsandfoxes, @Swatinem

markushi commented 1 year ago

Our dev docs mentions the reasoning behind having a sample_rate here: https://develop.sentry.dev/sdk/features/#event-sampling I agree this feels like a sledgehammer solution, but for more fine grained control we already offer e.g. the sentry_options_set_before_send() hook.