@deeptracer/core 0.8.1 → 0.8.2

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.
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var SDK_VERSION = "0.8.1";
2
+ var SDK_VERSION = "0.8.2";
3
3
  var SDK_NAME = "core";
4
4
 
5
5
  // src/transport.ts
@@ -542,6 +542,7 @@ var Logger = class _Logger {
542
542
  * Automatically attaches breadcrumbs from the buffer and user context.
543
543
  */
544
544
  captureError(error, context) {
545
+ const syntheticStack = new Error().stack ?? "";
545
546
  const err = error instanceof Error ? error : new Error(String(error));
546
547
  addBreadcrumb(this.state, {
547
548
  type: "error",
@@ -555,7 +556,7 @@ var Logger = class _Logger {
555
556
  enrichedContext._contexts = { ...this.state.contexts };
556
557
  const report = {
557
558
  error_message: err.message,
558
- stack_trace: err.stack || "",
559
+ stack_trace: err.stack || syntheticStack.split("\n").filter((line) => !line.includes("@deeptracer/")).join("\n"),
559
560
  severity: context?.severity || "medium",
560
561
  context: Object.keys(enrichedContext).length > 0 ? enrichedContext : void 0,
561
562
  trace_id: this.requestMeta?.trace_id,
package/dist/index.cjs CHANGED
@@ -64,7 +64,7 @@ var Batcher = class {
64
64
  };
65
65
 
66
66
  // src/version.ts
67
- var SDK_VERSION = "0.8.1";
67
+ var SDK_VERSION = "0.8.2";
68
68
  var SDK_NAME = "core";
69
69
 
70
70
  // src/transport.ts
@@ -572,6 +572,7 @@ var Logger = class _Logger {
572
572
  * Automatically attaches breadcrumbs from the buffer and user context.
573
573
  */
574
574
  captureError(error, context) {
575
+ const syntheticStack = new Error().stack ?? "";
575
576
  const err = error instanceof Error ? error : new Error(String(error));
576
577
  addBreadcrumb(this.state, {
577
578
  type: "error",
@@ -585,7 +586,7 @@ var Logger = class _Logger {
585
586
  enrichedContext._contexts = { ...this.state.contexts };
586
587
  const report = {
587
588
  error_message: err.message,
588
- stack_trace: err.stack || "",
589
+ stack_trace: err.stack || syntheticStack.split("\n").filter((line) => !line.includes("@deeptracer/")).join("\n"),
589
590
  severity: context?.severity || "medium",
590
591
  context: Object.keys(enrichedContext).length > 0 ? enrichedContext : void 0,
591
592
  trace_id: this.requestMeta?.trace_id,
package/dist/index.d.cts CHANGED
@@ -18,7 +18,7 @@ export { B as BeforeSendEvent, a as Breadcrumb, E as ErrorReport, I as InactiveS
18
18
  declare const noopLogger: Logger;
19
19
 
20
20
  /** SDK version. Update on each release. */
21
- declare const SDK_VERSION = "0.8.1";
21
+ declare const SDK_VERSION = "0.8.2";
22
22
  declare const SDK_NAME = "core";
23
23
 
24
24
  export { Logger, SDK_NAME, SDK_VERSION, noopLogger };
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export { B as BeforeSendEvent, a as Breadcrumb, E as ErrorReport, I as InactiveS
18
18
  declare const noopLogger: Logger;
19
19
 
20
20
  /** SDK version. Update on each release. */
21
- declare const SDK_VERSION = "0.8.1";
21
+ declare const SDK_VERSION = "0.8.2";
22
22
  declare const SDK_NAME = "core";
23
23
 
24
24
  export { Logger, SDK_NAME, SDK_VERSION, noopLogger };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  SDK_NAME,
4
4
  SDK_VERSION,
5
5
  createLogger
6
- } from "./chunk-6QL6H4AH.js";
6
+ } from "./chunk-A2HL7CK6.js";
7
7
 
8
8
  // src/noop-logger.ts
9
9
  var NOOP_INACTIVE_SPAN = {
package/dist/internal.cjs CHANGED
@@ -64,7 +64,7 @@ var Batcher = class {
64
64
  };
65
65
 
66
66
  // src/version.ts
67
- var SDK_VERSION = "0.8.1";
67
+ var SDK_VERSION = "0.8.2";
68
68
  var SDK_NAME = "core";
69
69
 
70
70
  // src/transport.ts
@@ -572,6 +572,7 @@ var Logger = class _Logger {
572
572
  * Automatically attaches breadcrumbs from the buffer and user context.
573
573
  */
574
574
  captureError(error, context) {
575
+ const syntheticStack = new Error().stack ?? "";
575
576
  const err = error instanceof Error ? error : new Error(String(error));
576
577
  addBreadcrumb(this.state, {
577
578
  type: "error",
@@ -585,7 +586,7 @@ var Logger = class _Logger {
585
586
  enrichedContext._contexts = { ...this.state.contexts };
586
587
  const report = {
587
588
  error_message: err.message,
588
- stack_trace: err.stack || "",
589
+ stack_trace: err.stack || syntheticStack.split("\n").filter((line) => !line.includes("@deeptracer/")).join("\n"),
589
590
  severity: context?.severity || "medium",
590
591
  context: Object.keys(enrichedContext).length > 0 ? enrichedContext : void 0,
591
592
  trace_id: this.requestMeta?.trace_id,
package/dist/internal.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Transport,
4
4
  _originalConsole,
5
5
  parseTraceparent
6
- } from "./chunk-6QL6H4AH.js";
6
+ } from "./chunk-A2HL7CK6.js";
7
7
 
8
8
  // src/internal.ts
9
9
  function safeStringify(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeptracer/core",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Core SDK for DeepTracer — Logger class, types, transport, batcher, tracing",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",