Implement the core metric capture path in sentry-core so captured metrics are buffered and sent as trace_metric envelope items, with an explicit enable_metrics option for fast disable behavior. This should cover feature flags and metric capture in Hub/Client, plus batcher integration and flush behavior, aligned with the metrics processing pipeline and buffering.
Scope
Apply the relevant logic from #997 where useful, focused on sentry-core/Cargo.toml, sentry-core/src/lib.rs, sentry-core/src/clientoptions.rs, sentry-core/src/hub.rs, sentry-core/src/client.rs, and sentry-core/src/batcher.rs. Include tests for disabled metrics, batch-size flushing, and flush on teardown. If code is reused from #997, include Co-authored-by: Joris Bayer <joris.bayer@sentry.io> in commit trailers.
Implement the core metric capture path in
sentry-coreso captured metrics are buffered and sent astrace_metricenvelope items, with an explicitenable_metricsoption for fast disable behavior. This should cover feature flags and metric capture inHub/Client, plus batcher integration and flush behavior, aligned with the metrics processing pipeline and buffering.Scope
Apply the relevant logic from #997 where useful, focused on
sentry-core/Cargo.toml,sentry-core/src/lib.rs,sentry-core/src/clientoptions.rs,sentry-core/src/hub.rs,sentry-core/src/client.rs, andsentry-core/src/batcher.rs. Include tests for disabled metrics, batch-size flushing, and flush on teardown. If code is reused from #997, includeCo-authored-by: Joris Bayer <joris.bayer@sentry.io>in commit trailers.