Files
Delba de OliveiraandGitHub 91cbe61e75 Docs: Add instrumentation.ts API reference, improve instrumentation docs (#61403)
- Add instrumentation.ts API reference
- Polish and restructure instrumentation docs
2024-01-31 07:54:32 -06:00

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,
},
}
```