@@ -156,8 +156,8 @@ function subscribeQuery(channelName: string, operation: string): void {
156156 const span = startInactiveSpan ( {
157157 name :
158158 client && hasSpanStreamingEnabled ( client )
159- ? ( querySummary ?? getLowCardinalitySecondarySpanName ( operation , databaseName , sql , request . table ) )
160- : sql || getSecondarySpanName ( operation , databaseName , sql , request . table ) ,
159+ ? querySummary || getLowCardinalitySecondarySpanName ( operation , databaseName , sql , request . table )
160+ : sql || getSecondarySpanName ( operation , databaseName , request . table ) ,
161161 attributes,
162162 } ) ;
163163
@@ -209,22 +209,12 @@ function extractSql(request: TediousRequest): string | undefined {
209209}
210210
211211/**
212- * The span name is a low-cardinality label for the operation; the SDK's db-span inference later renames
213- * the span description off `db.query.text` when present. Mirrors the vendored OTel `getSpanName`.
212+ * Get a secondary span name for static trace lifecycle (not strictly adhering to sentry-convention span names)
214213 */
215- function getSecondarySpanName (
216- operation : string ,
217- db : string | undefined ,
218- sql : string | undefined ,
219- bulkLoadTable : string | undefined ,
220- ) : string {
214+ function getSecondarySpanName ( operation : string , db : string | undefined , bulkLoadTable : string | undefined ) : string {
221215 if ( operation === 'execBulkLoad' && bulkLoadTable && db ) {
222216 return `${ operation } ${ bulkLoadTable } ${ db } ` ;
223217 }
224- if ( operation === 'callProcedure' && sql ) {
225- // `sql` refers to the procedure name for `callProcedure`.
226- return db ? `${ operation } ${ sql } ${ db } ` : `${ operation } ${ sql } ` ;
227- }
228218 // Avoid `sql` in the general case because of its high cardinality.
229219 return db ? `${ operation } ${ db } ` : operation ;
230220}
0 commit comments