You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6411611
Browse filesBrowse the repository at this point in the historyBrowse files
Hoist PerformanceLogger primitives out of react-native (#56580)
Summary:
Pull Request resolved: #56580
Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.
## Context
The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.
## Changes
Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) stays as a public type in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file.
Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` keeps its 2-arg signature, and the `'GlobalPerformanceLogger'` callable native module is still registered. Both now point at a shared no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging deprecation.
- `Libraries/Core/InitializeCore.js` is stripped of the `initializeCore_*` markPoints; everything else (the call into `setUpDefaultReactNativeEnvironment`) is unchanged.
## Impact
Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.
Reviewed By: javache
Differential Revision: D102166537
fbshipit-source-id: 241ca7e7fb48d6a9d7afe4c30bb7bd370f8a6bb8
0 commit comments