@loglayer/transport-sentry 2.1.0 → 2.3.0

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 CHANGED
@@ -1,6 +1,5 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let _loglayer_transport = require("@loglayer/transport");
3
-
4
3
  //#region src/SentryTransport.ts
5
4
  /**
6
5
  * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.
@@ -46,7 +45,7 @@ var SentryTransport = class extends _loglayer_transport.BaseTransport {
46
45
  return messages;
47
46
  }
48
47
  };
49
-
50
48
  //#endregion
51
49
  exports.SentryTransport = SentryTransport;
50
+
52
51
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["BaseTransport"],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqCA,kCAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;AAEjC,MAAI,QAAQ,QAGV,MAAK,KAAK,KAAK;AAIjB,UAAQ,UAAR;GACE,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,QAEE,MAAK,OAAO,KAAK,GAAG,KAAK;;AAG7B,SAAO"}
1
+ {"version":3,"file":"index.cjs","names":["BaseTransport"],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqCA,oBAAAA,cAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,GAAG,CAAC;EAEhC,IAAI,QAAQ,SAGV,KAAK,KAAK,IAAI;EAIhB,QAAQ,UAAR;GACE,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,KAAK,GAAG,IAAI;IACxB;GACF,KAAK;IACH,KAAK,OAAO,KAAK,GAAG,IAAI;IACxB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,SAEE,KAAK,OAAO,KAAK,GAAG,IAAI;EAC5B;EAEA,OAAO;CACT;AACF"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { BaseTransport } from "@loglayer/transport";
2
-
3
2
  //#region src/SentryTransport.ts
4
3
  /**
5
4
  * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.
@@ -45,7 +44,7 @@ var SentryTransport = class extends BaseTransport {
45
44
  return messages;
46
45
  }
47
46
  };
48
-
49
47
  //#endregion
50
48
  export { SentryTransport };
49
+
51
50
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqC,cAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;AAEjC,MAAI,QAAQ,QAGV,MAAK,KAAK,KAAK;AAIjB,UAAQ,UAAR;GACE,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,QAEE,MAAK,OAAO,KAAK,GAAG,KAAK;;AAG7B,SAAO"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqC,cAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,GAAG,CAAC;EAEhC,IAAI,QAAQ,SAGV,KAAK,KAAK,IAAI;EAIhB,QAAQ,UAAR;GACE,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,KAAK,GAAG,IAAI;IACxB;GACF,KAAK;IACH,KAAK,OAAO,KAAK,GAAG,IAAI;IACxB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,KAAK;IACH,KAAK,OAAO,MAAM,GAAG,IAAI;IACzB;GACF,SAEE,KAAK,OAAO,KAAK,GAAG,IAAI;EAC5B;EAEA,OAAO;CACT;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loglayer/transport-sentry",
3
3
  "description": "Sentry transport for the LogLayer logging library.",
4
- "version": "2.1.0",
4
+ "version": "2.3.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -32,19 +32,19 @@
32
32
  "transport"
33
33
  ],
34
34
  "dependencies": {
35
- "@loglayer/transport": "3.1.0"
35
+ "@loglayer/transport": "3.3.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@sentry/node": "10.19.0",
39
- "@types/node": "25.2.3",
40
- "dotenv": "17.3.1",
38
+ "@sentry/node": "10.55.0",
39
+ "@types/node": "25.9.1",
40
+ "dotenv": "17.4.2",
41
41
  "serialize-error": "13.0.1",
42
- "tsdown": "0.20.3",
43
- "tsx": "4.21.0",
44
- "typescript": "5.9.3",
45
- "vitest": "4.0.18",
42
+ "tsdown": "0.22.1",
43
+ "tsx": "4.22.3",
44
+ "typescript": "6.0.3",
45
+ "vitest": "4.1.7",
46
46
  "@internal/tsconfig": "2.1.0",
47
- "loglayer": "9.2.0"
47
+ "loglayer": "9.4.0"
48
48
  },
49
49
  "bugs": "https://github.com/loglayer/loglayer/issues",
50
50
  "engines": {