Skip to content

Commit 27ba20d

Browse files
committed
stop stripping
1 parent dc29f07 commit 27ba20d

File tree

1 file changed

+4
-7
lines changed
  • packages/node/src/integrations

1 file changed

+4
-7
lines changed

packages/node/src/integrations/http.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getCurrentHub } from '@sentry/core';
22
import { Integration, Span, Transaction } from '@sentry/types';
3-
import { fill, parseSemver, stripUrlQueryAndFragment } from '@sentry/utils';
3+
import { fill, parseSemver } from '@sentry/utils';
44
import * as http from 'http';
55
import * as https from 'https';
66

@@ -159,20 +159,17 @@ function addRequestBreadcrumb(event: string, url: string, req: http.IncomingMess
159159
* Assemble a URL to be used for breadcrumbs and spans.
160160
*
161161
* @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-
*
164162
* @returns Fully-formed URL
165163
*/
166-
export function extractUrl(url: string | http.ClientRequestArgs, strip: boolean = false): string {
164+
export function extractUrl(url: string | http.ClientRequestArgs): string {
167165
if (typeof url === 'string') {
168-
return strip ? stripUrlQueryAndFragment(url) : url;
166+
return url;
169167
}
170-
171168
const protocol = url.protocol || '';
172169
const hostname = url.hostname || url.host || '';
173170
// Don't log standard :80 (http) and :443 (https) ports to reduce the noise
174171
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 : '/';
176173

177174
// internal routes end up with too many slashes
178175
return `${protocol}//${hostname}${port}${path}`.replace('///', '/');

0 commit comments

Comments
 (0)