Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tracing): Export proper type for browser tracing #10411

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable max-lines, complexity */
import type { IdleTransaction } from '@sentry/core';
import { getClient } from '@sentry/core';
import { defineIntegration, getCurrentHub } from '@sentry/core';
import { getCurrentHub } from '@sentry/core';
import {
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
TRACING_DEFAULTS,
Expand Down Expand Up @@ -151,8 +151,10 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
*
* The integration can be configured with a variety of options, and can be extended to use
* any routing library. This integration uses {@see IdleTransaction} to create transactions.
*
* We explicitly export the proper type here, as this has to be extended in some cases.
*/
export const _browserTracingIntegration = ((_options: Partial<BrowserTracingOptions> = {}) => {
export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptions> = {}) => {
const _hasSetTracePropagationTargets = DEBUG_BUILD
? !!(
// eslint-disable-next-line deprecation/deprecation
Expand Down Expand Up @@ -389,8 +391,6 @@ export const _browserTracingIntegration = ((_options: Partial<BrowserTracingOpti
};
}) satisfies IntegrationFn;

export const browserTracingIntegration = defineIntegration(_browserTracingIntegration);

/**
* Manually start a page load span.
* This will only do something if the BrowserTracing integration has been setup.
Expand Down