-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.1
Framework Version
Nextjs 15.4 (App Router)
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
instrumentation.ts is set as such:
import * as Sentry from '@sentry/nextjs'
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const { nodeProfilingIntegration } = await import('@sentry/profiling-node')
Sentry.init({
enabled: Boolean(process.env.VERCEL),
dsn: '****',
integrations: () => {
return [Sentry.prismaIntegration(), nodeProfilingIntegration()]
},
profileSessionSampleRate: 1.0,
profileLifecycle: 'trace',
tracesSampleRate: 1,
debug: false,
})
}
}Expected Result
To instantiate the nodeProfilingIntegration() and be accepted in the integrations array.
Actual Result
TypeScript error
Type '() => (Integration | Integration)[]' is not assignable to type 'Integration[] | ((integrations: Integration[]) => Integration[]) | undefined'.
Type '() => (Integration | Integration)[]' is not assignable to type '(integrations: Integration[]) => Integration[]'.
Type '(Integration | Integration)[]' is not assignable to type 'Integration[]'.
Type 'Integration | Integration' is not assignable to type 'Integration'.
Type 'import("/node_modules/@sentry/core/build/types/types-hoist/integration").Integration' is not assignable to type 'import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/types-hoist/integration").Integration'.
Types of property 'setup' are incompatible.
Type '((client: import("/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/node_module...' is not assignable to type '((client: import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/Us...'.
Type '(client: import("/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/node_modules...' is not assignable to type '(client: import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/Use...'.
Types of parameters 'client' and 'client' are incompatible.
Type 'import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/nextjs/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/Users/kostas...' is not assignable to type 'import("/node_modules/@sentry/core/build/types/client").Client<import("/node_modules/@sentry/core/build/types/types-hoist/options").ClientOptions<import("/node_modules/@sentry/...'.
Property '_options' is protected but type 'Client<O>' is not a class derived from 'Client<O>'.ts(2322)
options.d.ts(415, 5): The expected type comes from property 'integrations' which is declared here on type 'Options<BaseTransportOptions> | BrowserOptions | NodeOptions | VercelEdgeOptions'
(property) integrations: () => (Integration | Integration)[]
Metadata
Metadata
Assignees
Projects
Status
Waiting for: Community