Hoist PerformanceLogger primitives out of react-native (#56580)#56580
Open
rubennorte wants to merge 1 commit intofacebook:mainfrom
Open
Hoist PerformanceLogger primitives out of react-native (#56580)#56580rubennorte wants to merge 1 commit intofacebook:mainfrom
PerformanceLogger primitives out of react-native (#56580)#56580rubennorte wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102166537. |
PerformanceLogger primitives out of react-nativePerformanceLogger primitives out of react-native (#56580)
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…56580) Summary: Pull Request resolved: facebook#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) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it. 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(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it. ## Impact Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface. Differential Revision: D102166537
5caa104 to
a169ceb
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…56580) Summary: Pull Request resolved: facebook#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) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it. 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(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it. ## Impact Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface. Differential Revision: D102166537
787e771 to
214d841
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…56580) Summary: Pull Request resolved: facebook#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) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it. 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(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it. ## Impact Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface. Differential Revision: D102166537
…56580) Summary: Pull Request resolved: facebook#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) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it. 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(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it. ## Impact Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface. Differential Revision: D102166537
214d841 to
5464e39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Changelog: [General][Deprecated] Deprecated second argument for hook function passed to
AppRegistry.setComponentProviderInstrumentationHookas it's not usable by apps. Passed stub that warns when used.Context
The performance-logger primitives (
createPerformanceLogger,GlobalPerformanceLogger,PerformanceLoggerContext, theIPerformanceLoggerimplementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them insidereact-nativeis 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. TheIPerformanceLoggerinterface (the only consumer-visible artifact) is kept in its ownLibraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}file so embedders can still type their own implementations against it.Public API surface kept stable:
XMLHttpRequest.setPerformanceLogger(...)is preserved, typed against a thin localXHRPerformanceLoggerinterface (juststartTimespan/stopTimespan). Defaults tonull; emits nonetwork_XMLHttpRequest_<friendlyName>timespan when no logger is set.AppRegistry.setComponentProviderInstrumentationHook(...)is preserved with its 2-arg signature. The second argument is now a no-opIPerformanceLoggerstub that emits a one-timeconsole.warnflagging it as deprecated — embedders should provide their own per-app context if they need it.Impact
Non-breaking for OSS consumers — nothing that was importable from
react-nativebecomes unavailable. Telemetry that the package used to emit (renderApplication_React_render,usedReactConcurrentRoot/Fabric/Profilerextras,initializeCore_*markers, the'GlobalPerformanceLogger'callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface.Differential Revision: D102166537