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

Add Client Reports to the native SDK

Open JoshuaMoelans opened this issue 10 months ago • 1 comments

These allow users to see stats about the events that never got to Sentry, caused by a multitude of reasons (e.g. breadcrumb buffer overflow, sample rate discarding, before_send filtering, internal errors, ...).

This feature is described in detail on the following develop docs page: https://develop.sentry.dev/sdk/telemetry/client-reports/

We can take inspiration from the Java/Android SDK https://github.com/getsentry/sentry-java/issues/1894 (or the other SDKs mentioned on the linked issue)

JoshuaMoelans avatar Apr 29 '25 09:04 JoshuaMoelans

On top of the historical data we should collect, for the new Logs product we should also collect the following:

  • SDK must count each dropped log.
  • SDK must calculate the size of each dropped log.
  • SDK must emit both values as client outcomes.
  • precise byte counting is not required; an approximate size is sufficient because:
    • Dropped logs are not billable.
    • sufficient to provide a rough overview to users (count + approximate size)

We already have a TODO in our logs.c code.

Related Linear ticket

JoshuaMoelans avatar Nov 18 '25 13:11 JoshuaMoelans