solarwinds / appoptics-apm-node Goto Github PK
View Code? Open in Web Editor NEWAppOptics APM Instrumentation Agent for Node.js
License: Apache License 2.0
AppOptics APM Instrumentation Agent for Node.js
License: Apache License 2.0
log.patching('hapi.generator.request not a function');
^
ReferenceError: log is not defined
at patchGenerator (/home/xxxx/xxxx/node_modules/appoptics-apm/dist/probes/hapi.js:154:5)
Getting this when requiring hapi.js
Noticed that in mongoose.js there is
const ao = require('..')
const log = ao.loggers
But i don't see the const log line in hapi.js. Maybe it was being defined in the surrounding code, but i couldn't see it. i guess would this would only fly if an app was using hapi.
When i manually edit my node_modules hapi.js file to have the const log = ao.loggers line things start up.
We are running hapi 17.5 which might be why this line of code is firing anyways.
v5.4.0 of your stuff.
patchPathMethods()
removes fs.realpath.native
and fs.realpathSync.native
methods.
We are using socket.io and need to ignore socket.io requests to get real response time average. Is there any solution for this?
Here is the error message :
appoptics:error Can't load bindings +0ms
appoptics:error AppopticsAPM disabled due to: require failed: MODULE_NOT_FOUND +2ms
appoptics:error api key _stats conflicts, ignoring +0ms
The key is valid (if I remove the APPOPTICS_SERVICE_KEY, I have a no valid service key), this happens with the key.
First line of App.js is require('appoptics-apm');
Is it possible to use import syntax instead of require ?
Hi,
node and pm2 version
v10.10.0 and 3.2.2
cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Getting below error in logs and service is not getting registered.
Logs:
appoptics:error Can't load bindings Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /data/pwaReact/capistranoDeployment_PWA/releases/20201203201522/node_modules/appoptics-bindings/build/Release/appoptics-bindings.node)
appoptics:error AppopticsAPM disabled due to: require failed:
appoptics:error api key _stats conflicts, ignoring
os - ubuntu 14.04
node version - 6.9.4
stack trace from error -
appoptics:warn ao.bind - no context Error: CLS NOT ACTIVE
at Object.exports.bind (//node_modules/appoptics-apm/lib/index.js:638:17)
at Query._wrapCallback (//node_modules/appoptics-apm/lib/probes/mongoose.js:91:37)
at Query.findOne (//node_modules/mquery/lib/mquery.js:1811:19)
at Query._findOne (//node_modules/mongoose/lib/query.js:1522:22)
at //node_modules/kareem/index.js:250:8
at //node_modules/kareem/index.js:23:7
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
https://github.com/bmacnaughton/debug-custom/blob/master/LICENSE
contains
MIT License
Copyright (c) 2019 Bruce MacNaughton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
We just implemented appoptics in a some nodejs servers that we run and found an endless stream of these errors in the logs. We can't find what we're doing wrong here.
2018-06-18T09:13:17.026Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.026Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.026Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.027Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.027Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.027Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.027Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.027Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.033Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.033Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.033Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.033Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.034Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:17.034Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:17.042Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.042Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:17.042Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:17.042Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.042Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.042Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:17.043Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.043Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.043Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:17.044Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:17.044Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.044Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:17.046Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:17.046Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:17.506Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.506Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:17.506Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:17.554Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:17.554Z appoptics:warn ao.bind anonymous - not tracing
2018-06-18T09:13:18.049Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:18.050Z appoptics:warn ao.bind - not tracing
2018-06-18T09:13:18.050Z appoptics:warn ao.bind undefined - not tracing
2018-06-18T09:13:18.051Z appoptics:warn instrumentHttp: no last span or disabled
2018-06-18T09:13:18.051Z appoptics:error express.profiledRoute failed to build span
2018-06-18T09:13:18.064Z appoptics:warn ao.bind - no context Error: CLS NOT ACTIVE
at Object.exports.bind (/usr/src/app/node_modules/appoptics-apm/dist/index.js:555:15)
at Promise._addCallbacks (/usr/src/app/node_modules/appoptics-apm/dist/probes/bluebird.js:14:31)
at Promise._then (/usr/src/app/node_modules/bluebird/js/release/promise.js:270:16)
at Promise.then (/usr/src/app/node_modules/bluebird/js/release/promise.js:125:17)
at Object.request (/usr/src/app/util/soapclient.js:83:5)
at /usr/src/app/routes/alteration.js:247:5
at
at process._tickCallback (internal/process/next_tick.js:188:7)
2018-06-18T09:13:18.065Z appoptics:warn ao.bind anonymous - no context Error: CLS NOT ACTIVE
at Object.exports.bind (/usr/src/app/node_modules/appoptics-apm/dist/index.js:555:15)
at Promise._addCallbacks (/usr/src/app/node_modules/appoptics-apm/dist/probes/bluebird.js:14:49)
at Promise._then (/usr/src/app/node_modules/bluebird/js/release/promise.js:270:16)
at Promise.then (/usr/src/app/node_modules/bluebird/js/release/promise.js:125:17)
at Object.request (/usr/src/app/util/soapclient.js:83:5)
at /usr/src/app/routes/alteration.js:247:5
at
at process._tickCallback (internal/process/next_tick.js:188:7)
2018-06-18T09:13:18.066Z appoptics:warn ao.bind undefined - no context Error: CLS NOT ACTIVE
at Object.exports.bind (/usr/src/app/node_modules/appoptics-apm/dist/index.js:555:15)
at Promise._addCallbacks (/usr/src/app/node_modules/appoptics-apm/dist/probes/bluebird.js:14:66)
at Promise._then (/usr/src/app/node_modules/bluebird/js/release/promise.js:270:16)
at Promise.then (/usr/src/app/node_modules/bluebird/js/release/promise.js:125:17)
at Object.request (/usr/src/app/util/soapclient.js:83:5)
at /usr/src/app/routes/alteration.js:247:5
at
at process._tickCallback (internal/process/next_tick.js:188:7)
Are we forgetting something?
Hello,
I have a situation where our production servers don’t have the required gcc version i.e 4.7 and above. Now, since it’s a system library we don’t know what applications, libraries will be impacted if we upgrade gcc version.
Please let us know if there is a possibility of installing [email protected] and passing this gcc path to appoptics module using some env var or configuration
We have tested this agent on our staging server by upgrading gcc but we want to mitigate risk in production.
Hi,
I'm trying to add the appoptics-apm to our Angular Universal app but I encounter this error.
2022-09-07T14:24:39.509Z appoptics:error Can't load ace-context Error: Cannot find module 'ace-context'
at webpackEmptyContext (/srv/app/dist/front/server/main.js:527845:10)
at Object.qnQl (/srv/app/dist/front/server/main.js:476936:39)
at __webpack_require__ (/srv/app/dist/front/server/main.js:20:30)
at Object.uj+Y (/srv/app/dist/front/server/main.js:516474:1)
at __webpack_require__ (/srv/app/dist/front/server/main.js:20:30)
at Object.0 (/srv/app/dist/front/server/main.js:34341:18)
at __webpack_require__ (/srv/app/dist/front/server/main.js:20:30)
at /srv/app/dist/front/server/main.js:84:18
at Object.<anonymous> (/srv/app/dist/front/server/main.js:87:10)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
2022-09-06T14:47:10.318Z appoptics:error AppopticsAPM disabled due to: context provider not loaded, appoptics-bindings not loaded due to previous errors
The ace-context
is visible in our node_modules but I think that webpack does not include it in the build.
Any idea why I have this error ?
New version, 5.6.1, seems to be outputing some more errors. perhaps around hapi 17 issues.
appoptics:error task IDs don't match (hapi:exit 2b:ed05fc21686947f5b6b5f4a916945b820a33ebae:41331a48f2358f5c:01 vs mongodb-core:exit 2b:caee8ca001bf30003dc73c82dd9137ded0b5956c:35cd2c7498577354:01) +0ms
appoptics:error hapi:exit 2b:ed05fc21686947f5b6b5f4a916945b820a33ebae:41331a48f2358f5c:01 tried to add empty edge +1ms
appoptics:error task IDs don't match (hapi:exit 2b:caee8ca001bf30003dc73c82dd9137ded0b5956c:f9bcd4b38045a0a7:01 vs hapi:exit 2b:ed05fc21686947f5b6b5f4a916945b820a33ebae:41331a48f2358f5c:01) +4ms
appoptics:error hapi:exit 2b:caee8ca001bf30003dc73c82dd9137ded0b5956c:f9bcd4b38045a0a7:01 tried to add empty edge +0ms
appoptics:error task IDs don't match (hapi:exit 2b:fb43b5b42bd419e0f3560d6f840857e0f5953332:5c22a6f0b679f207:01 vs hapi:exit 2b:a0897b35d896c95411143f546bc8f0b2d58b7e5d:81bedeabf0c8eada:01) +2s
appoptics:error hapi:exit 2b:fb43b5b42bd419e0f3560d6f840857e0f5953332:5c22a6f0b679f207:01 tried to add empty edge +0ms
appoptics:error task IDs don't match (hapi:exit 2b:c80fa03f7285f57138ff6fc07e397e3476f23fb8:b04445548e0e3b84:00 vs hapi:exit 2b:269e12b562f922209f08067087b5c34a34e007fa:984043fbca7045b7:00) +7s
appoptics:error task IDs don't match (hapi:exit 2b:33c8313c036d5e45ff0fb4b7b46fa562e6397586:ced3d71607595a67:00 vs hapi:exit 2b:c464ac21faabca994c1c74ec73ee6ec43d92a13f:f02115dbbda4bc8b:01) +4s
I'm currently trying to evaluate App Optics in combination with node and postgres. I have a version of the server app running on node 10.2.1 inside a docker container, but when I try to start the server I get an error:
2018-09-20T11:03:00.957Z appoptics:warn ao.bind - no context Error: CLS NOT ACTIVE
at Object.exports.bind (./node_modules/appoptics-apm/dist/index.js:659:17)
at Client.connect (./node_modules/appoptics-apm/dist/probes/pg.js:78:49)
at Pool.connect (/./node_modules/pg-pool/index.js:207:12)
at config.promise (./node_modules/pg-promise/lib/connect.js:22:11)
at new Promise (<anonymous>)
at Object.promise (./node_modules/pg-promise/lib/promise.js:23:20)
at poolConnect (./node_modules/pg-promise/lib/connect.js:11:19)
at Object.pool (./node_modules/pg-promise/lib/connect.js:127:24)
at Database.query (./node_modules/pg-promise/lib/database.js:304:36)
at Database.query (./node_modules/massive/lib/database.js:377:29)
at Database.reload (./node_modules/massive/lib/database.js:202:10)
at module.exports (./node_modules/massive/index.js:32:59)
at module.exports (./packages/.../server/config/database.js:6:10)
at listen (./packages/.../server/server.js:21:28)
at Object.<anonymous> (./packages/.../server/server.js:17:1)
at Module._compile (internal/modules/cjs/loader.js:702:30)
After this, I get information about the http requests on my dashboard, but the database connection isn't working. Any request that hits the database gets a similar warning.
The chain of dependencies means that we're using the 7.x series of pg drivers, so is there a roadmap for when you might be upgrading to use those, or am I barking up the wrong tree with that?
Further to my conversation with AppOptics support staff, we were discussing potential options to disable certain errors from being recorded by the agent.
I'm currently having an issue where my exception logs are full of thousands of these exceptions:
ENOENT: no such file or directory, stat
They aren't of any use to us, so it would be great to have an option to filter these out of the dashboard (https://my.appoptics.com/apm/ - > Exceptions). Or more effectively, tell the agent to ignore these before pushing up to AppOptiocs.
Many thanks
Martin
When I start my nodejs application using pm2, I don't receive any error in the logs and the service is able to successfully added on the apm dashboard.
https://docs.appoptics.com/kb/apm_tracing/nodejs/install/#dependencies
the above requirements are satisfied and I'm still not able to see any transactions/ avg response time/ request rate/ error rate etc on the dashboards.
Sharing other helpful information for diagnose purpose:
node and pm2 version
v10.10.0 and 3.2.2
cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
npm ls --json
"problems": [
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: eslint@>= 4.12.1, required by [email protected]",
"peer dep missing: eslint@>=5.0.0, required by [email protected]",
"peer dep missing: eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0, required by [email protected]",
"peer dep missing: babel-core@^6.0.0 || ^7.0.0-0, required by [email protected]",
"peer dep missing: @types/googlemaps@^3.0.0, required by [email protected]",
"peer dep missing: @types/markerclustererplus@^2.1.29, required by [email protected]",
"peer dep missing: sass@^1.3.0, required by [email protected]",
"peer dep missing: fibers@>= 3.1.0, required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"missing: [email protected], required by [email protected]",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/core/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helpers/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-create-class-features-plugin/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-replace-supers/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-remap-async-to-generator/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-wrap-function/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/plugin-transform-classes/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-define-map/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-explode-assignable-expression/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/plugin-transform-function-name/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-module-transforms/node_modules/chalk",
"extraneous: [email protected] /data/pwaReact/capistranoDeployment_PWA/releases/20200907130344/node_modules/@babel/helper-simple-access/node_modules/chalk",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: ajv@>=5.0.0, required by [email protected]",
"peer dep missing: react@^15.5.4, required by [email protected]",
"peer dep missing: canvas@^2.5.0, required by [email protected]",
"peer dep missing: bufferutil@^4.0.1, required by [email protected]",
"peer dep missing: utf-8-validate@^5.0.2, required by [email protected]"
],
"appoptics-apm": {
"version": "8.1.0",
"from": "appoptics-apm@^8.1.0",
"resolved": "https://registry.npmjs.org/appoptics-apm/-/appoptics-apm-8.1.0.tgz",
"dependencies": {
"ace-context": {
"version": "1.0.1",
"from": "ace-context@^1.0.1",
"resolved": "https://registry.npmjs.org/ace-context/-/ace-context-1.0.1.tgz",
"dependencies": {
"async-hook-jl": {
"version": "1.7.6",
"from": "async-hook-jl@^1.7.6",
"resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz",
"dependencies": {
"stack-chain": {
"version": "1.3.7",
"from": "stack-chain@^1.3.7",
"resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz"
}
}
},
"emitter-listener": {
"version": "1.1.2",
"from": "emitter-listener@^1.0.1",
"resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz",
"dependencies": {
"shimmer": {
"version": "1.2.1",
"from": "shimmer@^1.2.0",
"resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz"
}
}
},
"semver": {
"version": "5.7.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
}
}
},
"array-flatten": {
"version": "2.1.2",
"from": "array-flatten@^2.1.2",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz"
},
"minimist": {
"version": "1.2.5",
"from": "minimist@^1.2.3",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
},
"semver": {
"version": "7.3.2",
"from": "semver@^7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz"
},
"appoptics-bindings": {
"version": "10.0.0",
"from": "appoptics-bindings@^10.0.0",
"resolved": "https://registry.npmjs.org/appoptics-bindings/-/appoptics-bindings-10.0.0.tgz",
"dependencies": {
"bindings": {
"version": "1.2.1",
"from": "bindings@~1.2.1",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz"
},
"nan": {
"version": "2.14.2",
"from": "nan@^2.14.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz"
},
"node-gyp": {
"version": "4.0.0",
"from": "node-gyp@^4.0.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-4.0.0.tgz",
"dependencies": {
"semver": {
"version": "5.3.0",
"from": "semver@~5.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
},
"tar": {
"version": "4.4.13",
"from": "tar@^4.4.8",
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
"dependencies": {
"fs-minipass": {
"version": "1.2.7",
"from": "fs-minipass@^1.2.5",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
"dependencies": {
"minipass": {
"version": "2.9.0",
"from": "minipass@^2.8.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz"
}
}
},
"minipass": {
"version": "2.9.0",
"from": "minipass@^2.8.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
},
"yallist": {
"version": "3.0.3",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz"
}
}
},
"minizlib": {
"version": "1.3.3",
"from": "minizlib@^1.2.1",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
"dependencies": {
"minipass": {
"version": "2.9.0",
"from": "minipass@^2.8.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz"
}
}
},
"chownr": {
"version": "1.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz"
},
"mkdirp": {
"version": "0.5.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"
},
"safe-buffer": {
"version": "5.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
},
"yallist": {
"version": "3.0.3",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz"
}
}
},
"glob": {
"version": "7.1.4",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz"
},
"graceful-fs": {
"version": "4.2.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz"
},
"mkdirp": {
"version": "0.5.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"
},
"nopt": {
"version": "3.0.6",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz"
},
"npmlog": {
"version": "4.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz"
},
"osenv": {
"version": "0.1.5",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz"
},
"request": {
"version": "2.88.0",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz"
},
"rimraf": {
"version": "2.7.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz"
},
"which": {
"version": "1.3.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz"
}
}
},
"linux-os-info": {
"version": "2.0.0",
"from": "linux-os-info@^2.0.0",
"resolved": "https://registry.npmjs.org/linux-os-info/-/linux-os-info-2.0.0.tgz"
},
"node-addon-api": {
"version": "2.0.2",
"from": "node-addon-api@^2.0.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz"
}
}
},
"cls-hooked": {
"version": "4.2.2",
"from": "cls-hooked@^4.2.2",
"resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz",
"dependencies": {
"async-hook-jl": {
"version": "1.7.6",
"from": "async-hook-jl@^1.7.6",
"resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz"
},
"emitter-listener": {
"version": "1.1.2",
"from": "emitter-listener@^1.0.1",
"resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz"
},
"semver": {
"version": "5.7.1",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
}
}
},
"debug-custom": {
"version": "1.1.0",
"from": "debug-custom@^1.0.5",
"resolved": "https://registry.npmjs.org/debug-custom/-/debug-custom-1.1.0.tgz",
"dependencies": {
"debug": {
"version": "4.2.0",
"from": "debug@^4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"dependencies": {
"ms": {
"version": "2.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
}
}
}
}
},
"glob": {
"version": "7.1.4",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz"
},
"methods": {
"version": "1.1.2",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"ximmer": {
"version": "1.2.1",
"from": "ximmer@^1.2.1",
"resolved": "https://registry.npmjs.org/ximmer/-/ximmer-1.2.1.tgz"
}
}
},
4. "appoptics-apm": "^8.1.0"
Can someone help me please?
regards
Mohit Rathi
appoptics:error ao.runInstrument failed to build span TypeError: Cannot read property 'value' of undefined at ao.instrument.args.(anonymous function).userCallback (/home/folder/baseplate/node_modules/appoptics-apm/dist/probes/tedious.js:37:56) at runInstrument (/home/folder/baseplate/node_modules/appoptics-apm/dist/index.js:734:45) at Object.exports.instrument (/home/folder/baseplate/node_modules/appoptics-apm/dist/index.js:1124:14) at Connection.<anonymous> (/home/folder/baseplate/node_modules/appoptics-apm/dist/probes/tedious.js:36:17) at Connection.callProcedure (/home/folder/baseplate/node_modules/tedious/lib/connection.js:1293:12) at parent.acquire (/home/folder/baseplate/node_modules/mssql/lib/tedious.js:1022:20) at _acquire.then.connection (/home/folder/baseplate/node_modules/mssql/lib/base.js:172:42) at <anonymous> +10ms
The app seems to be working and sql calls are being logged. setting ao.errorlevel = '' for now, but would rather know these are happening. would get flooded though. might be nice to write these into something other than standard out.
Thanks in advance.
appoptics:warn ao.bind anonymous - no context Error: CLS NOT ACTIVE
at Object.exports.bind (/xxxxx/node_modules/appoptics-apm/dist/index.js:618:17)
at Pool.aaabbb (/xxxxx/node_modules/appoptics-apm/dist/probes/generic-pool.js:27:31)
at ConnectionPool._acquire (/xxxxxx/node_modules/mssql/lib/base.js:184:22)
at ConnectionPool.acquire (/xxxxxx/node_modules/mssql/lib/base.js:172:12)
at Immediate._query.err (/xxxxx/node_modules/mssql/lib/tedious.js:554:19)
at Immediate. (/xxxxx/node_modules/async-listener/glue.js:188:31)
Get this when my app starts up an every database call. Also, don't get any kind of db tracing.
node-mssql 4.0.1 uses tedious which seems in your supported range. It also use generic-pool 3.4.2 ( as of today ). I think you have generic pool support, but it seems quite old.
I changed generic-pool.js which is why you see pool.aaabbb and not pool anonymous. I couldn't quite figure out what function clsCheck() does, but i think its returning false.
Hello.
I'm getting error when trying to install as instructed
npm install --save appoptics-apm
However I'm getting this error.
[email protected] postinstall /usr/src/app/node_modules/appoptics-apm
./deps.sh
sh: 1: ./deps.sh: not found
npm info lifecycle [email protected]~postinstall: Failed to exec postinstall script
Possibly because deps.sh is missed in https://registry.npmjs.org/appoptics-apm/-/appoptics-apm-5.2.0.tgz
If I add
"appoptics-apm": "^5.0.2",
to package.json it seems installed with no errors. But I have no Traces in application however.
Below errors are getting logged in stdout at the same time when our Node process is getting restarted. At this point we're not sure if this is the main reason for process restarts or not. This is happening exactly after 12 hours at 11:30.
Below is the alert which we get.
Kubernetes POD Restart Alert: Namespace:: 99-discovery, Service:: discovery-99webreact, POD_Name:: discovery-99webreact-8467485d45-5gfqh has been restarted; restart-count:: 1, Reason: Completed, Exit-code: 0, Pod-Age: 7d, Worker-node: npl9dba10.ieil.net
Please tell possible reasons for this.
I am trying to use AppOptics in a nodejs project that uses the prisma library. I am also using esm imports, so I am instantiating AppOptics like so:
node -r appoptics-apm dist/src/main
The sequence of events that leads to the error:
function patchPathMethod (fs, method)
within this library wraps the fs.exists()
method.export async function resolveDistro(): Promise<undefined | GetOSResult['distro']> {
// https://github.com/retrohacker/getos/blob/master/os.json
const osReleaseFile = '/etc/os-release'
const alpineReleaseFile = '/etc/alpine-release'
if (await exists(alpineReleaseFile)) {
return 'musl'
} else if (await exists(osReleaseFile)) {
return parseDistro(await readFile(osReleaseFile, 'utf-8'))
} else {
return
}
}
exists()
is simply a promisified version of fs.exists()
const exists = promisify(fs.exists)
exsits()
causes the boolean value true
to be thrown instead of returned as it should be. The thrown boolean cascades into this error which crashes the application:TypeError: Cannot create property 'clientVersion' on boolean 'true'
at RequestHandler.handleRequestError (/home/project/node_modules/@prisma/client/runtime/index.js:31959:26)
at RequestHandler.handleAndLogRequestError (/home/project/node_modules/@prisma/client/runtime/index.js:31913:12)
at /home/project/node_modules/@prisma/client/runtime/index.js:32458:25
at async PrismaService._executeRequest (/home/project/node_modules/@prisma/client/runtime/index.js:33022:22)
at async PrismaService._request (/home/project/node_modules/@prisma/client/runtime/index.js:32994:16)
After debugging it for a while, I believe that the problem stems from the fact that patchPathMethod
within node_modules/appoptics-apm/lib/probes/fs.js
is not meant to override suppressedCallback
within the fs library.
I believe the fs library has changed in different versions of node but mine looks like this (node version v16.17.0):
/**
* Tests whether or not the given path exists.
* @param {string | Buffer | URL} path
* @param {(exists?: boolean) => any} callback
* @returns {void}
*/
function exists(path, callback) {
maybeCallback(callback);
function suppressedCallback(err) {
callback(err ? false : true);
}
try {
fs.access(path, F_OK, suppressedCallback);
} catch {
return callback(false);
}
}
Having a weird issue where when we upload an image the data is corrupted before we send it off to s3.
I imagine you could reproduce by having curl POST an image body to a node/hapi endpoint, write a file out, and see if its corrupted in some way. If I have time later maybe i can create a simple test case.
Did a bunch of digging and I can remove the behavior by disabling the 'emit' shimmer wrap.
In http.js
shimmer.wrap(proto, 'emit', function (realEmit) {
If just have the
if (type !== 'request') {
return realEmit.apply(this, arguments);
}
always be true everything is also fine.
I did a lot of trial and error stuff and I think it has something to with the patchEmitter(req) and ao.requestStore.run() stuff. I'm not really sure what .run() does so I'm kind of at a loss from there.
The corruption is weird, the file length seems to be be the same, but the data isn't the same. I might see if I can do a binary diff later as well. Maybe encoding is being changed in some way.
See title. Some officially supported typescript types would be helpful.
In probes/hapi.js line ~230 there is
shimmer.wrap(plugin, 'decorate', function (fn) {
return function (name, method, handler) {
if (name === 'server' && method === 'views') {
handler = wrapViews(handler);
}
return fn.call(this, name, method, handler);
};
});
It should be ( not sure if options is the best name or not )
shimmer.wrap(plugin, 'decorate', function (fn) {
return function (name, method, handler, options) {
if (name === 'server' && method === 'views') {
handler = wrapViews(handler);
}
return fn.call(this, name, method, handler, options);
};
});
We had a plugin ( Yar sessions ) that uses a 'request' scope decorate and passes in {apply:true}
server.decorate('request', 'yar', getState, {
apply: true
});
without apply : true the function basically only gets called once by hapi meaning that stops being a per request plugin and can share info. In this case it basically caused our sessions to be shared between requests which obviously broke some security stuff.
hapi@16 is getting task IDs don't match errors.
Hi,
Is there support for code profiling in current apm because I can't see stack trace in case of 503 timeouts, it simply shows "local code". Attaching a snapshot for your reference. It is visible in case of java apms. Please see in Java APM we get Request duration by function. It is helpful in identifying which part of code is actually taking time.
When i start my application i receive this error : "appoptics:error Can't load bindings Error: Cannot find module 'appoptics-bindings'"
Can someone help me?
Kind regards
Lorenz Fleerackers
We are moving to appoptics if you haven't guessed. We use hapi 17.5, but i think your support ends at 16.5. I think i got it going fixing the other issue, but i wonder if i'm going to get a good transaction name since we use also use hapi-openapi to server up a swagger/open api endpoint...so just get a single api transaction name :(. So hapi 17.5 might be working fine, and it could just be the way hapi-openapi registers routes.
I tried yarn and npm.
> [email protected] preinstall /Users/apple/GitProject/xxxxxxxx/node_modules/appoptics-apm/node_modules/appoptics-bindings
> node setup-liboboe
events.js:165
throw er; // Unhandled 'error' event
^
Error: spawn readelf ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:379:16)
at process._tickCallback (internal/process/next_tick.js:178:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
at onErrorNT (internal/child_process.js:379:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.