exframe-trace

exframe Trace Module ====================================

Usage no npm install needed!

<script type="module">
  import exframeTrace from 'https://cdn.skypack.dev/exframe-trace';
</script>

README

exframe Trace Module

A component to expose AWS X-Ray

Use

Initialize at top

var tracer = require('exframe-trace');

After express init

const app = express();

tracer.init(app);

After all routes

app.get('/', (req, res) => {});

tracer.close();

Environment Variables

Name Description Default
AWS_XRAY_DEBUG_MODE Enables logging to console output. false
AWS_XRAY_TRACING_NAME For overriding the default segment name to use with the middleware. npm_package_name
AWS_XRAY_DAEMON_ADDRESS For setting the daemon address and port. localhost:2000
AWS_XRAY_CONTEXT_MISSING For setting the SDK behavior when trace context is missing. RUNTIME_ERROR
TRACE_ENABLED For enabling and disabling tracing true
TRACE_CAPTURE_HTTP Enable tracing HTTP requests true
TRACE_ENABLE_EC2_PLUGIN Record AWS EC2 instance true