@sentry-internal/tracing
Advanced tools
Comparing version 7.52.1 to 7.53.0
@@ -85,2 +85,11 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
span.setHttpStatus(handlerData.response.status); | ||
const contentLength = | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length'); | ||
const contentLengthNum = parseInt(contentLength); | ||
if (contentLengthNum > 0) { | ||
span.setData('http.response_content_length', contentLengthNum); | ||
} | ||
} else if (handlerData.error) { | ||
@@ -97,5 +106,2 @@ span.setStatus('internal_error'); | ||
const contentLength = | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length'); | ||
const currentScope = core.getCurrentHub().getScope(); | ||
@@ -111,3 +117,2 @@ const currentSpan = currentScope && currentScope.getSpan(); | ||
type: 'fetch', | ||
...(contentLength ? { 'http.response_content_length': contentLength } : {}), | ||
'http.method': method, | ||
@@ -114,0 +119,0 @@ }, |
@@ -83,2 +83,11 @@ import { hasTracingEnabled, getCurrentHub } from '@sentry/core'; | ||
span.setHttpStatus(handlerData.response.status); | ||
const contentLength = | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length'); | ||
const contentLengthNum = parseInt(contentLength); | ||
if (contentLengthNum > 0) { | ||
span.setData('http.response_content_length', contentLengthNum); | ||
} | ||
} else if (handlerData.error) { | ||
@@ -95,5 +104,2 @@ span.setStatus('internal_error'); | ||
const contentLength = | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length'); | ||
const currentScope = getCurrentHub().getScope(); | ||
@@ -109,3 +115,2 @@ const currentSpan = currentScope && currentScope.getSpan(); | ||
type: 'fetch', | ||
...(contentLength ? { 'http.response_content_length': contentLength } : {}), | ||
'http.method': method, | ||
@@ -112,0 +117,0 @@ }, |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.52.1", | ||
"version": "7.53.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -19,5 +19,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.52.1", | ||
"@sentry/types": "7.52.1", | ||
"@sentry/utils": "7.52.1", | ||
"@sentry/core": "7.53.0", | ||
"@sentry/types": "7.53.0", | ||
"@sentry/utils": "7.53.0", | ||
"tslib": "^1.9.3" | ||
@@ -24,0 +24,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
836926
6195
+ Added@sentry/core@7.53.0(transitive)
+ Added@sentry/types@7.53.0(transitive)
+ Added@sentry/utils@7.53.0(transitive)
- Removed@sentry/core@7.52.1(transitive)
- Removed@sentry/types@7.52.1(transitive)
- Removed@sentry/utils@7.52.1(transitive)
Updated@sentry/core@7.53.0
Updated@sentry/types@7.53.0
Updated@sentry/utils@7.53.0