@deeptracer/core 0.6.3 → 0.6.4
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/README.md +5 -5
- package/dist/{chunk-W62R346F.js → chunk-QAJHHVX4.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ const result = await logger.startSpan("fetch-user", async (span) => {
|
|
|
74
74
|
})
|
|
75
75
|
|
|
76
76
|
// Flush before shutdown
|
|
77
|
-
logger.destroy()
|
|
77
|
+
await logger.destroy()
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
## Configuration
|
|
@@ -424,8 +424,8 @@ await logger.flush()
|
|
|
424
424
|
Stop the internal batch timer and flush any remaining log entries. Call this during graceful shutdown.
|
|
425
425
|
|
|
426
426
|
```ts
|
|
427
|
-
process.on("SIGTERM", () => {
|
|
428
|
-
logger.destroy()
|
|
427
|
+
process.on("SIGTERM", async () => {
|
|
428
|
+
await logger.destroy()
|
|
429
429
|
process.exit(0)
|
|
430
430
|
})
|
|
431
431
|
```
|
|
@@ -580,7 +580,7 @@ In serverless functions, the execution context may freeze immediately after the
|
|
|
580
580
|
- **Auto-detected interval**: When `VERCEL` or `AWS_LAMBDA_FUNCTION_NAME` is set, the default `flushIntervalMs` drops to 200ms.
|
|
581
581
|
- **Explicit flush**: Call `await logger.flush()` before returning a response to guarantee delivery.
|
|
582
582
|
|
|
583
|
-
For
|
|
583
|
+
For **`@deeptracer/nextjs`** users, `withRouteHandler` works with any handler function including third-party ones (Auth.js, Better Auth, Stripe webhooks) — just wrap the exported handler. Only use `waitUntil` if the library doesn't export individual `GET`/`POST` functions:
|
|
584
584
|
|
|
585
585
|
```ts
|
|
586
586
|
import { waitUntil } from "@vercel/functions"
|
|
@@ -608,7 +608,7 @@ All requests include:
|
|
|
608
608
|
- `Content-Type: application/json` header
|
|
609
609
|
- `service` and `environment` fields in the JSON body
|
|
610
610
|
|
|
611
|
-
If a request fails, a warning is logged to the console
|
|
611
|
+
If a request fails with a network error or a 5xx response, the SDK retries up to **3 times** with exponential backoff (1s → 2s → 4s, +20% jitter). 4xx errors (bad auth, invalid payload) are not retried. After all retries are exhausted, a single warning is logged to the console — subsequent failures for the same endpoint are suppressed to avoid console spam. The SDK never throws on transport errors.
|
|
612
612
|
|
|
613
613
|
## Monorepo
|
|
614
614
|
|
package/dist/index.cjs
CHANGED
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.6.
|
|
21
|
+
declare const SDK_VERSION = "0.6.4";
|
|
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.6.
|
|
21
|
+
declare const SDK_VERSION = "0.6.4";
|
|
22
22
|
declare const SDK_NAME = "core";
|
|
23
23
|
|
|
24
24
|
export { Logger, SDK_NAME, SDK_VERSION, noopLogger };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
package/dist/internal.js
CHANGED