How to use the @instana/serverless.environment.isValid function in @instana/serverless

To help you get started, we’ve selected a few @instana/serverless examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instana / nodejs-sensor / packages / aws-lambda / src / index.js View on Github external
'use strict';

const { environment: environmentUtil } = require('@instana/serverless');

environmentUtil.validate();

if (environmentUtil.isValid()) {
  module.exports = exports = require('./wrapper');
} else {
  module.exports = exports = require('./noop_wrapper');
}

// required for backwards compatibility
exports.awsLambda = module.exports;

@instana/serverless

Internal utility package for serverless Node.js tracing and monitoring with Instana

MIT
Latest version published 3 days ago

Package Health Score

84 / 100
Full package analysis