@deeptracer/core 0.4.3 → 0.5.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/README.md +6 -8
- package/dist/{chunk-2W6VVHL7.js → chunk-GH7R74RT.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
|
@@ -50,7 +50,7 @@ const logger = createLogger({
|
|
|
50
50
|
service: "api",
|
|
51
51
|
environment: "production",
|
|
52
52
|
endpoint: "https://your-deeptracer.example.com",
|
|
53
|
-
|
|
53
|
+
apiKey: "dt_xxx",
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
// Structured logging (batched -- sent in groups of 50 or every 5 seconds)
|
|
@@ -87,7 +87,7 @@ const logger = createLogger({
|
|
|
87
87
|
service: "api", // Service name within the product
|
|
88
88
|
environment: "production", // "production" or "staging"
|
|
89
89
|
endpoint: "https://dt.co", // DeepTracer ingestion endpoint URL
|
|
90
|
-
|
|
90
|
+
apiKey: "dt_xxx", // API key for authentication
|
|
91
91
|
|
|
92
92
|
// Optional
|
|
93
93
|
batchSize: 50, // Logs to buffer before sending (default: 50)
|
|
@@ -101,8 +101,7 @@ const logger = createLogger({
|
|
|
101
101
|
| `service` | `string` | Yes | -- | Service name (e.g., `"api"`, `"worker"`, `"web"`) |
|
|
102
102
|
| `environment` | `"production" \| "staging"` | Yes | -- | Deployment environment |
|
|
103
103
|
| `endpoint` | `string` | Yes | -- | DeepTracer ingestion endpoint URL |
|
|
104
|
-
| `
|
|
105
|
-
| `publicKey` | `string` | No | -- | Client-side API key (prefix: `dt_public_`) |
|
|
104
|
+
| `apiKey` | `string` | Yes | -- | API key (prefix: `dt_`) |
|
|
106
105
|
| `batchSize` | `number` | No | `50` | Number of log entries to buffer before flushing |
|
|
107
106
|
| `flushIntervalMs` | `number` | No | `5000` | Milliseconds between automatic flushes |
|
|
108
107
|
| `debug` | `boolean` | No | `false` | When `true`, all log calls also print to the console |
|
|
@@ -120,7 +119,7 @@ const logger = createLogger({
|
|
|
120
119
|
service: "api",
|
|
121
120
|
environment: "production",
|
|
122
121
|
endpoint: "https://your-deeptracer.example.com",
|
|
123
|
-
|
|
122
|
+
apiKey: "dt_xxx",
|
|
124
123
|
})
|
|
125
124
|
```
|
|
126
125
|
|
|
@@ -439,8 +438,7 @@ interface LoggerConfig {
|
|
|
439
438
|
service: string
|
|
440
439
|
environment: "production" | "staging"
|
|
441
440
|
endpoint: string
|
|
442
|
-
|
|
443
|
-
publicKey?: string
|
|
441
|
+
apiKey: string
|
|
444
442
|
batchSize?: number // default: 50
|
|
445
443
|
flushIntervalMs?: number // default: 5000
|
|
446
444
|
debug?: boolean // default: false
|
|
@@ -584,7 +582,7 @@ The transport layer sends data to four DeepTracer ingestion endpoints:
|
|
|
584
582
|
| `POST /ingest/llm` | Immediate | LLM usage reports |
|
|
585
583
|
|
|
586
584
|
All requests include:
|
|
587
|
-
- `Authorization: Bearer <
|
|
585
|
+
- `Authorization: Bearer <apiKey>` header
|
|
588
586
|
- `Content-Type: application/json` header
|
|
589
587
|
- `service` and `environment` fields in the JSON body
|
|
590
588
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { B as BeforeSendEvent, a as Breadcrumb, E as ErrorReport, I as InactiveSpan, L as LLMUsageReport, b as LogEntry, c as LogLevel, d as Logger, e as LoggerConfig, M as MiddlewareOptions, S as Span, f as SpanData, U as User, g as createLogger } from './logger-BDTEt7Gi.cjs';
|
|
2
2
|
|
|
3
3
|
/** SDK version. Update on each release. */
|
|
4
|
-
declare const SDK_VERSION = "0.
|
|
4
|
+
declare const SDK_VERSION = "0.5.0";
|
|
5
5
|
declare const SDK_NAME = "core";
|
|
6
6
|
|
|
7
7
|
export { SDK_NAME, SDK_VERSION };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { B as BeforeSendEvent, a as Breadcrumb, E as ErrorReport, I as InactiveSpan, L as LLMUsageReport, b as LogEntry, c as LogLevel, d as Logger, e as LoggerConfig, M as MiddlewareOptions, S as Span, f as SpanData, U as User, g as createLogger } from './logger-BDTEt7Gi.js';
|
|
2
2
|
|
|
3
3
|
/** SDK version. Update on each release. */
|
|
4
|
-
declare const SDK_VERSION = "0.
|
|
4
|
+
declare const SDK_VERSION = "0.5.0";
|
|
5
5
|
declare const SDK_NAME = "core";
|
|
6
6
|
|
|
7
7
|
export { SDK_NAME, SDK_VERSION };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
package/dist/internal.js
CHANGED