Skip to content

Duplicate breadcrumbs when type is set #4712

Open
@gimi-anders

Description

@gimi-anders

What React Native libraries do you use?

React Navigation, Hermes

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.8.0

How does your development environment look like?

info Fetching system and libraries information...

Binaries:
  Node:
    version: 22.12.0
  Yarn:
    version: 4.6.0
  npm:
    version: 10.9.0
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
Languages:
  Java:
    version: 17.0.7
  Ruby:
    version: 3.2.2
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.1.3
  react:
    installed: 18.3.1
    wanted: ^18.3.1
  react-native:
    installed: 0.76.7
    wanted: ~0.76.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.78.1 is now available (your project is running on v0.76.7).

Sentry.init()

export const sentryConfig: ReactNativeOptions = {
  dsn: staticConfig.sentry.dsn,
  tracesSampleRate: staticConfig.sentry.tracesSampleRate,
  dist: getBuildNumber(),
  environment: Config.VP_ENVIRONMENT,
  release: `${Config.BUNDLE_ID}@${getVersion()}`,
  // Don't report errors in dev mode
  enabled: !isDev(),
  beforeSendTransaction: excludeAppStartFromTransaction,
  integrations: [
    // Enables performance monitoring
    reactNavigationIntegration,
  ],
};

Steps to Reproduce

Call Sentry.addBreadcrumb() with the type property set. (I have tested with type "default", "http" and type "navigation").

Expected Result

Only one breadcrumb should be showing in the list of breadcrumbs for an event.

Actual Result

The breadcrumbs where the type property has been set are duplicated in the list of breadcrumbs for an event.

Example:
Image

Note:
When calling Sentry.addBreadcrumb() without the type set, then only single breadcrumbs are being logged, as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status

      Needs More Information
    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions