Skip to content

Commit

Permalink
feat(tracing): Export proper type for browser tracing (#10411)
Browse files Browse the repository at this point in the history
To make it easier to extend this.
  • Loading branch information
mydea committed Jan 30, 2024
1 parent 1822af5 commit 71b8ac1
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 71b8ac1

Please sign in to comment.