Skip to content

Commit

Permalink
feat(tracing): Bring http timings out of experiment
Browse files Browse the repository at this point in the history
This brings HTTP timings out of experiment, with an option to turn them off still. For now we'll be hiding them in the UI until we've figure out which ones we want to display.
  • Loading branch information
k-fish committed Jul 17, 2023
1 parent 338010e commit 9398d3e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/tracing-internal/src/browser/browsertracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
*/
enableLongTask: boolean;

/**
* If true, Sentry will capture http timings and add them to the corresponding http spans.
*
* Default: true
*/
enableHTTPTimings: boolean;

/**
* _metricOptions allows the user to send options to change how metrics are collected.
*
Expand All @@ -105,7 +112,6 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
_experiments: Partial<{
enableLongTask: boolean;
enableInteractions: boolean;
enableHTTPTimings: boolean;
onStartRouteTransaction: (t: Transaction | undefined, ctx: TransactionContext, getCurrentHub: () => Hub) => void;
}>;

Expand Down Expand Up @@ -140,6 +146,7 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
startTransactionOnLocationChange: true,
startTransactionOnPageLoad: true,
enableLongTask: true,
enableHTTPTimings: true,
...defaultRequestInstrumentationOptions,
};

Expand Down Expand Up @@ -230,6 +237,7 @@ export class BrowserTracing implements Integration {
traceFetch,
traceXHR,
shouldCreateSpanForRequest,
enableHTTPTimings,
_experiments,
} = this.options;

Expand Down Expand Up @@ -278,7 +286,7 @@ export class BrowserTracing implements Integration {
tracePropagationTargets,
shouldCreateSpanForRequest,
_experiments: {
enableHTTPTimings: _experiments.enableHTTPTimings,
enableHTTPTimings,
},
});
}
Expand Down

0 comments on commit 9398d3e

Please sign in to comment.