@loglayer/mixin-datadog-http-metrics 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -37
- package/dist/index.d.cts +1 -2070
- package/dist/index.d.mts +1 -2070
- package/dist/index.mjs +1 -36
- package/package.json +4 -1
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
let datadog_metrics = require("datadog-metrics");
|
|
25
25
|
datadog_metrics = __toESM(datadog_metrics, 1);
|
|
26
|
+
let loglayer = require("loglayer");
|
|
26
27
|
//#region src/client.ts
|
|
27
28
|
let metricsClient = null;
|
|
28
29
|
/**
|
|
@@ -52,42 +53,6 @@ function getMetricsClient() {
|
|
|
52
53
|
return metricsClient;
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
|
55
|
-
//#region ../../core/plugin/dist/index.js
|
|
56
|
-
/**
|
|
57
|
-
* List of plugin callbacks that can be called by the plugin manager.
|
|
58
|
-
*
|
|
59
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#transformloglevel | transformLogLevel Docs}
|
|
60
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#onbeforedataout | onBeforeDataOut Docs}
|
|
61
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#shouldsendtologger | shouldSendToLogger Docs}
|
|
62
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#onmetadatacalled | onMetadataCalled Docs}
|
|
63
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#onbeforemessageout | onBeforeMessageOut Docs}
|
|
64
|
-
* @see {@link https://loglayer.dev/plugins/creating-plugins.html#oncontextcalled | onContextCalled Docs}
|
|
65
|
-
*/
|
|
66
|
-
let PluginCallbackType = /* @__PURE__ */ function(PluginCallbackType) {
|
|
67
|
-
PluginCallbackType["transformLogLevel"] = "transformLogLevel";
|
|
68
|
-
PluginCallbackType["onBeforeDataOut"] = "onBeforeDataOut";
|
|
69
|
-
PluginCallbackType["shouldSendToLogger"] = "shouldSendToLogger";
|
|
70
|
-
PluginCallbackType["onMetadataCalled"] = "onMetadataCalled";
|
|
71
|
-
PluginCallbackType["onBeforeMessageOut"] = "onBeforeMessageOut";
|
|
72
|
-
PluginCallbackType["onContextCalled"] = "onContextCalled";
|
|
73
|
-
return PluginCallbackType;
|
|
74
|
-
}({});
|
|
75
|
-
PluginCallbackType.onBeforeDataOut, PluginCallbackType.onMetadataCalled, PluginCallbackType.onBeforeMessageOut, PluginCallbackType.transformLogLevel, PluginCallbackType.shouldSendToLogger, PluginCallbackType.onContextCalled;
|
|
76
|
-
/**
|
|
77
|
-
* The class that the mixin extends
|
|
78
|
-
*/
|
|
79
|
-
let LogLayerMixinAugmentType = /* @__PURE__ */ function(LogLayerMixinAugmentType) {
|
|
80
|
-
/**
|
|
81
|
-
* Mixin extends the LogBuilder prototype
|
|
82
|
-
*/
|
|
83
|
-
LogLayerMixinAugmentType["LogBuilder"] = "LogBuilder";
|
|
84
|
-
/**
|
|
85
|
-
* Mixin extends the LogLayer prototype
|
|
86
|
-
*/
|
|
87
|
-
LogLayerMixinAugmentType["LogLayer"] = "LogLayer";
|
|
88
|
-
return LogLayerMixinAugmentType;
|
|
89
|
-
}({});
|
|
90
|
-
//#endregion
|
|
91
56
|
//#region src/CommonMetricsBuilder.ts
|
|
92
57
|
/**
|
|
93
58
|
* Base class for common metrics builder functionality.
|
|
@@ -462,7 +427,7 @@ var MockMetricsAPI = class {
|
|
|
462
427
|
* Provides access to the MetricsAPI for sending metrics to Datadog via HTTP.
|
|
463
428
|
*/
|
|
464
429
|
const logLayerDatadogMetricsMixin = {
|
|
465
|
-
augmentationType: LogLayerMixinAugmentType.LogLayer,
|
|
430
|
+
augmentationType: loglayer.LogLayerMixinAugmentType.LogLayer,
|
|
466
431
|
augment: (prototype) => {
|
|
467
432
|
Object.defineProperty(prototype, "ddStats", {
|
|
468
433
|
get() {
|