Files
next.js/test/integration/telemetry/next.config.adapter-path
JJ KasperandGitHub 0aec1df210 Add telemetry for adapterPath config usage (#92228)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## What?

Adds telemetry tracking for when the `adapterPath` config option is used
in Next.js.

## Why?

As mentioned in the Slack discussion, telemetry for adapter usage was
missing. This helps track adoption of the adapter feature.

## How?

- Added `adapterPath` field to the `EventCliSessionStarted` type in
`telemetry/events/version.ts`
- The field is automatically populated from `nextConfig.adapterPath`
when CLI sessions start
- This covers both `next dev` and `next build` commands

The telemetry emits a CLI session event with `"adapterPath": true` when
the config option is set, and `"adapterPath": false` when it's not.

## Testing

Updated the test in `test/integration/telemetry/test/config.test.ts` to:
1. Create a config with `adapterPath` set
2. Run a build with telemetry debug enabled
3. Verify the CLI session telemetry includes `"adapterPath": true`

The test passes locally.
2026-04-02 08:41:12 +00:00

6 lines
102 B
Plaintext

const path = require('path')
module.exports = {
adapterPath: path.join(__dirname, 'adapter.js'),
}