Skip to content

Sentry.getTraceData is not exported from @sentry/react #16418

Closed
@nbbeeken

Description

@nbbeeken

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

@sentry/browser@9.5.0 @sentry/react@9.5.0

Framework Version

React 17.0.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

Under the "How Sampling Propagates in Distributed Traces" on the linked docs page. The code sample is

// Extract trace data from the current scope
const traceData = Sentry.getTraceData();
const sentryTraceHeader = traceData["sentry-trace"];
const sentryBaggageHeader = traceData["baggage"];

But getTraceData is not exported

Steps to Reproduce

npm i -D @sentry/react
const Sentry = await import("@sentry/react")

Expected Result

> typeof Sentry.getTraceData
'function'

Actual Result

> typeof Sentry.getTraceData
'undefined'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions