Skip to content

Commit

Permalink
fix(mysql): add default values
Browse files Browse the repository at this point in the history
  • Loading branch information
dszakallas committed Nov 25, 2016
1 parent d8e38db commit a51ae36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/instrumentations/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function composeAgentData (config, args) {
}
return {
protocol: consts.PROTOCOLS.MYSQL,
url: connectionURI || undefined,
url: connectionURI || 'unknown',
host: config.host || 'unknown',
method: utils.tryParseSql(args[0] || '')
method: utils.tryParseSql(args[0]) || 'unknown'
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/instrumentations/mysql.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('The mysql wrapper', function () {
host: 'unknown',
method: 'SELECT',
protocol: 'mysql',
url: undefined
url: 'unknown'
})
done()
})
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('The mysql wrapper', function () {
host: 'unknown',
method: 'SELECT',
protocol: 'mysql',
url: undefined
url: 'unknown'
})
done()
})
Expand Down

0 comments on commit a51ae36

Please sign in to comment.