Skip to content

feat(tracing): Bring http timings out of experiment #8563

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

Merged
merged 3 commits into from
Jul 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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