kieker-javascript-cli v0.11.4
kieker-javascript-cli
Instrument your JS code via commmand-line
Install
$ npm install --global kieker-javascript-cli
Usage
$ kieker ./bundle.js ./instruentedBundle.js
Configuration
The configuration is done as part of the `package.json:
{
...
"kieker": {
"serverUrl": "http://localhost:8000",
"input": "./index.js", // optional
"output": "./build.js", // optional
"workerOutput": "./worker.js",
"advices": [{
"type": "function",
"exclude": { // blacklisting
"name": "private_*" // any valid regex
},
"include": { // whitelisting
"type": "function" // method or function
}
}, {
"type": "function", // multiple advices of same type possible
"include": {
"type": "method"
}
}, {
"type": "metainformation",
"include": ["os", "version", "name"]
}],
"writer": [{
"type": "console",
"logLevel": "info"
}, {
"type": "websocket",
"serverUrl": "http://myKiekerDataBridge.com:3333"
}]
}
...
}
input
First argument of the kieker
command or default to be set in config. If so the output argument has to be set, too.
output
First argument of the kieker
command or default to be set in config. If so the input argument has to be set, too.
advices
An array of objects containing the configuration for the advices. Advices are the foundation of this library, as they collect the data to be monitored. They may be found on npm.
Writing your own Advice
- If the advice needs an own Kieker Record, please enhance the kieker instrumentation-languages, specifically the Javascript one
- As you (most likely) need some form of configuration or automated instrumentation to be used in this cli you need to add your package to this
package.json
. - For Configuration: Please see kieker-javascript-advice-environment as an example - For automated instrumentation: Please see kieker-javascript-advice-function as an example
writer
Writer work in a separate thread and send the data to the destination you want. They may be found on npm.
FAQ
require is not a function / undefined
The problem is that you are currently not using a build tool which
- inlines the required JS files or
- provides a require function in both the normal and the worker thread
To solve this, please use browserify in your build chain.
License
MIT © Daniel Schmidt
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago