@sentry-internal/tracing
Advanced tools
Comparing version 7.67.0-beta.0 to 7.67.0
@@ -72,2 +72,15 @@ var { | ||
function finishSpan(span) { | ||
if (!span) { | ||
return; | ||
} | ||
const data = spanDataFromConfig(); | ||
Object.keys(data).forEach(key => { | ||
span.setData(key, data[key]); | ||
}); | ||
span.finish(); | ||
} | ||
// The original function will have one of these signatures: | ||
@@ -81,2 +94,3 @@ // function (callback) => void | ||
const parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); | ||
const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ | ||
@@ -87,3 +101,2 @@ description: typeof options === 'string' ? options : (options ).sql, | ||
data: { | ||
...spanDataFromConfig(), | ||
'db.system': 'mysql', | ||
@@ -95,3 +108,3 @@ }, | ||
return orig.call(this, options, values, function (err, result, fields) { | ||
_optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); | ||
finishSpan(span); | ||
callback(err, result, fields); | ||
@@ -103,3 +116,3 @@ }); | ||
return orig.call(this, options, function (err, result, fields) { | ||
_optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); | ||
finishSpan(span); | ||
values(err, result, fields); | ||
@@ -109,3 +122,5 @@ }); | ||
return orig.call(this, options, values, callback); | ||
return orig.call(this, options, values, function () { | ||
finishSpan(span); | ||
}); | ||
}; | ||
@@ -112,0 +127,0 @@ }); |
@@ -67,2 +67,15 @@ import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; | ||
function finishSpan(span) { | ||
if (!span) { | ||
return; | ||
} | ||
const data = spanDataFromConfig(); | ||
Object.keys(data).forEach(key => { | ||
span.setData(key, data[key]); | ||
}); | ||
span.finish(); | ||
} | ||
// The original function will have one of these signatures: | ||
@@ -76,2 +89,3 @@ // function (callback) => void | ||
const parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); | ||
const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ | ||
@@ -82,3 +96,2 @@ description: typeof options === 'string' ? options : (options ).sql, | ||
data: { | ||
...spanDataFromConfig(), | ||
'db.system': 'mysql', | ||
@@ -90,3 +103,3 @@ }, | ||
return orig.call(this, options, values, function (err, result, fields) { | ||
_optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); | ||
finishSpan(span); | ||
callback(err, result, fields); | ||
@@ -98,3 +111,3 @@ }); | ||
return orig.call(this, options, function (err, result, fields) { | ||
_optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); | ||
finishSpan(span); | ||
values(err, result, fields); | ||
@@ -104,3 +117,5 @@ }); | ||
return orig.call(this, options, values, callback); | ||
return orig.call(this, options, values, function () { | ||
finishSpan(span); | ||
}); | ||
}; | ||
@@ -107,0 +122,0 @@ }); |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.67.0-beta.0", | ||
"version": "7.67.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.67.0-beta.0", | ||
"@sentry/types": "7.67.0-beta.0", | ||
"@sentry/utils": "7.67.0-beta.0", | ||
"@sentry/core": "7.67.0", | ||
"@sentry/types": "7.67.0", | ||
"@sentry/utils": "7.67.0", | ||
"tslib": "^2.4.1 || ^1.9.3" | ||
@@ -31,0 +31,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
904533
6776
1
+ Added@sentry/core@7.67.0(transitive)
+ Added@sentry/types@7.67.0(transitive)
+ Added@sentry/utils@7.67.0(transitive)
- Removed@sentry/core@7.67.0-beta.0(transitive)
- Removed@sentry/types@7.67.0-beta.0(transitive)
- Removed@sentry/utils@7.67.0-beta.0(transitive)
Updated@sentry/core@7.67.0
Updated@sentry/types@7.67.0
Updated@sentry/utils@7.67.0