|
1 | 1 | import { getCurrentHub } from '@sentry/core';
|
2 | 2 | import { Integration, Span, Transaction } from '@sentry/types';
|
3 |
| -import { fill, parseSemver, stripUrlQueryAndFragment } from '@sentry/utils'; |
| 3 | +import { fill, parseSemver } from '@sentry/utils'; |
4 | 4 | import * as http from 'http';
|
5 | 5 | import * as https from 'https';
|
6 | 6 |
|
@@ -159,20 +159,17 @@ function addRequestBreadcrumb(event: string, url: string, req: http.IncomingMess
|
159 | 159 | * Assemble a URL to be used for breadcrumbs and spans.
|
160 | 160 | *
|
161 | 161 | * @param url URL string or object containing the component parts
|
162 |
| - * @param strip Whether or not to strip querystring and fragment. Defaults to false. |
163 |
| - * |
164 | 162 | * @returns Fully-formed URL
|
165 | 163 | */
|
166 |
| -export function extractUrl(url: string | http.ClientRequestArgs, strip: boolean = false): string { |
| 164 | +export function extractUrl(url: string | http.ClientRequestArgs): string { |
167 | 165 | if (typeof url === 'string') {
|
168 |
| - return strip ? stripUrlQueryAndFragment(url) : url; |
| 166 | + return url; |
169 | 167 | }
|
170 |
| - |
171 | 168 | const protocol = url.protocol || '';
|
172 | 169 | const hostname = url.hostname || url.host || '';
|
173 | 170 | // Don't log standard :80 (http) and :443 (https) ports to reduce the noise
|
174 | 171 | const port = !url.port || url.port === 80 || url.port === 443 ? '' : `:${url.port}`;
|
175 |
| - const path = url.path ? (strip ? stripUrlQueryAndFragment(url.path) : url.path) : '/'; |
| 172 | + const path = url.path ? url.path : '/'; |
176 | 173 |
|
177 | 174 | // internal routes end up with too many slashes
|
178 | 175 | return `${protocol}//${hostname}${port}${path}`.replace('///', '/');
|
|
0 commit comments