@devmoods/sentry 0.3.0 → 0.5.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/coverage/clover.xml +3 -3
- package/coverage/coverage-final.json +1 -1
- package/coverage/index.html +1 -1
- package/coverage/index.ts.html +38 -5
- package/package.json +8 -8
package/coverage/clover.xml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1782839143347" clover="3.2.0">
|
|
3
|
+
<project timestamp="1782839143347" name="All files">
|
|
4
4
|
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="1" coveredelements="1" complexity="0" loc="1" ncloc="1" packages="1" files="1" classes="1"/>
|
|
5
5
|
<file name="index.ts" path="/Users/hanse/dev/github.com/devmoods/express-extras/packages/@devmoods/sentry/src/index.ts">
|
|
6
6
|
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
7
|
-
<line num="
|
|
7
|
+
<line num="14" count="10" type="stmt"/>
|
|
8
8
|
</file>
|
|
9
9
|
</project>
|
|
10
10
|
</coverage>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
{"/Users/hanse/dev/github.com/devmoods/express-extras/packages/@devmoods/sentry/src/index.ts": {"path":"/Users/hanse/dev/github.com/devmoods/express-extras/packages/@devmoods/sentry/src/index.ts","statementMap":{"0":{"start":{"line":
|
|
1
|
+
{"/Users/hanse/dev/github.com/devmoods/express-extras/packages/@devmoods/sentry/src/index.ts": {"path":"/Users/hanse/dev/github.com/devmoods/express-extras/packages/@devmoods/sentry/src/index.ts","statementMap":{"0":{"start":{"line":14,"column":13},"end":{"line":19,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":10},"f":{},"b":{},"meta":{"lastBranch":0,"lastFunction":0,"lastStatement":1,"seen":{"s:14:13:19:Infinity":0},"fnNames":{}}}
|
|
2
2
|
}
|
package/coverage/index.html
CHANGED
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-
|
|
104
|
+
at 2026-06-30T17:05:43.338Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/index.ts.html
CHANGED
|
@@ -230,7 +230,22 @@
|
|
|
230
230
|
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
231
|
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
232
|
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
-
<a name='L168'></a><a href='#L168'>168</a
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a>
|
|
239
|
+
<a name='L174'></a><a href='#L174'>174</a>
|
|
240
|
+
<a name='L175'></a><a href='#L175'>175</a>
|
|
241
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
242
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
|
+
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
|
+
<a name='L179'></a><a href='#L179'>179</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
245
|
+
<span class="cline-any cline-neutral"> </span>
|
|
246
|
+
<span class="cline-any cline-neutral"> </span>
|
|
247
|
+
<span class="cline-any cline-neutral"> </span>
|
|
248
|
+
<span class="cline-any cline-neutral"> </span>
|
|
234
249
|
<span class="cline-any cline-neutral"> </span>
|
|
235
250
|
<span class="cline-any cline-neutral"> </span>
|
|
236
251
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -397,8 +412,19 @@
|
|
|
397
412
|
<span class="cline-any cline-neutral"> </span>
|
|
398
413
|
<span class="cline-any cline-neutral"> </span>
|
|
399
414
|
<span class="cline-any cline-neutral"> </span>
|
|
415
|
+
<span class="cline-any cline-neutral"> </span>
|
|
416
|
+
<span class="cline-any cline-neutral"> </span>
|
|
417
|
+
<span class="cline-any cline-neutral"> </span>
|
|
418
|
+
<span class="cline-any cline-neutral"> </span>
|
|
419
|
+
<span class="cline-any cline-neutral"> </span>
|
|
420
|
+
<span class="cline-any cline-neutral"> </span>
|
|
421
|
+
<span class="cline-any cline-neutral"> </span>
|
|
400
422
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { config, define, t, type ConfigFromDefs } from '@devmoods/config';
|
|
401
|
-
import {
|
|
423
|
+
import {
|
|
424
|
+
type LoggerAdapter,
|
|
425
|
+
type MetricAttributes,
|
|
426
|
+
type MetricsAdapter,
|
|
427
|
+
} from '@devmoods/observability';
|
|
402
428
|
import * as Sentry from '@sentry/node';
|
|
403
429
|
import { type ErrorRequestHandler } from 'express';
|
|
404
430
|
|
|
@@ -511,7 +537,11 @@ export class SentryMetricsAdapter implements MetricsAdapter {
|
|
|
511
537
|
Sentry.metrics.gauge(name, value, { attributes });
|
|
512
538
|
}
|
|
513
539
|
|
|
514
|
-
distribution(
|
|
540
|
+
distribution(
|
|
541
|
+
name: string,
|
|
542
|
+
value: number,
|
|
543
|
+
attributes?: MetricAttributes,
|
|
544
|
+
): void {
|
|
515
545
|
/* v8 ignore next -- @preserve */
|
|
516
546
|
if (!Sentry.isInitialized()) {
|
|
517
547
|
return;
|
|
@@ -524,7 +554,10 @@ export class SentryMetricsAdapter implements MetricsAdapter {
|
|
|
524
554
|
if (!Sentry.isInitialized()) {
|
|
525
555
|
return;
|
|
526
556
|
}
|
|
527
|
-
Sentry.metrics.distribution(name, value, {
|
|
557
|
+
Sentry.metrics.distribution(name, value, {
|
|
558
|
+
unit: 'millisecond',
|
|
559
|
+
attributes,
|
|
560
|
+
});
|
|
528
561
|
}
|
|
529
562
|
}
|
|
530
563
|
|
|
@@ -571,7 +604,7 @@ export class SentryLoggerAdapter implements LoggerAdapter {
|
|
|
571
604
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
572
605
|
Code coverage generated by
|
|
573
606
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
574
|
-
at 2026-
|
|
607
|
+
at 2026-06-30T17:05:43.338Z
|
|
575
608
|
</div>
|
|
576
609
|
<script src="prettify.js"></script>
|
|
577
610
|
<script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devmoods/sentry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
"format": "oxfmt .",
|
|
19
19
|
"test": "vitest",
|
|
20
20
|
"test:coverage": "pnpm run test --coverage",
|
|
21
|
-
"build": "pnpm run clean &&
|
|
21
|
+
"build": "pnpm run clean && tsc",
|
|
22
22
|
"prepublishOnly": "pnpm run clean && pnpm run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@devmoods/config": "0.
|
|
26
|
-
"@devmoods/observability": "0.
|
|
27
|
-
"@sentry/node": "^10.
|
|
28
|
-
"@sentry/node-native": "^10.
|
|
29
|
-
"@sentry/profiling-node": "^10.
|
|
25
|
+
"@devmoods/config": "0.3.0",
|
|
26
|
+
"@devmoods/observability": "0.4.0",
|
|
27
|
+
"@sentry/node": "^10.63.0",
|
|
28
|
+
"@sentry/node-native": "^10.63.0",
|
|
29
|
+
"@sentry/profiling-node": "^10.63.0",
|
|
30
30
|
"express": "^4.21.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"express": ">=4.21.2 <5.0.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "52519bed307a1eedf13ab334f11c1ad9c7c8db91"
|
|
36
36
|
}
|