feat(sentry-core): Implement trace metric capture batching#1026
Draft
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/metrics-protocolfrom
Draft
feat(sentry-core): Implement trace metric capture batching#1026szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/metrics-protocolfrom
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/metrics-protocolfrom
Conversation
Implement issue #1023 by adding the `sentry-core` capture path and batch lifecycle for `TraceMetric`. - Add `metrics` feature in `sentry-core/Cargo.toml` - Compile `batcher` for `client + (logs|metrics)` - Add `ClientOptions::enable_metrics` (default: `true`) and include it in `Debug` - Add `Hub::capture_metric(TraceMetric)` - Add `Client` metric capture with `metrics_batcher` lifecycle handling (`clone`/`flush`/`close`) - Add `Batch` impl for `TraceMetric` in `batcher` - Add metrics tests for disabled metrics, batch-size flush (150 -> 2 envelopes), and teardown flush Closes #1023 Closes [RUST-168](https://linear.app/getsentry/issue/RUST-168/implement-trace-metric-capture-and-batching-in-sentry-core) Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Implement trace metric capture batching ([#1026](https://github.com/getsentry/sentry-rust/pull/1026))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.
Implement issue #1023 by adding the
sentry-corecapture path and batch lifecycle forTraceMetric.metricsfeature insentry-core/Cargo.tomlbatcherforclient + (logs|metrics)ClientOptions::enable_metrics(default:true) and include it inDebugHub::capture_metric(TraceMetric)Clientmetric capture withmetrics_batcherlifecycle handling (clone/flush/close)Batchimpl forTraceMetricinbatcherCloses #1023
Closes RUST-168
Co-authored-by: Joris Bayer joris.bayer@sentry.io