This is the refactor-only part of #997: move the batching mechanism out of logs-specific code so metrics can reuse it, while keeping logs behavior unchanged.
Scope from #997
Details
The extracted change should preserve existing enqueue/flush semantics (size-based flush, timed flush, shutdown flush) and not introduce metrics capture yet. In practice, this should be reviewable as an internal refactor where logs tests still prove behavior, either by keeping existing tests or moving equivalent coverage into the new batcher module.
This is the refactor-only part of #997: move the batching mechanism out of logs-specific code so metrics can reuse it, while keeping logs behavior unchanged.
Scope from #997
sentry-core/src/batcher.rs(new generic batcher)sentry-core/src/logs.rs(remove old logs-only batcher)sentry-core/src/client.rs(logs integration only: swap to generic batcher)sentry-core/src/lib.rs(module updates needed for the refactor)Details
The extracted change should preserve existing enqueue/flush semantics (size-based flush, timed flush, shutdown flush) and not introduce metrics capture yet. In practice, this should be reviewable as an internal refactor where logs tests still prove behavior, either by keeping existing tests or moving equivalent coverage into the new batcher module.