Skip to content

Commit f26dc5c

Browse files
committed
Document Server Component timing metadata
1 parent 2da4f7f commit f26dc5c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎src/content/reference/dev-tools/react-performance-tracks.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ In development builds, when you click on a component render entry, you can inspe
138138

139139
#### Server Requests {/*server-requests*/}
140140

141-
The Server Requests track visualized all Promises that eventually end up in a React Server Component. This includes any `async` operations like calling `fetch` or async Node.js file operations.
141+
The Server Requests track visualized all Promises that eventually end up in a React Server Component. This includes any `async` operations like calling `fetch` or async Node.js file operations.
142142

143143
React will try to combine Promises that are started from inside third-party code into a single span representing the the duration of the entire operation blocking 1st party code.
144144
For example, a third party library method called `getUser` that calls `fetch` internally multiple times will be represented as a single span called `getUser`, instead of showing multiple `fetch` spans.
@@ -157,3 +157,15 @@ Different colors are used to indicate the duration of the component render. The
157157

158158
The Server Components track group will always contain a "Primary" track. If React is able to render Server Components concurrently, it will display addititional "Parallel" tracks.
159159
If more than 8 Server Components are rendered concurrently, React will associate them with the last "Parallel" track instead of adding more tracks.
160+
161+
##### Reading Server Component timing metadata {/*reading-server-component-timing-metadata*/}
162+
163+
Server Component events include structured metadata in `entry.detail.react`. Server Requests and client-side tracks do not include these fields.
164+
165+
| Field | Description |
166+
| --- | --- |
167+
| `version` | The metadata format version. Currently `1`. |
168+
| `requestId` | The string passed as `unstable_requestId` when a framework creates the response, or `undefined` if omitted. |
169+
| `kind` | `'component'` for a Server Component render or `'await'` for a Promise it awaited. |
170+
| `outcome` | `'completed'`, `'errored'`, or `'aborted'`. |
171+
| `environment` | The environment name associated with the render or await, falling back to the response's environment name. |

0 commit comments

Comments
 (0)