@lunora/observability 1.0.0-alpha.85 → 1.0.0-alpha.86

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.d.mts CHANGED
@@ -442,6 +442,19 @@ interface SpanEvent {
442
442
  * the outermost span, which is why the fold prefers it as a trace's anchor.
443
443
  */
444
444
  dispatch?: boolean;
445
+ /**
446
+ * The trace's settled W3C `sampled` verdict, stamped as the span leaves for a
447
+ * sink. Absent means no verdict reached this tier, which every consumer reads
448
+ * as keep.
449
+ *
450
+ * Carried because the OTLP encoders write it into the span's `flags` field,
451
+ * and a span exported with no `flags` reads as UNSAMPLED (0) at the collector
452
+ * — on EVERY span, including the ones it is meant to keep. It is genuinely
453
+ * per-span rather than derivable from "it was exported at all": a trace the
454
+ * tail bias rescued (head-sampled out, then errored) is exported with the bit
455
+ * CLEAR, and saying otherwise misreports the trace's verdict.
456
+ */
457
+ sampled?: boolean;
445
458
  /** Shard key for single-shard calls; absent for the unnamed root DO. */
446
459
  shardKey?: string;
447
460
  /** This span's own id (16-hex). */
@@ -813,11 +826,12 @@ interface DatabaseTelemetryDeps {
813
826
  * increments numbers on it; the shard reads it ONCE at the dispatch boundary
814
827
  * and formats it with {@link formatTally}.
815
828
  *
816
- * Two properties fall out of that split. Per-call cost stays at a few integer
817
- * increments — no object allocation, no lookup — which matters because this is
818
- * on the path of every query. And because nothing is written through the
819
- * dispatch's `SpanHandle`, the wide-event collector is never materialized, so
820
- * a handler that instrumented nothing still doesn't trip the root-span gate.
829
+ * Per-call cost stays at a few integer increments — no object allocation, no
830
+ * lookup — which matters because this is on the path of every query. Nothing
831
+ * is written through the dispatch's `SpanHandle` either, so the wide-event
832
+ * collector is never materialized by instrumentation alone: a dispatch that
833
+ * ran queries gets a root span carrying these counters, but no `lunora.dispatch`
834
+ * log record unless the handler actually opened `ctx.span`.
821
835
  */
822
836
  tally: DatabaseTally;
823
837
  /** Read lazily — the acting user is resolved per span. */
package/dist/index.d.ts CHANGED
@@ -442,6 +442,19 @@ interface SpanEvent {
442
442
  * the outermost span, which is why the fold prefers it as a trace's anchor.
443
443
  */
444
444
  dispatch?: boolean;
445
+ /**
446
+ * The trace's settled W3C `sampled` verdict, stamped as the span leaves for a
447
+ * sink. Absent means no verdict reached this tier, which every consumer reads
448
+ * as keep.
449
+ *
450
+ * Carried because the OTLP encoders write it into the span's `flags` field,
451
+ * and a span exported with no `flags` reads as UNSAMPLED (0) at the collector
452
+ * — on EVERY span, including the ones it is meant to keep. It is genuinely
453
+ * per-span rather than derivable from "it was exported at all": a trace the
454
+ * tail bias rescued (head-sampled out, then errored) is exported with the bit
455
+ * CLEAR, and saying otherwise misreports the trace's verdict.
456
+ */
457
+ sampled?: boolean;
445
458
  /** Shard key for single-shard calls; absent for the unnamed root DO. */
446
459
  shardKey?: string;
447
460
  /** This span's own id (16-hex). */
@@ -813,11 +826,12 @@ interface DatabaseTelemetryDeps {
813
826
  * increments numbers on it; the shard reads it ONCE at the dispatch boundary
814
827
  * and formats it with {@link formatTally}.
815
828
  *
816
- * Two properties fall out of that split. Per-call cost stays at a few integer
817
- * increments — no object allocation, no lookup — which matters because this is
818
- * on the path of every query. And because nothing is written through the
819
- * dispatch's `SpanHandle`, the wide-event collector is never materialized, so
820
- * a handler that instrumented nothing still doesn't trip the root-span gate.
829
+ * Per-call cost stays at a few integer increments — no object allocation, no
830
+ * lookup — which matters because this is on the path of every query. Nothing
831
+ * is written through the dispatch's `SpanHandle` either, so the wide-event
832
+ * collector is never materialized by instrumentation alone: a dispatch that
833
+ * ran queries gets a root span carrying these counters, but no `lunora.dispatch`
834
+ * log record unless the handler actually opened `ctx.span`.
821
835
  */
822
836
  tally: DatabaseTally;
823
837
  /** Read lazily — the acting user is resolved per span. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/observability",
3
- "version": "1.0.0-alpha.85",
3
+ "version": "1.0.0-alpha.86",
4
4
  "description": "Host-neutral telemetry storage and read models for Lunora, backing the Studio's Logs, Traces, Metrics and Issues views",
5
5
  "keywords": [
6
6
  "lunora",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@lunora/errors": "1.0.0-alpha.39",
47
47
  "@lunora/fingerprint": "1.0.0-alpha.9",
48
- "@lunora/shard-engine": "1.0.0-alpha.76",
48
+ "@lunora/shard-engine": "1.0.0-alpha.77",
49
49
  "@visulima/redact": "5.0.0"
50
50
  },
51
51
  "engines": {