OpenWhisk

You should pass the Epsagon token to your action as a default parameter, so that you don't have to expose important credentials in your code.
The name of the parameter can be configured using token_param, in this example we use epsagon-token:

const epsagon = require('epsagon');

function main(params) {
  // Your code is here
}

module.exports.main = epsagon.openWhiskWrapper(
  main,
  {
    token_param: 'epsagon-token', // name of the action parameter to take the token from
    appName: 'app-name-stage',
    metadataOnly: false
  }
);

Did this page help you?