@voltro/plugin-sentry 0.81.0 → 0.83.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.
@@ -5619,7 +5619,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5619
5619
  SOFTWARE.
5620
5620
  ```
5621
5621
 
5622
- ## undici@8.10.0
5622
+ ## undici@8.11.2
5623
5623
 
5624
5624
  License: MIT
5625
5625
 
@@ -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 t = (t) => e.squash(t), n = (e, t, n = []) => {
4
- e.withScope((r) => {
5
- r.setTag("voltro.errorSource", t.source), t.name !== void 0 && r.setTag("voltro.name", t.name), t.traceId !== void 0 && r.setContext("trace", { trace_id: t.traceId }), t.fields !== void 0 && r.setContext("voltro", t.fields);
6
- for (let e of n) r.addBreadcrumb(e);
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
- }, r = /* @__PURE__ */ new Set([
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
- ]), i = (e) => typeof e == "object" && !!e && typeof e._tag == "string" && r.has(e._tag), a = (e) => e === "infrastructure" ? i : e, o = (t, n) => {
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
- }, s = (e, n, r, i, a = !1) => {
30
- if (!o(n, a)) return;
31
- let s = t(n);
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(s);
39
+ e.captureException(o);
39
40
  });
40
41
  };
41
42
  //#endregion
42
- export { a as i, s as n, t as r, n as t };
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-B6OAmMke.js";
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-B6OAmMke.js";
2
- import { reportClientError as t, subscribeClientErrors as n, subscribeClientTraces as r } from "@voltro/client";
3
- import { publicEnvSnapshot as i } from "@voltro/env/public";
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 a = (e, t) => {
6
- e.withScope((n) => {
7
- n.setTag("voltro.errorSource", t.source), t.pathname && n.setTag("route.pathname", t.pathname), t.componentStack && n.setContext("react", { componentStack: t.componentStack }), t.context && n.setContext("voltro", t.context), e.captureException(t.error);
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
- }, o = (e, t) => {
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
- }, s = (e) => e.source.startsWith("rpc.") && typeof e.error?._tag == "string", c = (e) => {
28
- let t = i()[e];
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
- }, l, u, d = async (t = {}) => {
31
+ }, u, d, f = async (t = {}) => {
31
32
  if (typeof window > "u") return;
32
- let i = t.dsn ?? c("VOLTRO_PUBLIC_SENTRY_DSN");
33
- if (!i) return;
34
- let d = t.environment ?? c("VOLTRO_PUBLIC_SENTRY_ENVIRONMENT"), p = t.release ?? c("VOLTRO_PUBLIC_SENTRY_RELEASE"), m = t.tracesSampleRate ?? 1, h = t.browserTracing !== !1, g = t.rpcSpans ?? h, _ = await import("@sentry/react");
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: i,
37
+ dsn: n,
37
38
  tracesSampleRate: m,
38
- ...d ? { environment: d } : {},
39
- ...p ? { release: p } : {},
39
+ ...a ? { environment: a } : {},
40
+ ...f ? { release: f } : {},
40
41
  integrations: h ? [_.browserTracingIntegration()] : []
41
42
  });
42
43
  let v = _;
43
- l?.(), l = void 0, g && (l = r((e) => {
44
+ u?.(), u = void 0, g && (u = i((e) => {
44
45
  try {
45
- o(v, e);
46
+ s(v, e);
46
47
  } catch {}
47
- })), u?.();
48
+ })), d?.();
48
49
  let y = e(t.captureFailures ?? !1);
49
- u = n((e) => {
50
+ d = r((e) => {
50
51
  try {
51
- if (s(e) && !f(e.error, y)) return;
52
- a(v, e);
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
- }, f = (e, t) => {
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
- }, p = () => {
68
- l?.(), l = void 0, u?.(), u = void 0;
68
+ }, m = () => {
69
+ u?.(), u = void 0, d?.(), d = void 0;
69
70
  };
70
71
  //#endregion
71
- export { a as captureClientError, p as closeSentryBrowser, d as initSentryBrowser, s as isDeclaredRpcFailure, o as recordClientTraceSpan, t as reportClientError };
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.81.0",
3
+ "version": "0.83.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.81.0",
47
- "@voltro/env": "0.81.0",
48
- "@voltro/logger": "0.81.0",
49
- "@voltro/protocol": "0.81.0"
46
+ "@voltro/client": "0.83.0",
47
+ "@voltro/env": "0.83.0",
48
+ "@voltro/logger": "0.83.0",
49
+ "@voltro/protocol": "0.83.0"
50
50
  },
51
51
  "optionalDependencies": {
52
52
  "@sentry/node": "^10.75.0",