seek-datadog-custom-metrics
Advanced tools
Comparing version 4.6.2 to 4.6.3
@@ -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}.`, |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60013
875