Skip to content

Commit 28d183a

Browse files
authored
feat(core): Export TracesSamplerSamplingContext type (#17523)
In #15277, `TracesSamplerSamplingContext` is added to and exported from [types-hoist], but is not being exported from [index.ts]. I'm following the [instruction], and I want to inject `(samplingContext: TracesSamplerSamplingContext) => number | boolean` to a function that is wrapping `Sentry.init`, but I can't because `TracesSamplerSamplingContext` is not recognized :( <!--link--> [types-hoist]: https://github.com/getsentry/sentry-javascript/blob/14eba5676149317f2e2b31143a0590256d32c094/packages/core/src/types-hoist/samplingcontext.ts#L47 [index.ts]: https://github.com/getsentry/sentry-javascript/blob/14eba5676149317f2e2b31143a0590256d32c094/packages/core/src/index.ts#L403 [instruction]: https://docs.sentry.io/platforms/javascript/guides/react/tracing/configure-sampling/#sampling-function-tracessampler
1 parent 31dc645 commit 28d183a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,11 @@ export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from
410410
export type { PropagationContext, TracePropagationTargets, SerializedTraceData } from './types-hoist/tracing';
411411
export type { StartSpanOptions } from './types-hoist/startSpanOptions';
412412
export type { TraceparentData, TransactionSource } from './types-hoist/transaction';
413-
export type { CustomSamplingContext, SamplingContext } from './types-hoist/samplingcontext';
413+
export type {
414+
TracesSamplerSamplingContext,
415+
CustomSamplingContext,
416+
SamplingContext,
417+
} from './types-hoist/samplingcontext';
414418
export type {
415419
DurationUnit,
416420
InformationUnit,

0 commit comments

Comments
 (0)