How to use the epsagon.label function in epsagon

To help you get started, we’ve selected a few epsagon 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 epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github epsagon / epsagon-node / test / acceptance / lambda-handlers / handler.js View on Github external
matrixFunctions.labels = epsagon.lambdaWrapper((event, context, callback) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify({
            message: 'It Worked!',
            input: event,
        }),
    };
    epsagon.label('label-key', 'label-value');
    epsagon.label(null, null);
    epsagon.label('label-key', 12);
    epsagon.label(12, 12);
    epsagon.label(12, null);
    epsagon.label('12', null);

    callback(null, response);
});
github comicrelief / lambda-wrapper / src / Service / Logger.service.js View on Github external
label(descriptor, silent = false) {
    if (
      typeof process.env.EPSAGON_TOKEN === 'string'
      && process.env.EPSAGON_TOKEN !== 'undefined'
      && typeof process.env.EPSAGON_SERVICE_NAME === 'string'
      && process.env.EPSAGON_SERVICE_NAME !== 'undefined'
    ) {
      Epsagon.label(descriptor);
    }

    if (silent === false) {
      logger.log('info', `label - ${descriptor}`);
    }
  }
github comicrelief / lambda-wrapper / src / Service / Logger.service.js View on Github external
metric(descriptor, stat, silent = false) {
    if (
      typeof process.env.EPSAGON_TOKEN === 'string'
      && process.env.EPSAGON_TOKEN !== 'undefined'
      && typeof process.env.EPSAGON_SERVICE_NAME === 'string'
      && process.env.EPSAGON_SERVICE_NAME !== 'undefined'
    ) {
      Epsagon.label(descriptor, stat);
    }

    if (silent === false) {
      logger.log('info', `metric - ${descriptor} - ${stat}`);
    }
  }
}

epsagon

Epsagon Instrumentation for Node.js

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis