@@ -17,7 +17,6 @@ import { defineNitroPlugin, useStorage } from 'nitropack/runtime';
1717import type { Driver , Storage } from 'unstorage' ;
1818// @ts -expect-error - This is a virtual module
1919import { userStorageMounts } from '#sentry/storage-config.mjs' ;
20- import { DEBUG_BUILD } from '../../common/debug-build' ;
2120
2221type MaybeInstrumented < T > = T & {
2322 __sentry_instrumented__ ?: boolean ;
@@ -41,7 +40,7 @@ export default defineNitroPlugin(async _nitroApp => {
4140 // Mounts are suffixed with a colon, so we need to add it to the set items
4241 const userMounts = new Set ( ( userStorageMounts as string [ ] ) . map ( m => `${ m } :` ) ) ;
4342
44- DEBUG_BUILD && debug . log ( '[storage] Starting to instrument storage drivers...' ) ;
43+ debug . log ( '[storage] Starting to instrument storage drivers...' ) ;
4544
4645 // Get all mounted storage drivers
4746 const mounts = storage . getMounts ( ) ;
@@ -64,12 +63,12 @@ export default defineNitroPlugin(async _nitroApp => {
6463function instrumentDriver ( driver : MaybeInstrumentedDriver , mountBase : string ) : Driver {
6564 // Already instrumented, skip...
6665 if ( driver . __sentry_instrumented__ ) {
67- DEBUG_BUILD && debug . log ( `[storage] Driver already instrumented: "${ driver . name } ". Skipping...` ) ;
66+ debug . log ( `[storage] Driver already instrumented: "${ driver . name } ". Skipping...` ) ;
6867
6968 return driver ;
7069 }
7170
72- DEBUG_BUILD && debug . log ( `[storage] Instrumenting driver: "${ driver . name } " on mount: "${ mountBase } "` ) ;
71+ debug . log ( `[storage] Instrumenting driver: "${ driver . name } " on mount: "${ mountBase } "` ) ;
7372
7473 // List of driver methods to instrument
7574 // get/set/remove are aliases and already use their {method}Item methods
@@ -116,7 +115,7 @@ function createMethodWrapper(
116115 async apply ( target , thisArg , args ) {
117116 const options = createSpanStartOptions ( methodName , driver , mountBase , args ) ;
118117
119- DEBUG_BUILD && debug . log ( `[storage] Running method: "${ methodName } " on driver: "${ driver . name ?? 'unknown' } "` ) ;
118+ debug . log ( `[storage] Running method: "${ methodName } " on driver: "${ driver . name ?? 'unknown' } "` ) ;
120119
121120 return startSpan ( options , async span => {
122121 try {
@@ -157,7 +156,7 @@ function wrapStorageMount(storage: Storage): Storage['mount'] {
157156 }
158157
159158 function mountWithInstrumentation ( base : string , driver : Driver ) : Storage {
160- DEBUG_BUILD && debug . log ( `[storage] Instrumenting mount: "${ base } "` ) ;
159+ debug . log ( `[storage] Instrumenting mount: "${ base } "` ) ;
161160
162161 const instrumentedDriver = instrumentDriver ( driver , base ) ;
163162
0 commit comments