@voltro/plugin-sentry 0.80.0 → 0.82.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/CHANGELOG.md +1610 -6
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/{capture-B6OAmMke.js → capture-DQm97Hq6.js} +13 -12
- package/dist/index.js +1 -1
- package/dist/web.js +27 -26
- package/package.json +5 -5
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Cause as e } from "effect";
|
|
2
|
+
import { withheldServerError as t } from "@voltro/protocol";
|
|
2
3
|
//#region src/capture.ts
|
|
3
|
-
var
|
|
4
|
-
e.withScope((
|
|
5
|
-
|
|
6
|
-
for (let e of
|
|
7
|
-
e.captureException(t.error);
|
|
4
|
+
var n = (t) => e.squash(t), r = (e, n, r = []) => {
|
|
5
|
+
e.withScope((i) => {
|
|
6
|
+
i.setTag("voltro.errorSource", n.source), n.name !== void 0 && i.setTag("voltro.name", n.name), n.traceId !== void 0 && i.setContext("trace", { trace_id: n.traceId }), n.fields !== void 0 && i.setContext("voltro", n.fields);
|
|
7
|
+
for (let e of r) i.addBreadcrumb(e);
|
|
8
|
+
n.contentSensitive === !0 && i.setTag("voltro.contentWithheld", "true"), e.captureException(n.contentSensitive === !0 ? t(n) : n.error);
|
|
8
9
|
});
|
|
9
|
-
},
|
|
10
|
+
}, i = /* @__PURE__ */ new Set([
|
|
10
11
|
"StoreOperationFailed",
|
|
11
12
|
"SqlError",
|
|
12
13
|
"ResultLengthMismatch",
|
|
@@ -15,7 +16,7 @@ var t = (t) => e.squash(t), n = (e, t, n = []) => {
|
|
|
15
16
|
"ResponseError",
|
|
16
17
|
"CacheError",
|
|
17
18
|
"WorkflowAuthorityUnavailable"
|
|
18
|
-
]),
|
|
19
|
+
]), a = (e) => typeof e == "object" && !!e && typeof e._tag == "string" && i.has(e._tag), o = (e) => e === "infrastructure" ? a : e, s = (t, n) => {
|
|
19
20
|
if (e.isInterruptedOnly(t)) return !1;
|
|
20
21
|
if (n === !0) return !0;
|
|
21
22
|
let r = [...e.failures(t)];
|
|
@@ -26,17 +27,17 @@ var t = (t) => e.squash(t), n = (e, t, n = []) => {
|
|
|
26
27
|
return !0;
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
|
-
},
|
|
30
|
-
if (!
|
|
31
|
-
let
|
|
30
|
+
}, c = (e, t, r, i, a = !1) => {
|
|
31
|
+
if (!s(t, a)) return;
|
|
32
|
+
let o = n(t);
|
|
32
33
|
e.withScope((t) => {
|
|
33
34
|
t.setContext("trace", {
|
|
34
35
|
trace_id: r.traceId,
|
|
35
36
|
...r.spanId === void 0 ? {} : { span_id: r.spanId }
|
|
36
37
|
}), t.setTag("rpc.tag", r.tag), t.setTag("rpc.kind", r.kind), t.setTag("subject.type", r.subject.type), r.subject.tenantId !== void 0 && r.subject.tenantId !== null && t.setTag("tenant.id", r.subject.tenantId);
|
|
37
38
|
for (let e of i) t.addBreadcrumb(e);
|
|
38
|
-
e.captureException(
|
|
39
|
+
e.captureException(o);
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
42
|
//#endregion
|
|
42
|
-
export {
|
|
43
|
+
export { o as i, c as n, n as r, r as t };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./server-DQn_uTTk.js";
|
|
2
|
-
import { i as r, n as i, r as a, t as o } from "./capture-
|
|
2
|
+
import { i as r, n as i, r as a, t as o } from "./capture-DQm97Hq6.js";
|
|
3
3
|
import { Effect as s } from "effect";
|
|
4
4
|
import { pluginEnv as c } from "@voltro/env";
|
|
5
5
|
import { addSink as l } from "@voltro/logger";
|
package/dist/web.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { i as e } from "./capture-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as e } from "./capture-DQm97Hq6.js";
|
|
2
|
+
import { reportableError as t } from "@voltro/protocol";
|
|
3
|
+
import { reportClientError as n, subscribeClientErrors as r, subscribeClientTraces as i } from "@voltro/client";
|
|
4
|
+
import { publicEnvSnapshot as a } from "@voltro/env/public";
|
|
4
5
|
//#region src/webTrace.ts
|
|
5
|
-
var
|
|
6
|
-
e.withScope((
|
|
7
|
-
|
|
6
|
+
var o = (e, n) => {
|
|
7
|
+
e.withScope((r) => {
|
|
8
|
+
r.setTag("voltro.errorSource", n.source), n.pathname && r.setTag("route.pathname", n.pathname), n.componentStack && r.setContext("react", { componentStack: n.componentStack }), n.context && r.setContext("voltro", n.context), e.captureException(t(n.error));
|
|
8
9
|
});
|
|
9
|
-
},
|
|
10
|
+
}, s = (e, t) => {
|
|
10
11
|
e.startInactiveSpan({
|
|
11
12
|
name: `${t.source}.${t.tag}`,
|
|
12
13
|
op: `rpc.client.${t.source}`,
|
|
@@ -24,32 +25,32 @@ var a = (e, t) => {
|
|
|
24
25
|
attributes: { "voltro.link.type": "rpc.server-trace" }
|
|
25
26
|
}]
|
|
26
27
|
}).end();
|
|
27
|
-
},
|
|
28
|
-
let t =
|
|
28
|
+
}, c = (e) => e.source.startsWith("rpc.") && typeof e.error?._tag == "string", l = (e) => {
|
|
29
|
+
let t = a()[e];
|
|
29
30
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
30
|
-
},
|
|
31
|
+
}, u, d, f = async (t = {}) => {
|
|
31
32
|
if (typeof window > "u") return;
|
|
32
|
-
let
|
|
33
|
-
if (!
|
|
34
|
-
let
|
|
33
|
+
let n = t.dsn ?? l("VOLTRO_PUBLIC_SENTRY_DSN");
|
|
34
|
+
if (!n) return;
|
|
35
|
+
let a = t.environment ?? l("VOLTRO_PUBLIC_SENTRY_ENVIRONMENT"), f = t.release ?? l("VOLTRO_PUBLIC_SENTRY_RELEASE"), m = t.tracesSampleRate ?? 1, h = t.browserTracing !== !1, g = t.rpcSpans ?? h, _ = await import("@sentry/react");
|
|
35
36
|
_.init({
|
|
36
|
-
dsn:
|
|
37
|
+
dsn: n,
|
|
37
38
|
tracesSampleRate: m,
|
|
38
|
-
...
|
|
39
|
-
...
|
|
39
|
+
...a ? { environment: a } : {},
|
|
40
|
+
...f ? { release: f } : {},
|
|
40
41
|
integrations: h ? [_.browserTracingIntegration()] : []
|
|
41
42
|
});
|
|
42
43
|
let v = _;
|
|
43
|
-
|
|
44
|
+
u?.(), u = void 0, g && (u = i((e) => {
|
|
44
45
|
try {
|
|
45
|
-
|
|
46
|
+
s(v, e);
|
|
46
47
|
} catch {}
|
|
47
|
-
})),
|
|
48
|
+
})), d?.();
|
|
48
49
|
let y = e(t.captureFailures ?? !1);
|
|
49
|
-
|
|
50
|
+
d = r((e) => {
|
|
50
51
|
try {
|
|
51
|
-
if (
|
|
52
|
-
|
|
52
|
+
if (c(e) && !p(e.error, y)) return;
|
|
53
|
+
o(v, e);
|
|
53
54
|
} catch {}
|
|
54
55
|
}), console.info("[@voltro/plugin-sentry] browser active", {
|
|
55
56
|
tracesSampleRate: m,
|
|
@@ -57,15 +58,15 @@ var a = (e, t) => {
|
|
|
57
58
|
rpcSpans: g,
|
|
58
59
|
rpcSpanMode: g ? "page-child-with-server-link" : "off"
|
|
59
60
|
});
|
|
60
|
-
},
|
|
61
|
+
}, p = (e, t) => {
|
|
61
62
|
if (typeof t != "function") return t;
|
|
62
63
|
try {
|
|
63
64
|
return t(e);
|
|
64
65
|
} catch {
|
|
65
66
|
return !0;
|
|
66
67
|
}
|
|
67
|
-
},
|
|
68
|
-
|
|
68
|
+
}, m = () => {
|
|
69
|
+
u?.(), u = void 0, d?.(), d = void 0;
|
|
69
70
|
};
|
|
70
71
|
//#endregion
|
|
71
|
-
export {
|
|
72
|
+
export { o as captureClientError, m as closeSentryBrowser, f as initSentryBrowser, c as isDeclaredRpcFailure, s as recordClientTraceSpan, n as reportClientError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-sentry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.0",
|
|
4
4
|
"description": "Deep Sentry integration — error tracking correlated to distributed traces, breadcrumbs from the framework log sink, controlled browser performance spans, and server traces routed from the framework's OTel tracer via @sentry/node in OTel-consumer mode.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"node": ">=24.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@voltro/client": "0.
|
|
47
|
-
"@voltro/env": "0.
|
|
48
|
-
"@voltro/logger": "0.
|
|
49
|
-
"@voltro/protocol": "0.
|
|
46
|
+
"@voltro/client": "0.82.0",
|
|
47
|
+
"@voltro/env": "0.82.0",
|
|
48
|
+
"@voltro/logger": "0.82.0",
|
|
49
|
+
"@voltro/protocol": "0.82.0"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
52
|
"@sentry/node": "^10.75.0",
|