@loglayer/transport-datadog 3.2.5 → 3.2.7
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 +55 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -32
- package/dist/index.d.ts +38 -32
- package/dist/index.js +31 -41
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -1,45 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.levelField = _nullishCoalesce(config.levelField, () => ( "level"));
|
|
18
|
-
this.timestampField = _nullishCoalesce(config.timestampField, () => ( "time"));
|
|
19
|
-
this.timestampFunction = config.timestampFunction;
|
|
20
|
-
}
|
|
21
|
-
shipToLogger({ logLevel, messages, data, hasData }) {
|
|
22
|
-
const logEntry = {};
|
|
23
|
-
if (!this.transport) {
|
|
24
|
-
throw new Error(
|
|
25
|
-
"DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported."
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
if (data && hasData) {
|
|
29
|
-
Object.assign(logEntry, data);
|
|
30
|
-
}
|
|
31
|
-
if (this.timestampFunction) {
|
|
32
|
-
logEntry[this.timestampField] = this.timestampFunction();
|
|
33
|
-
} else {
|
|
34
|
-
logEntry[this.timestampField] = (/* @__PURE__ */ new Date()).toISOString();
|
|
35
|
-
}
|
|
36
|
-
logEntry[this.levelField] = logLevel;
|
|
37
|
-
logEntry[this.messageField] = messages.join(" ");
|
|
38
|
-
this.transport.processLog(logEntry);
|
|
39
|
-
return messages;
|
|
40
|
-
}
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
41
17
|
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
42
22
|
|
|
23
|
+
//#endregion
|
|
24
|
+
let __loglayer_transport = require("@loglayer/transport");
|
|
25
|
+
__loglayer_transport = __toESM(__loglayer_transport);
|
|
26
|
+
let datadog_transport_common = require("datadog-transport-common");
|
|
27
|
+
datadog_transport_common = __toESM(datadog_transport_common);
|
|
43
28
|
|
|
29
|
+
//#region src/DataDogTransport.ts
|
|
30
|
+
var DataDogTransport = class extends __loglayer_transport.LoggerlessTransport {
|
|
31
|
+
messageField;
|
|
32
|
+
levelField;
|
|
33
|
+
timestampField;
|
|
34
|
+
timestampFunction;
|
|
35
|
+
transport;
|
|
36
|
+
constructor(config) {
|
|
37
|
+
super(config);
|
|
38
|
+
if (!this.enabled) return;
|
|
39
|
+
this.transport = new datadog_transport_common.DataDogTransport(config.options);
|
|
40
|
+
this.messageField = config.messageField ?? "message";
|
|
41
|
+
this.levelField = config.levelField ?? "level";
|
|
42
|
+
this.timestampField = config.timestampField ?? "time";
|
|
43
|
+
this.timestampFunction = config.timestampFunction;
|
|
44
|
+
}
|
|
45
|
+
shipToLogger({ logLevel, messages, data, hasData }) {
|
|
46
|
+
const logEntry = {};
|
|
47
|
+
if (!this.transport) throw new Error("DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.");
|
|
48
|
+
if (data && hasData) Object.assign(logEntry, data);
|
|
49
|
+
if (this.timestampFunction) logEntry[this.timestampField] = this.timestampFunction();
|
|
50
|
+
else logEntry[this.timestampField] = (/* @__PURE__ */ new Date()).toISOString();
|
|
51
|
+
logEntry[this.levelField] = logLevel;
|
|
52
|
+
logEntry[this.messageField] = messages.join(" ");
|
|
53
|
+
this.transport.processLog(logEntry);
|
|
54
|
+
return messages;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
44
59
|
exports.DataDogTransport = DataDogTransport;
|
|
45
60
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["LoggerlessTransport","DatadogTransportCommon","logEntry: Record<string, any>"],"sources":["../src/DataDogTransport.ts"],"sourcesContent":["import type { LoggerlessTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { LoggerlessTransport } from \"@loglayer/transport\";\nimport { DataDogTransport as DatadogTransportCommon, type DDTransportOptions } from \"datadog-transport-common\";\n\nexport interface DatadogTransportConfig extends LoggerlessTransportConfig {\n /**\n * The options to pass to the datadog-transport-common instance.\n */\n options: DDTransportOptions;\n /**\n * The field name to use for the message. Default is \"message\".\n */\n messageField?: string;\n /**\n * The field name to use for the log level. Default is \"level\".\n */\n levelField?: string;\n /**\n * The field name to use for the timestamp. Default is \"time\".\n */\n timestampField?: string;\n /**\n * A custom function to stamp the timestamp\n */\n timestampFunction?: () => any;\n}\n\nexport class DataDogTransport extends LoggerlessTransport {\n private messageField: string;\n private levelField: string;\n private timestampField: string;\n private timestampFunction?: () => any;\n private transport: DatadogTransportCommon;\n\n constructor(config: DatadogTransportConfig) {\n super(config);\n\n if (!this.enabled) {\n return;\n }\n\n this.transport = new DatadogTransportCommon(config.options);\n this.messageField = config.messageField ?? \"message\";\n this.levelField = config.levelField ?? \"level\";\n this.timestampField = config.timestampField ?? \"time\";\n this.timestampFunction = config.timestampFunction;\n }\n\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams) {\n const logEntry: Record<string, any> = {};\n\n if (!this.transport) {\n throw new Error(\n \"DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.\",\n );\n }\n\n if (data && hasData) {\n Object.assign(logEntry, data);\n }\n\n if (this.timestampFunction) {\n logEntry[this.timestampField] = this.timestampFunction();\n } else {\n logEntry[this.timestampField] = new Date().toISOString();\n }\n\n logEntry[this.levelField] = logLevel;\n logEntry[this.messageField] = messages.join(\" \");\n\n this.transport.processLog(logEntry);\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAa,mBAAb,cAAsCA,yCAAoB;CACxD,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAAgC;AAC1C,QAAM,OAAO;AAEb,MAAI,CAAC,KAAK,QACR;AAGF,OAAK,YAAY,IAAIC,0CAAuB,OAAO,QAAQ;AAC3D,OAAK,eAAe,OAAO,gBAAgB;AAC3C,OAAK,aAAa,OAAO,cAAc;AACvC,OAAK,iBAAiB,OAAO,kBAAkB;AAC/C,OAAK,oBAAoB,OAAO;;CAGlC,aAAa,EAAE,UAAU,UAAU,MAAM,WAAoC;EAC3E,MAAMC,WAAgC,EAAE;AAExC,MAAI,CAAC,KAAK,UACR,OAAM,IAAI,MACR,mHACD;AAGH,MAAI,QAAQ,QACV,QAAO,OAAO,UAAU,KAAK;AAG/B,MAAI,KAAK,kBACP,UAAS,KAAK,kBAAkB,KAAK,mBAAmB;MAExD,UAAS,KAAK,mCAAkB,IAAI,MAAM,EAAC,aAAa;AAG1D,WAAS,KAAK,cAAc;AAC5B,WAAS,KAAK,gBAAgB,SAAS,KAAK,IAAI;AAEhD,OAAK,UAAU,WAAW,SAAS;AAEnC,SAAO"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { DDTransportOptions } from
|
|
2
|
-
|
|
3
|
-
import { LoggerlessTransportConfig, LoggerlessTransport, LogLayerTransportParams } from '@loglayer/transport';
|
|
1
|
+
import { DDTransportOptions, DDTransportOptions as DDTransportOptions$1 } from "datadog-transport-common";
|
|
2
|
+
import { LogLayerTransportParams, LoggerlessTransport, LoggerlessTransportConfig } from "@loglayer/transport";
|
|
4
3
|
|
|
4
|
+
//#region src/DataDogTransport.d.ts
|
|
5
5
|
interface DatadogTransportConfig extends LoggerlessTransportConfig {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
/**
|
|
7
|
+
* The options to pass to the datadog-transport-common instance.
|
|
8
|
+
*/
|
|
9
|
+
options: DDTransportOptions$1;
|
|
10
|
+
/**
|
|
11
|
+
* The field name to use for the message. Default is "message".
|
|
12
|
+
*/
|
|
13
|
+
messageField?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The field name to use for the log level. Default is "level".
|
|
16
|
+
*/
|
|
17
|
+
levelField?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The field name to use for the timestamp. Default is "time".
|
|
20
|
+
*/
|
|
21
|
+
timestampField?: string;
|
|
22
|
+
/**
|
|
23
|
+
* A custom function to stamp the timestamp
|
|
24
|
+
*/
|
|
25
|
+
timestampFunction?: () => any;
|
|
26
26
|
}
|
|
27
27
|
declare class DataDogTransport extends LoggerlessTransport {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
private messageField;
|
|
29
|
+
private levelField;
|
|
30
|
+
private timestampField;
|
|
31
|
+
private timestampFunction?;
|
|
32
|
+
private transport;
|
|
33
|
+
constructor(config: DatadogTransportConfig);
|
|
34
|
+
shipToLogger({
|
|
35
|
+
logLevel,
|
|
36
|
+
messages,
|
|
37
|
+
data,
|
|
38
|
+
hasData
|
|
39
|
+
}: LogLayerTransportParams): any[];
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
export { DataDogTransport,
|
|
41
|
+
//#endregion
|
|
42
|
+
export { type DDTransportOptions, DataDogTransport, DatadogTransportConfig };
|
|
43
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { LoggerlessTransportConfig, LoggerlessTransport, LogLayerTransportParams } from '@loglayer/transport';
|
|
1
|
+
import { LogLayerTransportParams, LoggerlessTransport, LoggerlessTransportConfig } from "@loglayer/transport";
|
|
2
|
+
import { DDTransportOptions, DDTransportOptions as DDTransportOptions$1 } from "datadog-transport-common";
|
|
4
3
|
|
|
4
|
+
//#region src/DataDogTransport.d.ts
|
|
5
5
|
interface DatadogTransportConfig extends LoggerlessTransportConfig {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
/**
|
|
7
|
+
* The options to pass to the datadog-transport-common instance.
|
|
8
|
+
*/
|
|
9
|
+
options: DDTransportOptions$1;
|
|
10
|
+
/**
|
|
11
|
+
* The field name to use for the message. Default is "message".
|
|
12
|
+
*/
|
|
13
|
+
messageField?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The field name to use for the log level. Default is "level".
|
|
16
|
+
*/
|
|
17
|
+
levelField?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The field name to use for the timestamp. Default is "time".
|
|
20
|
+
*/
|
|
21
|
+
timestampField?: string;
|
|
22
|
+
/**
|
|
23
|
+
* A custom function to stamp the timestamp
|
|
24
|
+
*/
|
|
25
|
+
timestampFunction?: () => any;
|
|
26
26
|
}
|
|
27
27
|
declare class DataDogTransport extends LoggerlessTransport {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
private messageField;
|
|
29
|
+
private levelField;
|
|
30
|
+
private timestampField;
|
|
31
|
+
private timestampFunction?;
|
|
32
|
+
private transport;
|
|
33
|
+
constructor(config: DatadogTransportConfig);
|
|
34
|
+
shipToLogger({
|
|
35
|
+
logLevel,
|
|
36
|
+
messages,
|
|
37
|
+
data,
|
|
38
|
+
hasData
|
|
39
|
+
}: LogLayerTransportParams): any[];
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
export { DataDogTransport,
|
|
41
|
+
//#endregion
|
|
42
|
+
export { type DDTransportOptions, DataDogTransport, DatadogTransportConfig };
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,35 @@
|
|
|
1
|
-
// src/DataDogTransport.ts
|
|
2
1
|
import { LoggerlessTransport } from "@loglayer/transport";
|
|
3
|
-
import { DataDogTransport as
|
|
2
|
+
import { DataDogTransport as DataDogTransport$1 } from "datadog-transport-common";
|
|
3
|
+
|
|
4
|
+
//#region src/DataDogTransport.ts
|
|
4
5
|
var DataDogTransport = class extends LoggerlessTransport {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
if (this.timestampFunction) {
|
|
32
|
-
logEntry[this.timestampField] = this.timestampFunction();
|
|
33
|
-
} else {
|
|
34
|
-
logEntry[this.timestampField] = (/* @__PURE__ */ new Date()).toISOString();
|
|
35
|
-
}
|
|
36
|
-
logEntry[this.levelField] = logLevel;
|
|
37
|
-
logEntry[this.messageField] = messages.join(" ");
|
|
38
|
-
this.transport.processLog(logEntry);
|
|
39
|
-
return messages;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
DataDogTransport
|
|
6
|
+
messageField;
|
|
7
|
+
levelField;
|
|
8
|
+
timestampField;
|
|
9
|
+
timestampFunction;
|
|
10
|
+
transport;
|
|
11
|
+
constructor(config) {
|
|
12
|
+
super(config);
|
|
13
|
+
if (!this.enabled) return;
|
|
14
|
+
this.transport = new DataDogTransport$1(config.options);
|
|
15
|
+
this.messageField = config.messageField ?? "message";
|
|
16
|
+
this.levelField = config.levelField ?? "level";
|
|
17
|
+
this.timestampField = config.timestampField ?? "time";
|
|
18
|
+
this.timestampFunction = config.timestampFunction;
|
|
19
|
+
}
|
|
20
|
+
shipToLogger({ logLevel, messages, data, hasData }) {
|
|
21
|
+
const logEntry = {};
|
|
22
|
+
if (!this.transport) throw new Error("DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.");
|
|
23
|
+
if (data && hasData) Object.assign(logEntry, data);
|
|
24
|
+
if (this.timestampFunction) logEntry[this.timestampField] = this.timestampFunction();
|
|
25
|
+
else logEntry[this.timestampField] = (/* @__PURE__ */ new Date()).toISOString();
|
|
26
|
+
logEntry[this.levelField] = logLevel;
|
|
27
|
+
logEntry[this.messageField] = messages.join(" ");
|
|
28
|
+
this.transport.processLog(logEntry);
|
|
29
|
+
return messages;
|
|
30
|
+
}
|
|
44
31
|
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { DataDogTransport };
|
|
45
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/DataDogTransport.ts"],"sourcesContent":["import type { LoggerlessTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { LoggerlessTransport } from \"@loglayer/transport\";\nimport { DataDogTransport as DatadogTransportCommon, type DDTransportOptions } from \"datadog-transport-common\";\n\nexport interface DatadogTransportConfig extends LoggerlessTransportConfig {\n /**\n * The options to pass to the datadog-transport-common instance.\n */\n options: DDTransportOptions;\n /**\n * The field name to use for the message. Default is \"message\".\n */\n messageField?: string;\n /**\n * The field name to use for the log level. Default is \"level\".\n */\n levelField?: string;\n /**\n * The field name to use for the timestamp. Default is \"time\".\n */\n timestampField?: string;\n /**\n * A custom function to stamp the timestamp\n */\n timestampFunction?: () => any;\n}\n\nexport class DataDogTransport extends LoggerlessTransport {\n private messageField: string;\n private levelField: string;\n private timestampField: string;\n private timestampFunction?: () => any;\n private transport: DatadogTransportCommon;\n\n constructor(config: DatadogTransportConfig) {\n super(config);\n\n if (!this.enabled) {\n return;\n }\n\n this.transport = new DatadogTransportCommon(config.options);\n this.messageField = config.messageField ?? \"message\";\n this.levelField = config.levelField ?? \"level\";\n this.timestampField = config.timestampField ?? \"time\";\n this.timestampFunction = config.timestampFunction;\n }\n\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams) {\n const logEntry: Record<string, any> = {};\n\n if (!this.transport) {\n throw new Error(\n \"DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.\",\n );\n }\n\n if (data && hasData) {\n Object.assign(logEntry, data);\n }\n\n if (this.timestampFunction) {\n logEntry[this.timestampField] = this.timestampFunction();\n } else {\n logEntry[this.timestampField] = new Date().toISOString();\n }\n\n logEntry[this.levelField] = logLevel;\n logEntry[this.messageField] = messages.join(\" \");\n\n this.transport.processLog(logEntry);\n\n return messages;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["DatadogTransportCommon","logEntry: Record<string, any>"],"sources":["../src/DataDogTransport.ts"],"sourcesContent":["import type { LoggerlessTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { LoggerlessTransport } from \"@loglayer/transport\";\nimport { DataDogTransport as DatadogTransportCommon, type DDTransportOptions } from \"datadog-transport-common\";\n\nexport interface DatadogTransportConfig extends LoggerlessTransportConfig {\n /**\n * The options to pass to the datadog-transport-common instance.\n */\n options: DDTransportOptions;\n /**\n * The field name to use for the message. Default is \"message\".\n */\n messageField?: string;\n /**\n * The field name to use for the log level. Default is \"level\".\n */\n levelField?: string;\n /**\n * The field name to use for the timestamp. Default is \"time\".\n */\n timestampField?: string;\n /**\n * A custom function to stamp the timestamp\n */\n timestampFunction?: () => any;\n}\n\nexport class DataDogTransport extends LoggerlessTransport {\n private messageField: string;\n private levelField: string;\n private timestampField: string;\n private timestampFunction?: () => any;\n private transport: DatadogTransportCommon;\n\n constructor(config: DatadogTransportConfig) {\n super(config);\n\n if (!this.enabled) {\n return;\n }\n\n this.transport = new DatadogTransportCommon(config.options);\n this.messageField = config.messageField ?? \"message\";\n this.levelField = config.levelField ?? \"level\";\n this.timestampField = config.timestampField ?? \"time\";\n this.timestampFunction = config.timestampFunction;\n }\n\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams) {\n const logEntry: Record<string, any> = {};\n\n if (!this.transport) {\n throw new Error(\n \"DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.\",\n );\n }\n\n if (data && hasData) {\n Object.assign(logEntry, data);\n }\n\n if (this.timestampFunction) {\n logEntry[this.timestampField] = this.timestampFunction();\n } else {\n logEntry[this.timestampField] = new Date().toISOString();\n }\n\n logEntry[this.levelField] = logLevel;\n logEntry[this.messageField] = messages.join(\" \");\n\n this.transport.processLog(logEntry);\n\n return messages;\n }\n}\n"],"mappings":";;;;AA2BA,IAAa,mBAAb,cAAsC,oBAAoB;CACxD,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAAgC;AAC1C,QAAM,OAAO;AAEb,MAAI,CAAC,KAAK,QACR;AAGF,OAAK,YAAY,IAAIA,mBAAuB,OAAO,QAAQ;AAC3D,OAAK,eAAe,OAAO,gBAAgB;AAC3C,OAAK,aAAa,OAAO,cAAc;AACvC,OAAK,iBAAiB,OAAO,kBAAkB;AAC/C,OAAK,oBAAoB,OAAO;;CAGlC,aAAa,EAAE,UAAU,UAAU,MAAM,WAAoC;EAC3E,MAAMC,WAAgC,EAAE;AAExC,MAAI,CAAC,KAAK,UACR,OAAM,IAAI,MACR,mHACD;AAGH,MAAI,QAAQ,QACV,QAAO,OAAO,UAAU,KAAK;AAG/B,MAAI,KAAK,kBACP,UAAS,KAAK,kBAAkB,KAAK,mBAAmB;MAExD,UAAS,KAAK,mCAAkB,IAAI,MAAM,EAAC,aAAa;AAG1D,WAAS,KAAK,cAAc;AAC5B,WAAS,KAAK,gBAAgB,SAAS,KAAK,IAAI;AAEhD,OAAK,UAAU,WAAW,SAAS;AAEnC,SAAO"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loglayer/transport-datadog",
|
|
3
3
|
"description": "DataDog transport for the LogLayer logging library.",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"transport"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@datadog/datadog-api-client": "1.
|
|
36
|
+
"@datadog/datadog-api-client": "1.45.0",
|
|
37
37
|
"datadog-transport-common": "3.0.2",
|
|
38
|
-
"@loglayer/transport": "2.3.
|
|
38
|
+
"@loglayer/transport": "2.3.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "24.
|
|
42
|
-
"
|
|
41
|
+
"@types/node": "24.9.2",
|
|
42
|
+
"tsdown": "0.15.12",
|
|
43
43
|
"typescript": "5.9.3",
|
|
44
|
-
"vitest": "
|
|
45
|
-
"
|
|
46
|
-
"
|
|
44
|
+
"vitest": "4.0.6",
|
|
45
|
+
"@internal/tsconfig": "2.1.0",
|
|
46
|
+
"loglayer": "7.1.0"
|
|
47
47
|
},
|
|
48
48
|
"bugs": "https://github.com/loglayer/loglayer/issues",
|
|
49
49
|
"engines": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
],
|
|
55
55
|
"homepage": "https://loglayer.dev",
|
|
56
56
|
"scripts": {
|
|
57
|
-
"build": "
|
|
57
|
+
"build": "tsdown src/index.ts",
|
|
58
58
|
"test": "vitest --run",
|
|
59
59
|
"clean": "rm -rf .turbo node_modules dist",
|
|
60
60
|
"lint": "biome check --no-errors-on-unmatched --write --unsafe src",
|