@devmoods/sentry 0.5.1 → 0.6.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.
@@ -264,14 +264,7 @@
264
264
  <a name='L199'></a><a href='#L199'>199</a>
265
265
  <a name='L200'></a><a href='#L200'>200</a>
266
266
  <a name='L201'></a><a href='#L201'>201</a>
267
- <a name='L202'></a><a href='#L202'>202</a>
268
- <a name='L203'></a><a href='#L203'>203</a>
269
- <a name='L204'></a><a href='#L204'>204</a>
270
- <a name='L205'></a><a href='#L205'>205</a>
271
- <a name='L206'></a><a href='#L206'>206</a>
272
- <a name='L207'></a><a href='#L207'>207</a>
273
- <a name='L208'></a><a href='#L208'>208</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
274
- <span class="cline-any cline-neutral">&nbsp;</span>
267
+ <a name='L202'></a><a href='#L202'>202</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
275
268
  <span class="cline-any cline-neutral">&nbsp;</span>
276
269
  <span class="cline-any cline-neutral">&nbsp;</span>
277
270
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -472,11 +465,6 @@
472
465
  <span class="cline-any cline-neutral">&nbsp;</span>
473
466
  <span class="cline-any cline-neutral">&nbsp;</span>
474
467
  <span class="cline-any cline-neutral">&nbsp;</span>
475
- <span class="cline-any cline-neutral">&nbsp;</span>
476
- <span class="cline-any cline-neutral">&nbsp;</span>
477
- <span class="cline-any cline-neutral">&nbsp;</span>
478
- <span class="cline-any cline-neutral">&nbsp;</span>
479
- <span class="cline-any cline-neutral">&nbsp;</span>
480
468
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { config, define, t, type ConfigFromDefs } from '@devmoods/config';
481
469
  import {
482
470
  type LoggerAdapter,
@@ -484,7 +472,6 @@ import {
484
472
  type MetricsAdapter,
485
473
  } from '@devmoods/observability';
486
474
  import * as Sentry from '@sentry/node';
487
- import { type ErrorRequestHandler } from 'express';
488
475
  &nbsp;
489
476
  declare module '@devmoods/config' {
490
477
  interface Config extends ConfigFromDefs&lt;typeof sentryConfig&gt; {}
@@ -550,8 +537,19 @@ export async function sentryOptions(
550
537
  dsn: config.SENTRY_DSN,
551
538
  tracesSampleRate: config.SENTRY_TRACES_SAMPLE_RATE,
552
539
  profileSessionSampleRate: config.SENTRY_PROFILES_SAMPLE_RATE,
553
- integrations: nativeIntegrations,
554
- enableLogs: true,
540
+ integrations: [
541
+ ...nativeIntegrations,
542
+ Sentry.expressIntegration({
543
+ shouldHandleError(error) {
544
+ const status = getHttpStatusCode(error);
545
+ &nbsp;
546
+ return (
547
+ process.env.NODE_ENV === 'production' &amp;&amp;
548
+ (status == null || status &lt; 400 || status &gt;= 500)
549
+ );
550
+ },
551
+ }),
552
+ ],
555
553
  ...options,
556
554
  };
557
555
  }
@@ -580,22 +578,6 @@ function getHttpStatusCode(error: unknown) {
580
578
  : undefined;
581
579
  }
582
580
  &nbsp;
583
- export function sentryErrorHandler(
584
- options: Sentry.NodeOptions = {},
585
- ): ErrorRequestHandler {
586
- return Sentry.expressErrorHandler({
587
- shouldHandleError(error) {
588
- const status = getHttpStatusCode(error);
589
- &nbsp;
590
- return (
591
- process.env.NODE_ENV === 'production' &amp;&amp;
592
- (status == null || status &lt; 400 || status &gt;= 500)
593
- );
594
- },
595
- ...options,
596
- }) as unknown as ErrorRequestHandler;
597
- }
598
- &nbsp;
599
581
  /**
600
582
  * MetricsAdapter backed by `Sentry.metrics` (available in @sentry/node &gt;=10.25.0).
601
583
  * Requires `Sentry.init()` to have been called; calls are silently dropped when
@@ -691,7 +673,7 @@ export class SentryLoggerAdapter implements LoggerAdapter {
691
673
  <div class='footer quiet pad2 space-top1 center small'>
692
674
  Code coverage generated by
693
675
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
694
- at 2026-07-08T07:51:55.887Z
676
+ at 2026-10-05T20:21:41.674Z
695
677
  </div>
696
678
  <script src="prettify.js"></script>
697
679
  <script>
@@ -1 +1,101 @@
1
- .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
1
+ .pln {
2
+ color: #000;
3
+ }
4
+ @media screen {
5
+ .str {
6
+ color: #080;
7
+ }
8
+ .kwd {
9
+ color: #008;
10
+ }
11
+ .com {
12
+ color: #800;
13
+ }
14
+ .typ {
15
+ color: #606;
16
+ }
17
+ .lit {
18
+ color: #066;
19
+ }
20
+ .pun,
21
+ .opn,
22
+ .clo {
23
+ color: #660;
24
+ }
25
+ .tag {
26
+ color: #008;
27
+ }
28
+ .atn {
29
+ color: #606;
30
+ }
31
+ .atv {
32
+ color: #080;
33
+ }
34
+ .dec,
35
+ .var {
36
+ color: #606;
37
+ }
38
+ .fun {
39
+ color: red;
40
+ }
41
+ }
42
+ @media print, projection {
43
+ .str {
44
+ color: #060;
45
+ }
46
+ .kwd {
47
+ color: #006;
48
+ font-weight: bold;
49
+ }
50
+ .com {
51
+ color: #600;
52
+ font-style: italic;
53
+ }
54
+ .typ {
55
+ color: #404;
56
+ font-weight: bold;
57
+ }
58
+ .lit {
59
+ color: #044;
60
+ }
61
+ .pun,
62
+ .opn,
63
+ .clo {
64
+ color: #440;
65
+ }
66
+ .tag {
67
+ color: #006;
68
+ font-weight: bold;
69
+ }
70
+ .atn {
71
+ color: #404;
72
+ }
73
+ .atv {
74
+ color: #060;
75
+ }
76
+ }
77
+ pre.prettyprint {
78
+ padding: 2px;
79
+ border: 1px solid #888;
80
+ }
81
+ ol.linenums {
82
+ margin-top: 0;
83
+ margin-bottom: 0;
84
+ }
85
+ li.L0,
86
+ li.L1,
87
+ li.L2,
88
+ li.L3,
89
+ li.L5,
90
+ li.L6,
91
+ li.L7,
92
+ li.L8 {
93
+ list-style-type: none;
94
+ }
95
+ li.L1,
96
+ li.L3,
97
+ li.L5,
98
+ li.L7,
99
+ li.L9 {
100
+ background: #eee;
101
+ }