Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Latest commit

 

History

History
46 lines (30 loc) · 1.47 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.47 KB

Epsagon Instrumentation for OpenWhisk

Build Status npm version semantic-release

Installation

From your project directory:

npm install --save epsagon-openwhisk

Getting started (Apache 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 main function
}

module.exports.main = epsagon.openWhiskWrapper(main, {
    token_param: 'EPSAGON_TOKEN', // name of the action parameter to take the token from
    appName: 'my-app-name'
    metadataOnly: false // Optional, send more trace data
});

You can then pass the EPSAGON_TOKEN as a default parameter into your action using the wsk command line client:

$ wsk action update <myaction> --parameter EPSAGON_TOKEN <your-epsagon-token>

Copyright

Provided under the MIT license. See LICENSE for details.

Copyright 2019, Epsagon