@llmops/app 0.6.0 → 0.6.1-beta.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.
package/dist/index.cjs CHANGED
@@ -18539,11 +18539,14 @@ function createCostTrackingMiddleware(config$1 = {}) {
18539
18539
  } catch {
18540
18540
  log("Failed to parse request body");
18541
18541
  }
18542
+ const isInternalRequest = c.req.header(__llmops_core.LLMOPS_INTERNAL_HEADER) === "1";
18542
18543
  const traceContext = resolveTraceContext(c.req);
18543
18544
  c.set("__traceContext", traceContext);
18544
- c.header(__llmops_core.LLMOPS_TRACE_ID_HEADER, traceContext.traceId);
18545
- c.header(__llmops_core.LLMOPS_SPAN_ID_HEADER, traceContext.spanId);
18546
- c.header("traceparent", formatTraceparent(traceContext.traceId, traceContext.spanId));
18545
+ if (!isInternalRequest) {
18546
+ c.header(__llmops_core.LLMOPS_TRACE_ID_HEADER, traceContext.traceId);
18547
+ c.header(__llmops_core.LLMOPS_SPAN_ID_HEADER, traceContext.spanId);
18548
+ c.header("traceparent", formatTraceparent(traceContext.traceId, traceContext.spanId));
18549
+ }
18547
18550
  const context = {
18548
18551
  requestId,
18549
18552
  startTime,
@@ -18580,7 +18583,7 @@ function createCostTrackingMiddleware(config$1 = {}) {
18580
18583
  flushIntervalMs,
18581
18584
  debug
18582
18585
  });
18583
- const traceBatchWriter = getGlobalTraceBatchWriter({
18586
+ const traceBatchWriter = isInternalRequest ? void 0 : getGlobalTraceBatchWriter({
18584
18587
  upsertTrace: (data) => db.upsertTrace(data),
18585
18588
  batchInsertSpans: (spans) => db.batchInsertSpans(spans),
18586
18589
  batchInsertSpanEvents: (events) => db.batchInsertSpanEvents(events)
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import { COST_SUMMARY_GROUP_BY, CacheService, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, ManifestRouter, ManifestService, SupportedProviders, createDataLayer, createWorkspaceSettingsDataLayer, generateId, getAuthClientOptions, logger, playgroundColumnSchema, validateLLMOpsConfig, variantJsonDataSchema } from "@llmops/core";
2
+ import { COST_SUMMARY_GROUP_BY, CacheService, LLMOPS_INTERNAL_HEADER, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, ManifestRouter, ManifestService, SupportedProviders, createDataLayer, createWorkspaceSettingsDataLayer, generateId, getAuthClientOptions, logger, playgroundColumnSchema, validateLLMOpsConfig, variantJsonDataSchema } from "@llmops/core";
3
3
  import nunjucks from "nunjucks";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { dirname, join } from "node:path";
@@ -18511,11 +18511,14 @@ function createCostTrackingMiddleware(config$1 = {}) {
18511
18511
  } catch {
18512
18512
  log("Failed to parse request body");
18513
18513
  }
18514
+ const isInternalRequest = c.req.header(LLMOPS_INTERNAL_HEADER) === "1";
18514
18515
  const traceContext = resolveTraceContext(c.req);
18515
18516
  c.set("__traceContext", traceContext);
18516
- c.header(LLMOPS_TRACE_ID_HEADER, traceContext.traceId);
18517
- c.header(LLMOPS_SPAN_ID_HEADER, traceContext.spanId);
18518
- c.header("traceparent", formatTraceparent(traceContext.traceId, traceContext.spanId));
18517
+ if (!isInternalRequest) {
18518
+ c.header(LLMOPS_TRACE_ID_HEADER, traceContext.traceId);
18519
+ c.header(LLMOPS_SPAN_ID_HEADER, traceContext.spanId);
18520
+ c.header("traceparent", formatTraceparent(traceContext.traceId, traceContext.spanId));
18521
+ }
18519
18522
  const context = {
18520
18523
  requestId,
18521
18524
  startTime,
@@ -18552,7 +18555,7 @@ function createCostTrackingMiddleware(config$1 = {}) {
18552
18555
  flushIntervalMs,
18553
18556
  debug
18554
18557
  });
18555
- const traceBatchWriter = getGlobalTraceBatchWriter({
18558
+ const traceBatchWriter = isInternalRequest ? void 0 : getGlobalTraceBatchWriter({
18556
18559
  upsertTrace: (data) => db.upsertTrace(data),
18557
18560
  batchInsertSpans: (spans) => db.batchInsertSpans(spans),
18558
18561
  batchInsertSpanEvents: (events) => db.batchInsertSpanEvents(events)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/app",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-beta.2",
4
4
  "description": "LLMOps application with server and client",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -76,8 +76,8 @@
76
76
  "react-hook-form": "^7.68.0",
77
77
  "recharts": "^3.6.0",
78
78
  "uuid": "^13.0.0",
79
- "@llmops/core": "^0.6.0",
80
- "@llmops/gateway": "^0.6.0"
79
+ "@llmops/core": "^0.6.1-beta.2",
80
+ "@llmops/gateway": "^0.6.1-beta.2"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": "^19.2.1",