Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: changed to reflect 6.5 onenodeloader.js

...

Code Block
themeRDark
tar -xvzf dynatrace-nodejsagentone-agent-nodejs-6.25.0.12391289-linux-x64x86.tgz
rm dynatrace-nodejsagentone-agent-nodejs-6.25.0.12391289-linux-x64x86.tgz


Configure the Node.js application to utilize the Dynatrace agent

...

Code Block
themeRDark
languagejs
try {
    require('./dynatrace-oneagent-6.25/agent/nodejsbin/nodejsagentany/onenodeloader.js')({server: 'http://192.168.1.48:8042', agentName: Sample_node_application});
} catch (err) {
    console.error(err.toString());
}

...

Code Block
themeRDark
languagejs
var cfenv = require("cfenv")
var appEnv = cfenv.getAppEnv()
var dynatraceEnv = appEnv.getServiceCreds(/cf-dynatrace-nodejs/)
var dynatraceServer = dynatraceEnv.server
try {
    require('./dynatrace-oneagent-6.25/agent/nodejsbin/nodejsagentany/onenodeloader.js')({server: dynatraceServer, agentName: appEnv.name});
} catch (err) {
    console.error(err.toString());
}

...