@@ -8,28 +8,28 @@ class TediousPlugin extends DatabasePlugin {
8
8
static get operation ( ) { return 'request' } // TODO: change to match other database plugins
9
9
static get system ( ) { return 'mssql' }
10
10
11
- bindStart ( payload ) {
11
+ bindStart ( ctx ) {
12
12
const service = this . serviceName ( { pluginConfig : this . config , system : this . system } )
13
13
const span = this . startSpan ( this . operationName ( ) , {
14
14
service,
15
- resource : payload . queryOrProcedure ,
15
+ resource : ctx . queryOrProcedure ,
16
16
type : 'sql' ,
17
17
kind : 'client' ,
18
18
meta : {
19
19
'db.type' : 'mssql' ,
20
20
component : 'tedious' ,
21
- 'out.host' : payload . connectionConfig . server ,
22
- [ CLIENT_PORT_KEY ] : payload . connectionConfig . options . port ,
23
- 'db.user' : payload . connectionConfig . userName || payload . connectionConfig . authentication . options . userName ,
24
- 'db.name' : payload . connectionConfig . options . database ,
25
- 'db.instance' : payload . connectionConfig . options . instanceName
21
+ 'out.host' : ctx . connectionConfig . server ,
22
+ [ CLIENT_PORT_KEY ] : ctx . connectionConfig . options . port ,
23
+ 'db.user' : ctx . connectionConfig . userName || ctx . connectionConfig . authentication . options . userName ,
24
+ 'db.name' : ctx . connectionConfig . options . database ,
25
+ 'db.instance' : ctx . connectionConfig . options . instanceName
26
26
}
27
- } , payload )
27
+ } , ctx )
28
28
29
29
// SQL Server includes comments when caching queries
30
30
// For that reason we allow service mode but not full mode
31
- payload . sql = this . injectDbmQuery ( span , payload . queryOrProcedure , service , true )
32
- return payload . currentStore
31
+ ctx . sql = this . injectDbmQuery ( span , ctx . queryOrProcedure , service , true )
32
+ return ctx . currentStore
33
33
}
34
34
}
35
35
0 commit comments