newrelic 10.1.1 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NEWS.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### v10.1.2 (2023-05-24)
2
+
3
+ #### Bug Fixes
4
+
5
+ * Updated mysql instrumentation to properly wrap the connection pool.getConnection and poolCluster.of ([#1647](https://github.com/newrelic/node-newrelic/pull/1647)) ([4caf1db](https://github.com/newrelic/node-newrelic/commit/4caf1db60b930c7b21307e381c13b5dd572e5cc3))
6
+ * Added instrumentation to `PoolNamespace.prototype.query`
7
+
8
+ #### Continuous Integration
9
+
10
+ * fix minor release note generation bugs ([#1643](https://github.com/newrelic/node-newrelic/pull/1643)) ([dd6ab9a](https://github.com/newrelic/node-newrelic/commit/dd6ab9addb8ee16de92ba9d6602f71c40527b940))
11
+
1
12
  ### v10.1.1 (2023-05-15)
2
13
 
3
14
  #### Bug Fixes
@@ -11,7 +11,7 @@ const symbols = require('../../symbols')
11
11
 
12
12
  exports.callbackInitialize = function callbackInitialize(shim, mysql) {
13
13
  shim.setDatastore(shim.MYSQL)
14
- shim[symbols.wrappedPoolConnection] = true
14
+ shim[symbols.wrappedPoolConnection] = false
15
15
 
16
16
  shim.wrapReturn(mysql, 'createConnection', wrapCreateConnection)
17
17
  function wrapCreateConnection(shim, fn, fnName, connection) {
@@ -46,11 +46,12 @@ exports.callbackInitialize = function callbackInitialize(shim, mysql) {
46
46
  const proto = Object.getPrototypeOf(poolCluster)
47
47
  shim.wrapReturn(proto, 'of', wrapPoolClusterOf)
48
48
  function wrapPoolClusterOf(shim, of, _n, poolNamespace) {
49
- if (shim[symbols.clusterOf]) {
49
+ if (poolNamespace[symbols.clusterOf]) {
50
50
  return
51
51
  }
52
- if (wrapGetConnection(shim, poolNamespace)) {
53
- shim[symbols.clusterOf] = true
52
+
53
+ if (wrapGetConnection(shim, poolNamespace) && wrapQueryable(shim, poolNamespace, false)) {
54
+ poolNamespace[symbols.clusterOf] = true
54
55
  }
55
56
  }
56
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newrelic",
3
- "version": "10.1.1",
3
+ "version": "10.1.2",
4
4
  "author": "New Relic Node.js agent team <nodejs@newrelic.com>",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [