This repository was archived by the owner on Sep 17, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
TypeScript error with 7.64.0 version of Sentry packages #190
Copy link
Copy link
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/profiling-node/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/profiling-node/releases
How do you use Sentry?
Sentry Saas (sentry.io)
SDK Version
1.1.2
Link to Sentry event
No response
What environment is your node script running in?
Express + Apollo Server
How is your code deployed and bundled?
Azure App Service
Steps to Reproduce
- Installed latest (as of 08/23/2023) version of
@sentrypackages,7.64.0 - Ran
npm install - Encounter TypeScript errors in the file with
Sentry.init
Expected Result
The plugin works without type casting
Actual Result
src/utils/errors.ts:20:7 - error TS2322: Type 'ProfilingIntegration' is not assignable to type 'Integration'.
Types of property 'setupOnce' are incompatible.
Type '(addGlobalEventProcessor: (callback: import("/node_modules/@sentry/types/types/eventprocessor").EventProcessor) => void, getCurrentHub: () => import("/node_modules/@sentry/types/types/hub").Hub) => void' is not assignable to type '(addGlobalEventProcessor: (callback: import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/eventprocessor").EventProcessor) => void, getCurrentHub: () => import("/node_modules/@sentry/integrations/node_modules/@sentry...'.
Types of parameters 'addGlobalEventProcessor' and 'addGlobalEventProcessor' are incompatible.
Types of parameters 'callback' and 'callback' are incompatible.
Type 'import("/node_modules/@sentry/types/types/eventprocessor").EventProcessor' is not assignable to type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/eventprocessor").EventProcessor'.
Types of parameters 'event' and 'event' are incompatible.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/event").Event' is not assignable to type 'import("/node_modules/@sentry/types/types/event").Event'.
Types of property 'spans' are incompatible.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/span").Span[] | undefined' is not assignable to type 'import("/node_modules/@sentry/types/types/span").Span[] | undefined'.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/span").Span[]' is not assignable to type 'import("/node_modules/@sentry/types/types/span").Span[]'.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/span").Span' is not assignable to type 'import("/node_modules/@sentry/types/types/span").Span'.
Types of property 'transaction' are incompatible.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/transaction").Transaction | undefined' is not assignable to type 'import("/node_modules/@sentry/types/types/transaction").Transaction | undefined'.
Type 'import("/node_modules/@sentry/integrations/node_modules/@sentry/types/types/transaction").Transaction' is not assignable to type 'import("/node_modules/@sentry/types/types/transaction").Transaction'.
The types returned by 'setTag(...)' are incompatible between these types.
Type 'Span' is missing the following properties from type 'Transaction': metadata, setContext, setMeasurement, setMetadata, getDynamicSamplingContext
20 new ProfilingIntegration(),
Code snippet:
import { ExtraErrorData } from "@sentry/integrations";
import { ProfilingIntegration } from "@sentry/profiling-node";
import { SENTRY_DSN } from "../models/sentry/data";
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: SENTRY_DSN,
integrations: [
new ExtraErrorData({
depth: 3
}),
new ProfilingIntegration(),
new Sentry.Integrations.Prisma({ client: prisma })
],
maxValueLength: 1000,
profilesSampleRate: 0,
tracesSampleRate: 0.5
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.