Skip to content

Conversation

@philipphofmann
Copy link
Member

This PR renames the generic buffering infrastructure from Batcher to TelemetryBuffer.

This is the second step for #7210.

Changes

  • Renamed Tools/BatcherTools/TelemetryBuffer folder
  • Renamed all Batcher infrastructure classes/protocols:
    • BatcherProtocolTelemetryBufferProtocol
    • BatcherConfigTelemetryBufferConfig
    • BatcherItemTelemetryBufferItem
    • BatcherScopeTelemetryBufferScope
    • BatcherMetadataTelemetryBufferMetadata
    • InternalBufferInternalTelemetryBuffer
    • InMemoryInternalBufferInMemoryInternalTelemetryBuffer
  • Renamed SentryMetricsBufferSentryMetricsTelemetryBuffer
  • Renamed SentryMetricsBufferProtocolSentryMetricsTelemetryBufferProtocol
  • Renamed SentryMetricsBufferOptionsProtocolSentryMetricsTelemetryBufferOptionsProtocol
  • Updated all references, comments, and test files
  • Preserved SentryLogBatcher class name (will be renamed in an upcoming PR)

Notes

#skip-changelog

First step for #7210. More class renames coming in follow-up PRs.
Renames the generic buffering infrastructure from Batcher to
TelemetryBuffer to better reflect its purpose and avoid confusion
with the SentryMetricsBatcher (now SentryMetricsTelemetryBuffer).

Changes:
- Renamed Tools/Batcher folder to Tools/TelemetryBuffer
- Renamed all Batcher* classes to TelemetryBuffer*:
  - BatcherProtocol -> TelemetryBufferProtocol
  - BatcherConfig -> TelemetryBufferConfig
  - BatcherItem -> TelemetryBufferItem
  - BatcherScope -> TelemetryBufferScope
  - BatcherMetadata -> TelemetryBufferMetadata
  - InternalBuffer -> InternalTelemetryBuffer
  - InMemoryInternalBuffer -> InMemoryInternalTelemetryBuffer
- Renamed SentryMetricsBuffer to SentryMetricsTelemetryBuffer
- Updated all references and comments
- Updated all test files accordingly

The SentryLogBatcher class name will be renamed in an upcoming PR.
@philipphofmann philipphofmann marked this pull request as ready for review January 20, 2026 09:30
@philipphofmann philipphofmann added the ready-to-merge Use this label to trigger all PR workflows label Jan 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.099%. Comparing base (d540ef3) to head (6601fb5).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7220       +/-   ##
=============================================
- Coverage   85.452%   85.099%   -0.353%     
=============================================
  Files          468       468               
  Lines        28348     28348               
  Branches     12527     12534        +7     
=============================================
- Hits         24224     24124      -100     
- Misses        3865      4182      +317     
+ Partials       259        42      -217     
Files with missing lines Coverage Δ
.../Swift/Integrations/Metrics/SentryMetricsApi.swift 100.000% <100.000%> (ø)
...ift/Integrations/Metrics/SentryMetricsBuffer.swift 100.000% <100.000%> (ø)
...ntegrations/Metrics/SentryMetricsIntegration.swift 100.000% <100.000%> (ø)
Sources/Swift/Protocol/SentryMetric.swift 100.000% <ø> (ø)
Sources/Swift/Tools/SentryLogBatcher.swift 95.918% <100.000%> (ø)
...emetryBuffer/InMemoryInternalTelemetryBuffer.swift 100.000% <ø> (ø)
.../Swift/Tools/TelemetryBuffer/TelemetryBuffer.swift 98.148% <ø> (ø)
...t/Tools/TelemetryBuffer/TelemetryBufferScope.swift 100.000% <100.000%> (ø)

... and 57 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d540ef3...6601fb5. Read the comment docs.

Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1232.43 ms 1260.31 ms 27.89 ms
Size 24.14 KiB 1.06 MiB 1.04 MiB

Baseline results on branch: ref/rename-metrics-batcher-to-buffer

Startup times

Revision Plain With Sentry Diff
e9baefa 1206.31 ms 1241.08 ms 34.77 ms

App size

Revision Plain With Sentry Diff
e9baefa 24.14 KiB 1.06 MiB 1.04 MiB

Base automatically changed from ref/rename-metrics-batcher-to-buffer to main January 20, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants