liskarchive / lisk-newrelic Goto Github PK
View Code? Open in Web Editor NEW📟 NewRelic instrumentation for Lisk Core
License: GNU General Public License v3.0
📟 NewRelic instrumentation for Lisk Core
License: GNU General Public License v3.0
Engines are aligned to the main repository.
Engines produces an error when installing this library on Lisk Core. This is due to our engines are not aligned.
For reference:
LiskHQ/lisk-sdk@d71abe6
Dependencies are updated. After LiskHQ/lisk-sdk#2500, this repository should follow.
Dependencies are outdated.
ncu
Following Lisk Core, the Node.js version should be updated to v8.14.0, which implements the newest security updates- https://nodejs.org/en/blog/release/v8.14.0/
The current Node.js version is 8.12.0
0.1.0
Use same Node.js version as Core, see LiskHQ/lisk-sdk#3124
Node.js version 10.14.1
is set in package.json
.
Run npm install
0.1.0
Instrumentation path for API Controllers should framework/src/modules/http_api/controllers
API Controllers path is wrong and it's pointing to the old 1.5.0
folder structure: api/controllers
whereas now is framework/src/modules/http_api/controllers
1.6
As we decided to remove newrelic and we want to provide our own implementation of monitor a node for SDK.
Following Lisk Core, the Node.js version should be updated to v10.14.1, which implements - https://nodejs.org/en/blog/release/v10.14.1/
The current Node.js version is 8.14.0
0.1.0
The interface instrumentWeb
interface method should record HTTP activity http_api module with new structure.
Due to file restructuring 1.6 this method is broken. It seems much better to remove that method from this repository and keep the module specific instrumentation inside respective modules. We must keep shared instruments still in here.
I'm not sure how this should work, but probably it shouldn't modify existing behavior in such a way.
It's wrapping functions passed to jobsQueue
:
New job registered: broadcasterReleaseQueue, isAsync: false, type: function wrappedJob(cb) {
newrelic.startBackgroundTransaction(name, 'jobQueue', () => {
const transaction = newrelic.getTransaction();
originalJob.call(this, () => {
transaction.end();
cb.call(this);
});
});
}
so making this check to fail:
https://github.com/LiskHQ/lisk-sdk/blob/4ac6c58536c1b52883ed9c528bda1794b4fc1463/framework/src/modules/chain/helpers/jobs_queue.js#L68-L70
Add:
console.log(`New job registered: ${name}, isAsync: ${util.types.isAsyncFunction(job)}, type: ${job}`);
here:
https://github.com/LiskHQ/lisk-sdk/blob/4ac6c58536c1b52883ed9c528bda1794b4fc1463/framework/src/modules/chain/helpers/jobs_queue.js#L48
Enable New Relic, run the node.
2.0.0-alpha.2
Expect to be able to build lisk in an environment that has a policy of using LTS node versions.
Unable to build.
npm info it worked if it ends with ok
--
| npm info using [email protected]
| npm info using [email protected]
| npm info lifecycle [email protected]~preinstall: [email protected]
| npm timing stage:loadCurrentTree Completed in 11ms
| npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
| npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1010ms
| npm http fetch GET 200 https://registry.npmjs.org/axios 521ms
| npm http fetch GET 200 https://registry.npmjs.org/is-buffer 36ms
| npm info lifecycle [email protected]~prepack: [email protected]
| npm info lifecycle [email protected]~postpack: [email protected]
| npm timing stage:rollbackFailedOptional Completed in 0ms
| npm timing stage:runTopLevelLifecycles Completed in 4567ms
| npm ERR! code ENOTSUP
| npm ERR! notsup Unsupported engine for [email protected]: wanted: {"node":"10.15.3","npm":"6.4.1"} (current: {"node":"10.16.0","npm":"6.9.0"})
| npm ERR! notsup Not compatible with your version of node/npm: [email protected]
| npm ERR! notsup Not compatible with your version of node/npm: [email protected]
| npm ERR! notsup Required: {"node":"10.15.3","npm":"6.4.1"}
| npm ERR! notsup Actual: {"npm":"6.9.0","node":"10.16.0"}
| npm timing npm Completed in 5421ms
Try building with a where a LTS version is required, eg, using node s2i ( eg https://github.com/nodeshift/centos7-s2i-nodejs or https://github.com/sclorg/s2i-nodejs-container/tree/master/10) .
I have the same issue in the Lisq-core project (see LiskHQ/lisk-core#79).
I can see that newrelic-lisk
is used at https://github.com/LiskHQ/lisk-sdk/blob/942d320795d13cf0ad83e33d8e78c07357ae8700/framework/src/modules/chain/utils/newrelic_lisk.js#L20 but cannot see where, in which package.json
file this module is specified.
lisk-newrelic
?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.