Last active
February 14, 2018 14:26
-
-
Save coreylight/b2e62e8da79e9cf554f1ed404047c037 to your computer and use it in GitHub Desktop.
IOpipe with plugins for webpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const iopipe = require('@iopipe/core'); | |
const eventInfoPlugin = require('@iopipe/event-info'); | |
const tracePlugin = require('@iopipe/trace'); | |
module.exports = iopipe({ | |
plugins: [ | |
tracePlugin(), | |
eventInfoPlugin() | |
] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const iopipeWrapper = require('./iopipeWrapper'); | |
module.exports = iopipeWrapper((event, context) => { | |
// insert lambda business logic here | |
context.iopipe.mark.start('sample-trace'); | |
// do some work you want to trace | |
context.iopipe.mark.end('sample-trace'); | |
context.iopipe.log('custom-metric', 100); | |
context.succeed(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment