��
## Build
Use ubuntu 18.0.4 for building. Windows and centos 7 build is currently not working
javascript
npm i
npm run prepare
npm run check
##
## Publish to npm registry
NPM registry used for this project is at https://www.npmjs.com/package/@sage2e/uhm-nodejs-agent.
*SAGe2e* is an org in my npm account. Developers can be added by *Invite members* option with read & publish access for this package, who can then publish changes from their account
Step for publishing:
javascript
make all changes
increment version in package.json (refer to this link for details on npm semantic versioning https://docs.npmjs.com/about-semantic-versioning)
commit all changes to src repo
build the project
$npm login - with you npm credentials
$npm publish --access public
##
## Installation nodejs module
> npm install @sage2e/uhm-nodejs-agent@latest --save
##
## Initialization
It s important that the agent is started before you require any other modules in your Node.js application. and you should
require and start the agent in your application s main file.
`javascript
try{
require('@sage2e/uhm-nodejs-agent').initialize("/home/saguser"); // The directory path where your config files are placed
}
catch (err){
// handle by wmio
}
`
logConfig.json should have the following defined: logLevel, maxsize, maxFiles
Logs are created under :
configDirectory/../logs
i.e if your config directory is /home/saguser/config
then logs will be at /home/saguser/logs
Package detail
@sag_e2e/uhm-nodejs-agent
A nodejs agent for skyapm agents