Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

seek-datadog-custom-metrics

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seek-datadog-custom-metrics - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

13

lib-commonjs/createLambdaExtensionClient.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createLambdaExtensionClient = void 0;
const datadog_lambda_js_1 = require("datadog-lambda-js");
/**
* Vendored from `datadog-lambda-js`.
*/
class DatadogLambdaJs {
}
/**
* Replaces tag special characters with an underscore

@@ -17,2 +21,5 @@ */

const createLambdaExtensionClient = (config) => {
const { datadog, sendDistributionMetric } =
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('datadog-lambda-js');
const send = (metric) => {

@@ -24,3 +31,3 @@ const { value } = metric;

if (config.metrics) {
(0, datadog_lambda_js_1.sendDistributionMetric)(name, value, ...tags);
sendDistributionMetric(name, value, ...tags);
}

@@ -42,3 +49,3 @@ };

return {
withLambdaExtension: (fn) => config.metrics ? (0, datadog_lambda_js_1.datadog)(fn) : fn,
withLambdaExtension: (fn) => (config.metrics ? datadog(fn) : fn),
metricsClient: {

@@ -45,0 +52,0 @@ increment: sendCount,

@@ -1,3 +0,7 @@

import { datadog, sendDistributionMetric } from 'datadog-lambda-js';
/**
* Vendored from `datadog-lambda-js`.
*/
class DatadogLambdaJs {
}
/**
* Replaces tag special characters with an underscore

@@ -14,2 +18,5 @@ */

export const createLambdaExtensionClient = (config) => {
const { datadog, sendDistributionMetric } =
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('datadog-lambda-js');
const send = (metric) => {

@@ -38,3 +45,3 @@ const { value } = metric;

return {
withLambdaExtension: (fn) => config.metrics ? datadog(fn) : fn,
withLambdaExtension: (fn) => (config.metrics ? datadog(fn) : fn),
metricsClient: {

@@ -41,0 +48,0 @@ increment: sendCount,

{
"name": "seek-datadog-custom-metrics",
"version": "4.2.0",
"version": "4.2.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "Helpers for sending Datadog custom metrics",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc