0.11.4 • Published 8 years ago

kieker-javascript-cli v0.11.4

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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

0.11.4

8 years ago

0.11.3

8 years ago

0.10.0

8 years ago

0.9.2

8 years ago

0.9.0

8 years ago

0.8.5

8 years ago

0.8.4

8 years ago

0.8.3

8 years ago

0.8.2

8 years ago

0.8.1

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.9

8 years ago

0.3.8

8 years ago

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago