Skip to content

profilesSampler is not part of @sentry/react in Sentry.init #16773

Open
@PankajSati-apl

Description

@PankajSati-apl

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

9.33.0

Framework Version

18.3.1

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

Sentry's official documentation mentions profilesSampler as a config exposed in Sentry.init. However, the method doesn't work in @sentry/react package

import * as Sentry from "@sentry/react";

Sentry.init({
  dsn: "https://[email protected]/1819200",
  integrations: [
    // Add browser profiling integration to the list of integrations
    Sentry.browserTracingIntegration(),
    Sentry.browserProfilingIntegration(),
  ],
  tracesSampleRate: 1.0,

  // This function will be called for every sampled span
  // to determine if it should be profiled
  profilesSampler: (samplingContext) => {
    return 1.0;
  },
});

Expected Result

profilesSampler should work

Actual Result

profilesSampler does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions