@sentry-internal/tracing
Advanced tools
Comparing version 7.63.0 to 7.64.0-alpha.0
@@ -37,2 +37,18 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const clientData = {}; | ||
try { | ||
const engineConfig = (options.client )._engineConfig; | ||
if (engineConfig) { | ||
const { activeProvider, clientVersion } = engineConfig; | ||
if (activeProvider) { | ||
clientData['db.system'] = activeProvider; | ||
} | ||
if (clientVersion) { | ||
clientData['db.prisma.version'] = clientVersion; | ||
} | ||
} | ||
} catch (e) { | ||
// ignore | ||
} | ||
options.client.$use((params, next) => { | ||
@@ -45,4 +61,9 @@ if (nodeUtils.shouldDisableAutoInstrumentation(core.getCurrentHub)) { | ||
const model = params.model; | ||
return core.trace( | ||
{ name: model ? `${model} ${action}` : action, op: 'db.sql.prisma', data: { 'db.system': 'prisma' } }, | ||
{ | ||
name: model ? `${model} ${action}` : action, | ||
op: 'db.sql.prisma', | ||
data: { ...clientData, 'db.operation': action }, | ||
}, | ||
() => next(params), | ||
@@ -49,0 +70,0 @@ ); |
@@ -35,2 +35,18 @@ import { trace, getCurrentHub } from '@sentry/core'; | ||
const clientData = {}; | ||
try { | ||
const engineConfig = (options.client )._engineConfig; | ||
if (engineConfig) { | ||
const { activeProvider, clientVersion } = engineConfig; | ||
if (activeProvider) { | ||
clientData['db.system'] = activeProvider; | ||
} | ||
if (clientVersion) { | ||
clientData['db.prisma.version'] = clientVersion; | ||
} | ||
} | ||
} catch (e) { | ||
// ignore | ||
} | ||
options.client.$use((params, next) => { | ||
@@ -43,4 +59,9 @@ if (shouldDisableAutoInstrumentation(getCurrentHub)) { | ||
const model = params.model; | ||
return trace( | ||
{ name: model ? `${model} ${action}` : action, op: 'db.sql.prisma', data: { 'db.system': 'prisma' } }, | ||
{ | ||
name: model ? `${model} ${action}` : action, | ||
op: 'db.sql.prisma', | ||
data: { ...clientData, 'db.operation': action }, | ||
}, | ||
() => next(params), | ||
@@ -47,0 +68,0 @@ ); |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.63.0", | ||
"version": "7.64.0-alpha.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.63.0", | ||
"@sentry/types": "7.63.0", | ||
"@sentry/utils": "7.63.0", | ||
"@sentry/core": "7.64.0-alpha.0", | ||
"@sentry/types": "7.64.0-alpha.0", | ||
"@sentry/utils": "7.64.0-alpha.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
894131
6689
2
+ Added@sentry/core@7.64.0-alpha.0(transitive)
+ Added@sentry/types@7.64.0-alpha.0(transitive)
+ Added@sentry/utils@7.64.0-alpha.0(transitive)
- Removed@sentry/core@7.63.0(transitive)
- Removed@sentry/types@7.63.0(transitive)
- Removed@sentry/utils@7.63.0(transitive)
Updated@sentry/core@7.64.0-alpha.0
Updated@sentry/types@7.64.0-alpha.0
Updated@sentry/utils@7.64.0-alpha.0