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.6.2 to 4.6.3

5

lib-commonjs/createStatsDClient.js

@@ -16,6 +16,9 @@ "use strict";

const createStatsDClient = (StatsD, config, errorHandler) => {
var _a;
// istanbul ignore next: Jest is not picking up coalesce coverage
const host = (_a = config.metricsServer) !== null && _a !== void 0 ? _a : undefined;
const client = new StatsD({
// Disable ourselves if there's no configured metrics server
mock: !config.metricsServer,
host: config.metricsServer,
host,
errorHandler,

@@ -22,0 +25,0 @@ prefix: `${config.name}.`,

@@ -13,6 +13,9 @@ import { globalTags } from './globalTags';

export const createStatsDClient = (StatsD, config, errorHandler) => {
var _a;
// istanbul ignore next: Jest is not picking up coalesce coverage
const host = (_a = config.metricsServer) !== null && _a !== void 0 ? _a : undefined;
const client = new StatsD({
// Disable ourselves if there's no configured metrics server
mock: !config.metricsServer,
host: config.metricsServer,
host,
errorHandler,

@@ -19,0 +22,0 @@ prefix: `${config.name}.`,

6

lib-types/AppConfig.d.ts

@@ -15,6 +15,6 @@ /**

*
* This is used to tag custom metrics. It will typically be a CI build
* number.
* This is used to tag custom metrics. It will typically include a CI build
* number and/or a commit hash.
*/
version?: string;
version?: string | null | undefined;
/**

@@ -21,0 +21,0 @@ * Environment of the application

@@ -25,3 +25,3 @@ import type { AppConfig } from './AppConfig';

*/
metricsServer?: string;
metricsServer?: string | null | undefined;
}

@@ -38,3 +38,3 @@ /**

*/
export declare const createStatsDClient: <T extends InternalStatsD>(StatsD: StatsD<T>, config: StatsDConfig, errorHandler?: ((err: Error) => void) | undefined) => T;
export declare const createStatsDClient: <T extends InternalStatsD>(StatsD: StatsD<T>, config: StatsDConfig, errorHandler?: (err: Error) => void) => T;
export {};

@@ -17,3 +17,3 @@ import type { MetricsClient } from './MetricsClient';

*/
export declare const createTimedSpan: (metricsClient: TimingMetricsClient) => <T>(name: string, block: () => PromiseLike<T>, afterCompletion?: ((duration: number, success: boolean, result: T | undefined) => AfterCompletion | void) | undefined, tags?: string[]) => Promise<T>;
export declare const createTimedSpan: (metricsClient: TimingMetricsClient) => <T>(name: string, block: () => PromiseLike<T>, afterCompletion?: (duration: number, success: boolean, result: T | undefined) => AfterCompletion | void, tags?: string[]) => Promise<T>;
export {};
{
"name": "seek-datadog-custom-metrics",
"version": "4.6.2",
"version": "4.6.3",
"private": false,

@@ -37,7 +37,7 @@ "description": "Helpers for sending Datadog custom metrics",

"devDependencies": {
"@types/node": "20.11.30",
"datadog-lambda-js": "8.107.1",
"dd-trace": "5.5.0",
"@types/node": "20.12.7",
"datadog-lambda-js": "8.108.0",
"dd-trace": "5.10.0",
"hot-shots": "10.0.0",
"skuba": "8.0.0"
"skuba": "8.0.1"
},

@@ -44,0 +44,0 @@ "peerDependencies": {

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