@logtape/sentry 0.2.0-dev.7 → 0.2.0-dev.8

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/README.md CHANGED
@@ -26,11 +26,11 @@ Installation
26
26
  The package is available on [JSR] and [npm].
27
27
 
28
28
  ~~~~ bash
29
- deno add @logtape/sentry # for Deno
30
- npm add @logtape/sentry # for npm
31
- pnpm add @logtape/sentry # for pnpm
32
- yarn add @logtape/sentry # for Yarn
33
- bun add @logtape/sentry # for Bun
29
+ deno add jsr:@logtape/sentry # for Deno
30
+ npm add @logtape/sentry # for npm
31
+ pnpm add @logtape/sentry # for pnpm
32
+ yarn add @logtape/sentry # for Yarn
33
+ bun add @logtape/sentry # for Bun
34
34
  ~~~~
35
35
 
36
36
 
@@ -50,7 +50,7 @@ await configure({
50
50
  },
51
51
  filters: {},
52
52
  loggers: [
53
- { category: [], sinks: ["sentry"], level: "debug" },
53
+ { category: [], sinks: ["sentry"], lowestLevel: "trace" },
54
54
  ],
55
55
  });
56
56
  ~~~~
@@ -72,7 +72,7 @@ await configure({
72
72
  },
73
73
  filters: {},
74
74
  loggers: [
75
- { category: [], sinks: ["sentry"], level: "debug" },
75
+ { category: [], sinks: ["sentry"], lowestLevel: "trace" },
76
76
  ],
77
77
  });
78
78
  ~~~~
@@ -85,6 +85,9 @@ Changelog
85
85
 
86
86
  To be released.
87
87
 
88
+ - The minimum supported version of LogTape is now 0.12.0, which introduces
89
+ `"trace"` log level support.
90
+
88
91
  - Log records having `error` property will now be sent to Sentry as
89
92
  exceptions. [[#1], [#2] by Martin Becze]
90
93
 
package/esm/mod.js CHANGED
@@ -64,7 +64,7 @@ export function getSentrySink(client) {
64
64
  });
65
65
  }
66
66
  else {
67
- client?.captureMessage(message, record.level, {
67
+ client?.captureMessage(message, record.level === "trace" ? "debug" : record.level, {
68
68
  data: record.properties,
69
69
  });
70
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtape/sentry",
3
- "version": "0.2.0-dev.7+08df8a60",
3
+ "version": "0.2.0-dev.8+78b714f1",
4
4
  "description": "LogTape Sentry Sink",
5
5
  "keywords": [
6
6
  "LogTape",
@@ -42,9 +42,8 @@
42
42
  "https://github.com/sponsors/dahlia"
43
43
  ],
44
44
  "dependencies": {
45
- "@logtape/logtape": "^0.8.0",
46
- "@sentry/core": "^8.40.0",
47
- "@sentry/types": "^8.40.0"
45
+ "@logtape/logtape": "^0.12.0-dev.186",
46
+ "@sentry/core": "^9.28.1"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@types/node": "^20.9.0",
package/script/mod.js CHANGED
@@ -90,7 +90,7 @@ function getSentrySink(client) {
90
90
  });
91
91
  }
92
92
  else {
93
- client?.captureMessage(message, record.level, {
93
+ client?.captureMessage(message, record.level === "trace" ? "debug" : record.level, {
94
94
  data: record.properties,
95
95
  });
96
96
  }
package/types/mod.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import type { Sink } from "@logtape/logtape";
2
- import { type BaseClient } from "@sentry/core";
3
- import type { ClientOptions } from "@sentry/types";
2
+ import { type Client } from "@sentry/core";
4
3
  /**
5
4
  * Gets a LogTape sink that sends logs to Sentry.
6
5
  * @param client The Sentry client. If omitted, the global default client is
7
6
  * used.
8
7
  * @returns A LogTape sink that sends logs to Sentry.
9
8
  */
10
- export declare function getSentrySink(client?: BaseClient<ClientOptions>): Sink;
9
+ export declare function getSentrySink(client?: Client): Sink;
11
10
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,UAAU,EAAa,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,eAAe,CAAC;AAgDxE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAsBtE"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,cAAc,CAAC;AAgDhF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAsBnD"}