Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
feat(monitoring): add epsagon wrapper
Browse files Browse the repository at this point in the history
see #104
  • Loading branch information
trieloff committed Jun 11, 2019
1 parent 563b2f9 commit 2d52627
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 1,214 deletions.
19 changes: 18 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
* governing permissions and limitations under the License.
*/
const publish = require('./src/publish');
const epsagon = require('epsagon');

epsagon.init({
token: 'ef190fb8-5a16-4923-9148-ee7899c8564b',
appName: 'helix-publish',
metadataOnly: false, // Optional, send more trace data
});

async function main(params) {
// log the date to get the response time
Expand Down Expand Up @@ -38,4 +45,14 @@ async function main(params) {
return result;
}

module.exports.main = main;
async function wrap(params) {
epsagon.init({
token: params.EPSAGON_TOKEN,
appName: 'helix-publish',
metadataOnly: false, // Optional, send more trace data
});

return epsagon.openWhiskWrapper(main)(params);
}

module.exports.main = wrap;
Loading

0 comments on commit 2d52627

Please sign in to comment.