Repository navigation
ref(core): Drop unused and test-only internal exports - #26744
sentry-junior[bot] wants to merge 4 commits into
Conversation
Remove _INTERNAL_captureSerializedLog, _INTERNAL_captureSerializedMetric, _INTERNAL_captureMetric, INTERNAL_getSegmentSpan, _INTERNAL_getTunnelPaths, _INTERNAL_FLAG_BUFFER_SIZE and _INTERNAL_MAX_FLAGS_PER_SPAN from the public entry points. Nothing outside core uses them; the integration tests now inline the two feature flag constants. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
size-limit report 📦Compared: ad873af (PR test merge using develop at 2a131c9) Against: 2a131c9 (develop) · base run #67474 ✅ Baseline matches: this diff contains only this PR's changes.
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 6 not successful, 58 successful. See the run.
Successful checks
|
| getSpanDescendants, | ||
| getStatusMessage, | ||
| getRootSpan, | ||
| INTERNAL_getSegmentSpan, |
There was a problem hiding this comment.
no action required: I think the longterm plan should be to replace getRootSpan with getSegmentSpan. The INTERNAL_ prefix in this case was used to discourage users from using that API because in a streaming world, users shouldn't have to care about the segment span of a span. Not sure if this has aged well enough to keep that strong discouragement, so maybe a getSegmentSpan API is generally fine to have in v12.
|
|
What
Removes internal exports from
@sentry/corethat no other package uses:_INTERNAL_captureSerializedLog,_INTERNAL_captureSerializedMetric,_INTERNAL_captureMetric,INTERNAL_getSegmentSpan(from@sentry/core)_INTERNAL_getTunnelPaths(from@sentry/core/server)_INTERNAL_FLAG_BUFFER_SIZE,_INTERNAL_MAX_FLAGS_PER_SPAN(from@sentry/core), which were only imported by the browser and node feature flag integration testsWhy
This is the first step in cleaning up
_INTERNAL_-prefixed exports. These exports only add surface area. Each symbol is still exported from its own module, so core keeps using it internally.The two feature flag constants are now inlined in the integration tests (
100and10). If the SDK values change, those tests would fail and need updating, which is fine for test fixtures._INTERNAL_resetTunnelDefaultsis also test-only, but it's a function that tests in several packages call. It can't be inlined, so it stays for now.via @mydea.
--
View Session [Sentry]