@muhammetgoktug/ek-sentry 0.1.1

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.
Files changed (93) hide show
  1. package/dist/core/client.d.ts +59 -0
  2. package/dist/core/client.d.ts.map +1 -0
  3. package/dist/core/client.js +156 -0
  4. package/dist/core/client.js.map +1 -0
  5. package/dist/core/index.d.ts +7 -0
  6. package/dist/core/index.d.ts.map +1 -0
  7. package/dist/core/index.js +5 -0
  8. package/dist/core/index.js.map +1 -0
  9. package/dist/core/scope.d.ts +14 -0
  10. package/dist/core/scope.d.ts.map +1 -0
  11. package/dist/core/scope.js +32 -0
  12. package/dist/core/scope.js.map +1 -0
  13. package/dist/core/singleton.d.ts +26 -0
  14. package/dist/core/singleton.d.ts.map +1 -0
  15. package/dist/core/singleton.js +50 -0
  16. package/dist/core/singleton.js.map +1 -0
  17. package/dist/core/transport.d.ts +18 -0
  18. package/dist/core/transport.d.ts.map +1 -0
  19. package/dist/core/transport.js +60 -0
  20. package/dist/core/transport.js.map +1 -0
  21. package/dist/core/uuid.d.ts +4 -0
  22. package/dist/core/uuid.d.ts.map +1 -0
  23. package/dist/core/uuid.js +12 -0
  24. package/dist/core/uuid.js.map +1 -0
  25. package/dist/index.d.ts +12 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +13 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/nextjs/client.d.ts +6 -0
  30. package/dist/nextjs/client.d.ts.map +1 -0
  31. package/dist/nextjs/client.js +16 -0
  32. package/dist/nextjs/client.js.map +1 -0
  33. package/dist/nextjs/server.d.ts +16 -0
  34. package/dist/nextjs/server.d.ts.map +1 -0
  35. package/dist/nextjs/server.js +25 -0
  36. package/dist/nextjs/server.js.map +1 -0
  37. package/dist/node/express.d.ts +21 -0
  38. package/dist/node/express.d.ts.map +1 -0
  39. package/dist/node/express.js +47 -0
  40. package/dist/node/express.js.map +1 -0
  41. package/dist/node/handlers.d.ts +4 -0
  42. package/dist/node/handlers.d.ts.map +1 -0
  43. package/dist/node/handlers.js +13 -0
  44. package/dist/node/handlers.js.map +1 -0
  45. package/dist/node/index.d.ts +10 -0
  46. package/dist/node/index.d.ts.map +1 -0
  47. package/dist/node/index.js +21 -0
  48. package/dist/node/index.js.map +1 -0
  49. package/dist/react-native.d.ts +6 -0
  50. package/dist/react-native.d.ts.map +1 -0
  51. package/dist/react-native.js +17 -0
  52. package/dist/react-native.js.map +1 -0
  53. package/dist/react.d.ts +17 -0
  54. package/dist/react.d.ts.map +1 -0
  55. package/dist/react.js +21 -0
  56. package/dist/react.js.map +1 -0
  57. package/dist/schemas/common.d.ts +16 -0
  58. package/dist/schemas/common.d.ts.map +1 -0
  59. package/dist/schemas/common.js +2 -0
  60. package/dist/schemas/common.js.map +1 -0
  61. package/dist/schemas/dsn.d.ts +15 -0
  62. package/dist/schemas/dsn.d.ts.map +1 -0
  63. package/dist/schemas/dsn.js +32 -0
  64. package/dist/schemas/dsn.js.map +1 -0
  65. package/dist/schemas/envelope.d.ts +21 -0
  66. package/dist/schemas/envelope.d.ts.map +1 -0
  67. package/dist/schemas/envelope.js +2 -0
  68. package/dist/schemas/envelope.js.map +1 -0
  69. package/dist/schemas/error.d.ts +56 -0
  70. package/dist/schemas/error.d.ts.map +1 -0
  71. package/dist/schemas/error.js +2 -0
  72. package/dist/schemas/error.js.map +1 -0
  73. package/dist/schemas/index.d.ts +8 -0
  74. package/dist/schemas/index.d.ts.map +1 -0
  75. package/dist/schemas/index.js +8 -0
  76. package/dist/schemas/index.js.map +1 -0
  77. package/dist/schemas/log.d.ts +16 -0
  78. package/dist/schemas/log.d.ts.map +1 -0
  79. package/dist/schemas/log.js +2 -0
  80. package/dist/schemas/log.js.map +1 -0
  81. package/dist/schemas/simple.d.ts +205 -0
  82. package/dist/schemas/simple.d.ts.map +1 -0
  83. package/dist/schemas/simple.js +125 -0
  84. package/dist/schemas/simple.js.map +1 -0
  85. package/dist/schemas/span.d.ts +21 -0
  86. package/dist/schemas/span.d.ts.map +1 -0
  87. package/dist/schemas/span.js +2 -0
  88. package/dist/schemas/span.js.map +1 -0
  89. package/dist/schemas/stacktrace.d.ts +9 -0
  90. package/dist/schemas/stacktrace.d.ts.map +1 -0
  91. package/dist/schemas/stacktrace.js +40 -0
  92. package/dist/schemas/stacktrace.js.map +1 -0
  93. package/package.json +83 -0
@@ -0,0 +1,25 @@
1
+ import { init as coreInit, getClient } from "../core/singleton.js";
2
+ const SDK_INFO = { name: "@muhammetgoktug/ek-sentry/nextjs", version: "0.1.1" };
3
+ /** Call from `register()` in instrumentation.ts (Node runtime) to set up server-side capture. */
4
+ export function init(options) {
5
+ const client = coreInit({ ...options, platform: "nextjs", sdk: SDK_INFO });
6
+ process.on("uncaughtException", (e) => {
7
+ client.captureException(e, { level: "fatal" });
8
+ });
9
+ process.on("unhandledRejection", (r) => {
10
+ client.captureException(r);
11
+ });
12
+ return client;
13
+ }
14
+ /** Wire to `export const onRequestError` in instrumentation.ts (Next 15+). */
15
+ export function captureRequestError(error, request, context) {
16
+ getClient()?.captureException(error, {
17
+ extra: {
18
+ request: { url: request.path, method: request.method },
19
+ transaction: context?.routePath,
20
+ context,
21
+ },
22
+ });
23
+ }
24
+ export { getClient, captureException, captureMessage, addBreadcrumb, setUser, setTag, setExtra, flush, close, log, } from "../core/singleton.js";
25
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/nextjs/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,kCAAkC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAIhF,iGAAiG;AACjG,MAAM,UAAU,IAAI,CAAC,OAAwB;IAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3E,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,CAAQ,EAAE,EAAE;QAC3C,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,CAAU,EAAE,EAAE;QAC9C,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CACjC,KAAc,EACd,OAA6E,EAC7E,OAA4E;IAE5E,SAAS,EAAE,EAAE,gBAAgB,CAAC,KAAK,EAAE;QACnC,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;YACtD,WAAW,EAAE,OAAO,EAAE,SAAS;YAC/B,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,GAAG,GACJ,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,21 @@
1
+ interface ReqLike {
2
+ method?: string;
3
+ url?: string;
4
+ originalUrl?: string;
5
+ headers?: Record<string, string | string[] | undefined>;
6
+ query?: Record<string, unknown>;
7
+ route?: {
8
+ path?: string;
9
+ };
10
+ }
11
+ interface ResLike {
12
+ statusCode?: number;
13
+ on(event: "finish", cb: () => void): void;
14
+ }
15
+ type NextLike = (err?: unknown) => void;
16
+ /** Emits a span (transaction) per request for APM. Mount before your routes. */
17
+ export declare function tracingHandler(): (req: ReqLike, res: ResLike, next: NextLike) => void;
18
+ /** Captures errors flowing through Express' error pipeline, then re-throws to the next handler. */
19
+ export declare function errorHandler(): (err: unknown, req: ReqLike, _res: ResLike, next: NextLike) => void;
20
+ export {};
21
+ //# sourceMappingURL=express.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/node/express.ts"],"names":[],"mappings":"AAIA,UAAU,OAAO;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3B;AACD,UAAU,OAAO;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CAC3C;AACD,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAiBxC,gFAAgF;AAChF,wBAAgB,cAAc,KACpB,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,KAAG,IAAI,CAoB1D;AAED,mGAAmG;AACnG,wBAAgB,YAAY,KAClB,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,KAAG,IAAI,CAMzE"}
@@ -0,0 +1,47 @@
1
+ import { getClient } from "./index.js";
2
+ function transactionName(req) {
3
+ const path = req.route?.path ?? req.originalUrl ?? req.url ?? "/";
4
+ return `${req.method ?? "GET"} ${path}`;
5
+ }
6
+ function toRequestContext(req) {
7
+ const headers = {};
8
+ for (const [k, v] of Object.entries(req.headers ?? {})) {
9
+ if (v !== undefined)
10
+ headers[k] = Array.isArray(v) ? v.join(", ") : v;
11
+ }
12
+ return { method: req.method, url: req.originalUrl ?? req.url, headers };
13
+ }
14
+ const hex = (len) => globalThis.crypto.randomUUID().replace(/-/g, "").slice(0, len);
15
+ /** Emits a span (transaction) per request for APM. Mount before your routes. */
16
+ export function tracingHandler() {
17
+ return (req, res, next) => {
18
+ const start = Date.now();
19
+ const traceId = hex(32);
20
+ res.on("finish", () => {
21
+ const status = res.statusCode ?? 0;
22
+ getClient()?.captureSpan({
23
+ trace_id: traceId,
24
+ span_id: hex(16),
25
+ transaction: transactionName(req),
26
+ op: "http.server",
27
+ start_time: start,
28
+ duration_ms: Date.now() - start,
29
+ status: status >= 500 ? "error" : "ok",
30
+ http_method: req.method,
31
+ http_status: status,
32
+ tags: {},
33
+ });
34
+ });
35
+ next();
36
+ };
37
+ }
38
+ /** Captures errors flowing through Express' error pipeline, then re-throws to the next handler. */
39
+ export function errorHandler() {
40
+ return (err, req, _res, next) => {
41
+ getClient()?.captureException(err, {
42
+ extra: { request: toRequestContext(req), transaction: transactionName(req) },
43
+ });
44
+ next(err);
45
+ };
46
+ }
47
+ //# sourceMappingURL=express.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/node/express.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAiBvC,SAAS,eAAe,CAAC,GAAY;IACnC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,EAAE,IAAI,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC;IAClE,OAAO,GAAG,GAAG,CAAC,MAAM,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAY;IACpC,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAE5F,gFAAgF;AAChF,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAY,EAAE,GAAY,EAAE,IAAc,EAAQ,EAAE;QAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;QACxB,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;YACpB,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC;YACnC,SAAS,EAAE,EAAE,WAAW,CAAC;gBACvB,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;gBAChB,WAAW,EAAE,eAAe,CAAC,GAAG,CAAC;gBACjC,EAAE,EAAE,aAAa;gBACjB,UAAU,EAAE,KAAK;gBACjB,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;gBAC/B,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;gBACtC,WAAW,EAAE,GAAG,CAAC,MAAM;gBACvB,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,EAAE;aACT,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,EAAE,CAAC;IACT,CAAC,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,GAAY,EAAE,GAAY,EAAE,IAAa,EAAE,IAAc,EAAQ,EAAE;QACzE,SAAS,EAAE,EAAE,gBAAgB,CAAC,GAAG,EAAE;YACjC,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE;SAC7E,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Client } from "../core/index.js";
2
+ /** Capture otherwise-fatal errors, flush, then let the process exit as it would have. */
3
+ export declare function installGlobalHandlers(client: Client): void;
4
+ //# sourceMappingURL=handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/node/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,yFAAyF;AACzF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAW1D"}
@@ -0,0 +1,13 @@
1
+ /** Capture otherwise-fatal errors, flush, then let the process exit as it would have. */
2
+ export function installGlobalHandlers(client) {
3
+ process.on("uncaughtException", (error) => {
4
+ client.captureException(error, { level: "fatal" });
5
+ void client.flush().finally(() => {
6
+ process.exit(1);
7
+ });
8
+ });
9
+ process.on("unhandledRejection", (reason) => {
10
+ client.captureException(reason, { level: "error" });
11
+ });
12
+ }
13
+ //# sourceMappingURL=handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/node/handlers.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,KAAY,EAAE,EAAE;QAC/C,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACnD,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;YAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAe,EAAE,EAAE;QACnD,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type Client, type ClientOptions } from "../core/index.js";
2
+ export interface NodeInitOptions extends Omit<ClientOptions, "sdk" | "platform"> {
3
+ /** Install process-level uncaughtException / unhandledRejection handlers. Default true. */
4
+ installGlobalHandlers?: boolean;
5
+ }
6
+ /** Node init: creates the global client and (by default) wires process error handlers. */
7
+ export declare function init(options: NodeInitOptions): Client;
8
+ export { setClient, getClient, captureException, captureMessage, addBreadcrumb, setUser, setTag, setExtra, flush, close, log, } from "../core/singleton.js";
9
+ export { tracingHandler, errorHandler } from "./express.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMnE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,UAAU,CAAC;IAC9E,2FAA2F;IAC3F,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,0FAA0F;AAC1F,wBAAgB,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAWrD;AAGD,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { init as coreInit } from "../core/singleton.js";
2
+ import { installGlobalHandlers } from "./handlers.js";
3
+ const SDK_INFO = { name: "@muhammetgoktug/ek-sentry/node", version: "0.1.1" };
4
+ /** Node init: creates the global client and (by default) wires process error handlers. */
5
+ export function init(options) {
6
+ const client = coreInit({
7
+ ...options,
8
+ platform: "node",
9
+ sdk: SDK_INFO,
10
+ serverName: options.serverName ?? process.env.HOSTNAME,
11
+ });
12
+ if (options.installGlobalHandlers !== false) {
13
+ installGlobalHandlers(client);
14
+ }
15
+ return client;
16
+ }
17
+ // Universal API — re-exported so users only need one import.
18
+ export { setClient, getClient, captureException, captureMessage, addBreadcrumb, setUser, setTag, setExtra, flush, close, log, } from "../core/singleton.js";
19
+ // Optional Express/Fastify-shape middleware (no runtime dep on express).
20
+ export { tracingHandler, errorHandler } from "./express.js";
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAO9E,0FAA0F;AAC1F,MAAM,UAAU,IAAI,CAAC,OAAwB;IAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC;QACtB,GAAG,OAAO;QACV,QAAQ,EAAE,MAAM;QAChB,GAAG,EAAE,QAAQ;QACb,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ;KACvD,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,qBAAqB,KAAK,KAAK,EAAE,CAAC;QAC5C,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,6DAA6D;AAC7D,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAE9B,yEAAyE;AACzE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Client, type ClientOptions } from "./core/index.js";
2
+ export type ReactNativeInitOptions = Omit<ClientOptions, "sdk" | "platform">;
3
+ /** RN init: creates the global client and chains into RN's ErrorUtils for fatal errors. */
4
+ export declare function initReactNative(options: ReactNativeInitOptions): Client;
5
+ export { setClient, getClient, captureException, captureMessage, addBreadcrumb, setUser, setTag, setExtra, flush, close, log, } from "./core/singleton.js";
6
+ //# sourceMappingURL=react-native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKlE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,UAAU,CAAC,CAAC;AAO7E,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAYvE;AAED,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,GAAG,GACJ,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { init as coreInit } from "./core/singleton.js";
2
+ const SDK_INFO = { name: "@muhammetgoktug/ek-sentry/react-native", version: "0.1.1" };
3
+ /** RN init: creates the global client and chains into RN's ErrorUtils for fatal errors. */
4
+ export function initReactNative(options) {
5
+ const client = coreInit({ ...options, platform: "browser", sdk: SDK_INFO });
6
+ const errorUtils = globalThis.ErrorUtils;
7
+ if (errorUtils?.setGlobalHandler) {
8
+ const previous = errorUtils.getGlobalHandler?.();
9
+ errorUtils.setGlobalHandler((error, isFatal) => {
10
+ client.captureException(error, { level: isFatal ? "fatal" : "error" });
11
+ previous?.(error, isFatal);
12
+ });
13
+ }
14
+ return client;
15
+ }
16
+ export { setClient, getClient, captureException, captureMessage, addBreadcrumb, setUser, setTag, setExtra, flush, close, log, } from "./core/singleton.js";
17
+ //# sourceMappingURL=react-native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.js","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,wCAAwC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAStF,2FAA2F;AAC3F,MAAM,UAAU,eAAe,CAAC,OAA+B;IAC7D,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE5E,MAAM,UAAU,GAAI,UAA8C,CAAC,UAAU,CAAC;IAC9E,IAAI,UAAU,EAAE,gBAAgB,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC;QACjD,UAAU,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC7C,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,GAAG,GACJ,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Component, type ReactNode } from "react";
2
+ interface Props {
3
+ children: ReactNode;
4
+ fallback?: ReactNode;
5
+ }
6
+ interface State {
7
+ hasError: boolean;
8
+ }
9
+ /** Catches render errors in the subtree and reports them to ek-sentry. */
10
+ export declare class ErrorBoundary extends Component<Props, State> {
11
+ state: State;
12
+ static getDerivedStateFromError(): State;
13
+ componentDidCatch(error: Error): void;
14
+ render(): ReactNode;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,0EAA0E;AAC1E,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAC/C,KAAK,EAAE,KAAK,CAAuB;IAE5C,MAAM,CAAC,wBAAwB,IAAI,KAAK;IAI/B,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAIrC,MAAM,IAAI,SAAS;CAM7B"}
package/dist/react.js ADDED
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Component } from "react";
4
+ import { captureException } from "./core/singleton.js";
5
+ /** Catches render errors in the subtree and reports them to ek-sentry. */
6
+ export class ErrorBoundary extends Component {
7
+ state = { hasError: false };
8
+ static getDerivedStateFromError() {
9
+ return { hasError: true };
10
+ }
11
+ componentDidCatch(error) {
12
+ captureException(error, { level: "error" });
13
+ }
14
+ render() {
15
+ if (this.state.hasError) {
16
+ return this.props.fallback ?? _jsx("div", { children: "Something went wrong." });
17
+ }
18
+ return this.props.children;
19
+ }
20
+ }
21
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAUvD,0EAA0E;AAC1E,MAAM,OAAO,aAAc,SAAQ,SAAuB;IAC/C,KAAK,GAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAE5C,MAAM,CAAC,wBAAwB;QAC7B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAEQ,iBAAiB,CAAC,KAAY;QACrC,gBAAgB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEQ,MAAM;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,kDAAgC,CAAC;QACjE,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ export type Level = "fatal" | "error" | "warning" | "info" | "debug";
2
+ export type Platform = "node" | "browser" | "nextjs";
3
+ /** Epoch milliseconds. Compact transport format; the worker converts to DateTime64(3). */
4
+ export type Timestamp = number;
5
+ export type Tags = Record<string, string>;
6
+ export interface SdkInfo {
7
+ name: string;
8
+ version: string;
9
+ }
10
+ export interface User {
11
+ id?: string;
12
+ email?: string;
13
+ username?: string;
14
+ ip?: string;
15
+ }
16
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErD,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1C,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export interface ParsedDsn {
2
+ protocol: string;
3
+ publicKey: string;
4
+ host: string;
5
+ port: string;
6
+ projectId: string;
7
+ /** Fully-qualified ingest endpoint the SDK transport POSTs envelopes to. */
8
+ ingestUrl: string;
9
+ }
10
+ /**
11
+ * DSN format: `<protocol>://<publicKey>@<host>[:port]/<projectId>`
12
+ * e.g. https://abc123@sentry.example.com/4
13
+ */
14
+ export declare function parseDsn(dsn: string): ParsedDsn;
15
+ //# sourceMappingURL=dsn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../../src/schemas/dsn.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CA2B/C"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * DSN format: `<protocol>://<publicKey>@<host>[:port]/<projectId>`
3
+ * e.g. https://abc123@sentry.example.com/4
4
+ */
5
+ export function parseDsn(dsn) {
6
+ let url;
7
+ try {
8
+ url = new URL(dsn);
9
+ }
10
+ catch {
11
+ throw new Error(`Invalid DSN: ${dsn}`);
12
+ }
13
+ const publicKey = url.username;
14
+ const projectId = url.pathname.replace(/^\/+/, "").split("/")[0] ?? "";
15
+ if (!publicKey)
16
+ throw new Error(`DSN missing public key: ${dsn}`);
17
+ if (!projectId)
18
+ throw new Error(`DSN missing project id: ${dsn}`);
19
+ const protocol = url.protocol.replace(":", "");
20
+ const host = url.hostname;
21
+ const port = url.port;
22
+ const origin = port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;
23
+ return {
24
+ protocol,
25
+ publicKey,
26
+ host,
27
+ port,
28
+ projectId,
29
+ ingestUrl: `${origin}/api/${projectId}/envelope`,
30
+ };
31
+ }
32
+ //# sourceMappingURL=dsn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../../src/schemas/dsn.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC/B,MAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEvE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC1B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACtB,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,MAAM,IAAI,EAAE,CAAC;IAEhF,OAAO;QACL,QAAQ;QACR,SAAS;QACT,IAAI;QACJ,IAAI;QACJ,SAAS;QACT,SAAS,EAAE,GAAG,MAAM,QAAQ,SAAS,WAAW;KACjD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { SdkInfo, Timestamp } from "./common.js";
2
+ import type { ErrorEvent } from "./error.js";
3
+ import type { LogEntry } from "./log.js";
4
+ import type { SpanEvent } from "./span.js";
5
+ export type EnvelopeItem = {
6
+ type: "error";
7
+ payload: ErrorEvent;
8
+ } | {
9
+ type: "log";
10
+ payload: LogEntry;
11
+ } | {
12
+ type: "span";
13
+ payload: SpanEvent;
14
+ };
15
+ export type EnvelopeItemType = EnvelopeItem["type"];
16
+ export interface Envelope {
17
+ sdk: SdkInfo;
18
+ sent_at: Timestamp;
19
+ items: EnvelopeItem[];
20
+ }
21
+ //# sourceMappingURL=envelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/schemas/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=envelope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../src/schemas/envelope.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
1
+ import type { Level, Platform, SdkInfo, Tags, Timestamp, User } from "./common.js";
2
+ export interface StackFrame {
3
+ filename?: string;
4
+ function?: string;
5
+ module?: string;
6
+ lineno?: number;
7
+ colno?: number;
8
+ /** True when the frame belongs to user code (not node_modules). Drives fingerprinting. */
9
+ in_app?: boolean;
10
+ context_line?: string;
11
+ pre_context?: string[];
12
+ post_context?: string[];
13
+ }
14
+ export interface Exception {
15
+ type: string;
16
+ value: string;
17
+ /** Frames ordered oldest-to-newest (caller first, crash point last). */
18
+ frames: StackFrame[];
19
+ }
20
+ export interface Breadcrumb {
21
+ timestamp: Timestamp;
22
+ type?: string;
23
+ category?: string;
24
+ level?: Level;
25
+ message?: string;
26
+ data?: Record<string, unknown>;
27
+ }
28
+ export interface Request {
29
+ method?: string;
30
+ url?: string;
31
+ headers?: Record<string, string>;
32
+ query?: Record<string, string>;
33
+ data?: unknown;
34
+ }
35
+ export interface ErrorEvent {
36
+ event_id: string;
37
+ timestamp: Timestamp;
38
+ level: Level;
39
+ platform: Platform;
40
+ environment: string;
41
+ release?: string;
42
+ server_name?: string;
43
+ /** Logical operation/route name, e.g. "GET /users/:id". */
44
+ transaction?: string;
45
+ /** Set by captureMessage; for captureException the message is derived from exception. */
46
+ message?: string;
47
+ /** Chained exceptions, innermost cause last. */
48
+ exception?: Exception[];
49
+ tags: Tags;
50
+ extra: Record<string, unknown>;
51
+ user?: User;
52
+ request?: Request;
53
+ breadcrumbs: Breadcrumb[];
54
+ sdk: SdkInfo;
55
+ }
56
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/schemas/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,GAAG,EAAE,OAAO,CAAC;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/schemas/error.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from "./common.js";
2
+ export * from "./error.js";
3
+ export * from "./log.js";
4
+ export * from "./span.js";
5
+ export * from "./envelope.js";
6
+ export * from "./dsn.js";
7
+ export * from "./stacktrace.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./common.js";
2
+ export * from "./error.js";
3
+ export * from "./log.js";
4
+ export * from "./span.js";
5
+ export * from "./envelope.js";
6
+ export * from "./dsn.js";
7
+ export * from "./stacktrace.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Level, SdkInfo, Timestamp } from "./common.js";
2
+ /** Attribute values are flattened to scalars; worker stringifies them for ClickHouse Map. */
3
+ export type LogAttributes = Record<string, string | number | boolean | null>;
4
+ export interface LogEntry {
5
+ timestamp: Timestamp;
6
+ level: Level;
7
+ message: string;
8
+ logger: string;
9
+ environment: string;
10
+ release?: string;
11
+ trace_id?: string;
12
+ span_id?: string;
13
+ attributes: LogAttributes;
14
+ sdk: SdkInfo;
15
+ }
16
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/schemas/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7D,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;AAE7E,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,aAAa,CAAC;IAC1B,GAAG,EAAE,OAAO,CAAC;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/schemas/log.ts"],"names":[],"mappings":""}