mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
- Add instrumentation.ts API reference - Polish and restructure instrumentation docs
22 lines
864 B
Plaintext
22 lines
864 B
Plaintext
---
|
|
title: instrumentationHook
|
|
description: Use the instrumentationHook option to set up instrumentation in your Next.js App.
|
|
related:
|
|
title: Learn more about Instrumentation
|
|
links:
|
|
- app/api-reference/file-conventions/instrumentation
|
|
- app/building-your-application/optimizing/instrumentation
|
|
---
|
|
|
|
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
|
|
|
|
The experimental `instrumentationHook` option allows you to set up instrumentation via the [`instrumentation` file](/docs/app/api-reference/file-conventions/instrumentation) in your Next.js App.
|
|
|
|
```js filename="next.config.js"
|
|
module.exports = {
|
|
experimental: {
|
|
instrumentationHook: true,
|
|
},
|
|
}
|
|
```
|