@llmops/app 1.0.0-beta.13 → 1.0.0-beta.15
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/dist/index.cjs +17 -0
- package/dist/index.mjs +17 -0
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -14182,6 +14182,13 @@ function createBatchWriter(deps, config$1 = {}) {
|
|
|
14182
14182
|
function enqueue(request) {
|
|
14183
14183
|
queue.push(request);
|
|
14184
14184
|
log(`[BatchWriter] Enqueued request ${request.requestId}, queue size: ${queue.length}`);
|
|
14185
|
+
if (typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node) {
|
|
14186
|
+
flush().catch((err) => {
|
|
14187
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
14188
|
+
__llmops_core.logger.error(`[BatchWriter] Edge flush error: ${errorMsg}`);
|
|
14189
|
+
});
|
|
14190
|
+
return;
|
|
14191
|
+
}
|
|
14185
14192
|
if (!running) start();
|
|
14186
14193
|
if (queue.length >= maxBatchSize) {
|
|
14187
14194
|
log(`[BatchWriter] Max batch size reached, forcing flush`);
|
|
@@ -14381,6 +14388,13 @@ function createTraceBatchWriter(deps, config$1 = {}) {
|
|
|
14381
14388
|
function enqueue(item) {
|
|
14382
14389
|
queue.push(item);
|
|
14383
14390
|
log(`[TraceBatchWriter] Enqueued span ${item.span.spanId}, queue size: ${queue.length}`);
|
|
14391
|
+
if (typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node) {
|
|
14392
|
+
flush().catch((err) => {
|
|
14393
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
14394
|
+
__llmops_core.logger.error(`[TraceBatchWriter] Edge flush error: ${errorMsg}`);
|
|
14395
|
+
});
|
|
14396
|
+
return;
|
|
14397
|
+
}
|
|
14384
14398
|
if (!running) start();
|
|
14385
14399
|
if (queue.length >= maxBatchSize) {
|
|
14386
14400
|
log(`[TraceBatchWriter] Max batch size reached, forcing flush`);
|
|
@@ -14739,6 +14753,8 @@ async function processUsageAndLog(params) {
|
|
|
14739
14753
|
};
|
|
14740
14754
|
batchWriter.enqueue(requestData);
|
|
14741
14755
|
log(`Enqueued request ${requestId} for logging`);
|
|
14756
|
+
const isEdge = typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node;
|
|
14757
|
+
if (isEdge) await batchWriter.flush();
|
|
14742
14758
|
if (traceBatchWriter && traceContext) {
|
|
14743
14759
|
const now = /* @__PURE__ */ new Date();
|
|
14744
14760
|
const startTimeDate = new Date(now.getTime() - latencyMs);
|
|
@@ -14813,6 +14829,7 @@ async function processUsageAndLog(params) {
|
|
|
14813
14829
|
trace: traceData
|
|
14814
14830
|
});
|
|
14815
14831
|
log(`Enqueued trace span ${traceContext.spanId} for trace ${traceContext.traceId}`);
|
|
14832
|
+
if (isEdge) await traceBatchWriter.flush();
|
|
14816
14833
|
}
|
|
14817
14834
|
}
|
|
14818
14835
|
|
package/dist/index.mjs
CHANGED
|
@@ -14156,6 +14156,13 @@ function createBatchWriter(deps, config$1 = {}) {
|
|
|
14156
14156
|
function enqueue(request) {
|
|
14157
14157
|
queue.push(request);
|
|
14158
14158
|
log(`[BatchWriter] Enqueued request ${request.requestId}, queue size: ${queue.length}`);
|
|
14159
|
+
if (typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node) {
|
|
14160
|
+
flush().catch((err) => {
|
|
14161
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
14162
|
+
logger.error(`[BatchWriter] Edge flush error: ${errorMsg}`);
|
|
14163
|
+
});
|
|
14164
|
+
return;
|
|
14165
|
+
}
|
|
14159
14166
|
if (!running) start();
|
|
14160
14167
|
if (queue.length >= maxBatchSize) {
|
|
14161
14168
|
log(`[BatchWriter] Max batch size reached, forcing flush`);
|
|
@@ -14355,6 +14362,13 @@ function createTraceBatchWriter(deps, config$1 = {}) {
|
|
|
14355
14362
|
function enqueue(item) {
|
|
14356
14363
|
queue.push(item);
|
|
14357
14364
|
log(`[TraceBatchWriter] Enqueued span ${item.span.spanId}, queue size: ${queue.length}`);
|
|
14365
|
+
if (typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node) {
|
|
14366
|
+
flush().catch((err) => {
|
|
14367
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
14368
|
+
logger.error(`[TraceBatchWriter] Edge flush error: ${errorMsg}`);
|
|
14369
|
+
});
|
|
14370
|
+
return;
|
|
14371
|
+
}
|
|
14358
14372
|
if (!running) start();
|
|
14359
14373
|
if (queue.length >= maxBatchSize) {
|
|
14360
14374
|
log(`[TraceBatchWriter] Max batch size reached, forcing flush`);
|
|
@@ -14713,6 +14727,8 @@ async function processUsageAndLog(params) {
|
|
|
14713
14727
|
};
|
|
14714
14728
|
batchWriter.enqueue(requestData);
|
|
14715
14729
|
log(`Enqueued request ${requestId} for logging`);
|
|
14730
|
+
const isEdge = typeof globalThis.process === "undefined" || !globalThis.process?.versions?.node;
|
|
14731
|
+
if (isEdge) await batchWriter.flush();
|
|
14716
14732
|
if (traceBatchWriter && traceContext) {
|
|
14717
14733
|
const now = /* @__PURE__ */ new Date();
|
|
14718
14734
|
const startTimeDate = new Date(now.getTime() - latencyMs);
|
|
@@ -14787,6 +14803,7 @@ async function processUsageAndLog(params) {
|
|
|
14787
14803
|
trace: traceData
|
|
14788
14804
|
});
|
|
14789
14805
|
log(`Enqueued trace span ${traceContext.spanId} for trace ${traceContext.traceId}`);
|
|
14806
|
+
if (isEdge) await traceBatchWriter.flush();
|
|
14790
14807
|
}
|
|
14791
14808
|
}
|
|
14792
14809
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/app",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.15",
|
|
4
4
|
"description": "LLMOps application with server and client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"react-hook-form": "^7.68.0",
|
|
76
76
|
"recharts": "^3.6.0",
|
|
77
77
|
"uuid": "^13.0.0",
|
|
78
|
-
"@llmops/core": "^1.0.0-beta.
|
|
79
|
-
"@llmops/gateway": "^1.0.0-beta.
|
|
80
|
-
"@llmops/sdk": "^1.0.0-beta.
|
|
78
|
+
"@llmops/core": "^1.0.0-beta.15",
|
|
79
|
+
"@llmops/gateway": "^1.0.0-beta.15",
|
|
80
|
+
"@llmops/sdk": "^1.0.0-beta.15"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": "^19.2.1",
|