Skip to content

Hoist PerformanceLogger primitives out of react-native (#56580)#56580

Open
rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte:export-D102166537
Open

Hoist PerformanceLogger primitives out of react-native (#56580)#56580
rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte:export-D102166537

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

@rubennorte rubennorte commented Apr 23, 2026

Summary:

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 23, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 23, 2026

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102166537.

@meta-codesync meta-codesync Bot changed the title Hoist PerformanceLogger primitives out of react-native Hoist PerformanceLogger primitives out of react-native (#56580) Apr 23, 2026
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
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
@rubennorte rubennorte force-pushed the export-D102166537 branch 2 times, most recently from 787e771 to 214d841 Compare April 23, 2026 17:38
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant