(WIP) feat(client-reports): report log and metric byte outcomes - #1927
Draft
JoshuaMoelans wants to merge 1 commit into
Draft
(WIP) feat(client-reports): report log and metric byte outcomes#1927JoshuaMoelans wants to merge 1 commit into
JoshuaMoelans wants to merge 1 commit into
Conversation
Record the byte size of discarded logs and metrics under the `log_byte` and `trace_metric_byte` categories, alongside the existing `log_item` and `trace_metric` counts, as required by https://develop.sentry.dev/sdk/telemetry/client-reports/#log-byte-outcomes Byte sizes come from the serialized payload where an item is already serialized, and from a new allocation-free `sentry_value_t` size estimator on the `before_send_log` / `before_send_metric` and batcher overflow paths. The hooks take ownership of the value, so it is sized before the call. This also fixes the item count for batched envelope items: discarding a `log` or `trace_metric` item now reports every log in the batch via its `item_count` header instead of counting the whole item as one discard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- report log and metric byte outcomes ([#1927](https://github.com/getsentry/sentry-native/pull/1927))If none of the above apply, you can opt out of this check by adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Record the byte size of discarded logs and metrics under the
log_byteandtrace_metric_bytecategories, alongside the existinglog_itemandtrace_metriccounts, as required byhttps://develop.sentry.dev/sdk/telemetry/client-reports/#log-byte-outcomes
Byte sizes come from the serialized payload where an item is already serialized, and from a new allocation-free
sentry_value_tsize estimator on thebefore_send_log/before_send_metricand batcher overflow paths. The hooks take ownership of the value, so it is sized before the call.This also fixes the item count for batched envelope items: discarding a
logortrace_metricitem now reports every log in the batch via itsitem_countheader instead of counting the whole item as one discard.Following https://develop.sentry.dev/sdk/telemetry/client-reports/#log-byte-outcomes