How to use the @instana/core.util.applicationUnderMonitoring function in @instana/core

To help you get started, we’ve selected a few @instana/core 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 / metrics / npmPackageName.js View on Github external
exports.activate = function activate() {
  coreUtil.applicationUnderMonitoring.getMainPackageJson(rootDir.root, (err, pckg) => {
    if (err) {
      logger.warn('Failed to determine main package json. Reason: ', err.message, err.stack);
    }

    if (!err && pckg) {
      exports.currentPayload = pckg.name;
    }
  });
};
github instana / nodejs-sensor / packages / aws-lambda / src / metrics / npmPackageDescription.js View on Github external
exports.activate = function activate() {
  coreUtil.applicationUnderMonitoring.getMainPackageJson(rootDir.root, (err, pckg) => {
    if (err) {
      logger.warn('Failed to determine main package json. Reason: ', err.message, err.stack);
    }

    if (!err && pckg) {
      exports.currentPayload = pckg.description;
    }
  });
};
github instana / nodejs-sensor / packages / aws-lambda / src / metrics / npmPackageVersion.js View on Github external
exports.activate = function activate() {
  coreUtil.applicationUnderMonitoring.getMainPackageJson(rootDir.root, (err, pckg) => {
    if (err) {
      logger.warn('Failed to determine main package json. Reason: ', err.message, err.stack);
    }

    if (!err && pckg) {
      exports.currentPayload = pckg.version;
    }
  });
};