sentry-native
sentry-native copied to clipboard
Add Client Reports to the native SDK
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)
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.