Skip to content

Unable to add config for reactInit when using electron package #1055

Open
@kyeshmz

Description

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Electron SDK Version

^5.9.0

Electron Version

33.2.1

What platform are you using?

MacOS

Link to Sentry event

No response

Steps to Reproduce

electronInit(
    {
      integrations: [
        ElectronSentry.browserTracingIntegration(),
        ElectronSentry.replayIntegration()
      ],
      // Set tracesSampleRate to 1.0 to capture 100%
      // of transactions for performance monitoring.
      // We recommend adjusting this value in production
      // Learn more at
      // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
      tracesSampleRate: 1.0,

      // Capture Replay for 10% of all sessions,
      // plus for 100% of sessions with an error
      // Learn more at
      // https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
      replaysSessionSampleRate: 0.1,
      replaysOnErrorSampleRate: 1.0
      /* config */
    },
    reactInit
  )

Expected Result

Be able to plugin custom configs for @sentry/react
Kind of reactInit({ my custom config like })

Actual Result

Argument of type 'Client<ClientOptions<BaseTransportOptions>> | undefined' is not assignable to parameter of type '((if_you_get_a_typescript_error_ensure_sdks_use_version_v8_47_0: { integrations: { name: string; afterAllSetup(client: Client<ClientOptions<BaseTransportOptions>>): void; }[]; tracesSampleRate: number; replaysSessionSampleRate: number; replaysOnErrorSampleRate: number; }) => void) | undefined'.
  Type 'Client<ClientOptions<BaseTransportOptions>>' is not assignable to type '(if_you_get_a_typescript_error_ensure_sdks_use_version_v8_47_0: { integrations: { name: string; afterAllSetup(client: Client<ClientOptions<BaseTransportOptions>>): void; }[]; tracesSampleRate: number; replaysSessionSampleRate: number; replaysOnErrorSampleRate: number; }) => void'

and I can confirm that I am using ^v8.47.0

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions