Skip to content

Commit cdc15ce

Browse files
committed
fix types
1 parent 10d8bd0 commit cdc15ce

File tree

1 file changed

+3
-2
lines changed
  • packages/node/src/integrations

1 file changed

+3
-2
lines changed

packages/node/src/integrations/http.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,10 @@ function _createWrappedRequestMethodFactory(
187187

188188
const scope = getCurrentHub().getScope();
189189

190+
const method = requestOptions.method || 'GET';
190191
const requestSpanData: SanitizedRequestData = {
191192
url: requestUrl,
192-
'http.method': requestOptions.method || 'GET',
193+
'http.method': method,
193194
};
194195
if (requestOptions.hash) {
195196
// strip leading "#"
@@ -205,7 +206,7 @@ function _createWrappedRequestMethodFactory(
205206

206207
if (parentSpan) {
207208
requestSpan = parentSpan.startChild({
208-
description: `${requestSpanData.method} ${requestSpanData.url}`,
209+
description: `${method} ${requestSpanData.url}`,
209210
op: 'http.client',
210211
data: requestSpanData,
211212
});

0 commit comments

Comments
 (0)