sentry-native icon indicating copy to clipboard operation
sentry-native copied to clipboard

sample_rate not useful for crash report

Open NikoLXQ opened this issue 2 years ago • 2 comments

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

  • [ ] During build
  • [ ] During run-time
  • [ ] When capturing a hard crash

Environment

  • OS: [Windows 10, 64-bit]
  • Compiler: [MSVC 19]
  • CMake version and config: [SENTRY_BACKEND=inproc]

Steps To Reproduce

Log output

NikoLXQ avatar Sep 01 '23 07:09 NikoLXQ

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

supervacuus avatar Sep 11 '23 15:09 supervacuus

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.

markushi avatar Sep 14 '23 08:09 markushi

Native provides a specific on_crash hook which can be used to filter out crashes.

Closing this issue for now, but feel free to reopen if a crashes sample rate is still required.

JoshuaMoelans avatar Apr 17 '25 08:04 JoshuaMoelans