Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(eve): keep local traces public (#3361)

Chad Hietala56cde32ca3f3
diff --git a/.changeset/local-traces-public.md b/.changeset/local-traces-public.md
new file mode 100644
index 000000000..5eee7be77
--- /dev/null
+++ b/.changeset/local-traces-public.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Include conversations classified as private in local `eve dev` traces, including sessions authenticated with the developer's Vercel OIDC token.
diff --git a/packages/eve/src/tracing/local-instrumentation-runtime.ts b/packages/eve/src/tracing/local-instrumentation-runtime.ts
index 104ba2ac6..d394cafa2 100644
--- a/packages/eve/src/tracing/local-instrumentation-runtime.ts
+++ b/packages/eve/src/tracing/local-instrumentation-runtime.ts
@@ -11,8 +11,8 @@ import {
type TraceCapturePolicy,
} from "#tracing/otel-declaration.js";
-/** Zero-config local tracing keeps public and unclassified sessions observable. @internal */
-export const localTracePolicy: TraceCapturePolicy = ({ audience }) => audience !== "private";
+/** Zero-config local tracing admits every session in the development worker. @internal */
+export const localTracePolicy: TraceCapturePolicy = () => true;
/** Installs the zero-config local OTel runtime once in an `eve dev` worker. */
export function installLocalInstrumentationRuntime(input: {
diff --git a/packages/eve/src/tracing/local-traces.test.ts b/packages/eve/src/tracing/local-traces.test.ts
index 3d5426e6f..45026351b 100644
--- a/packages/eve/src/tracing/local-traces.test.ts
+++ b/packages/eve/src/tracing/local-traces.test.ts
@@ -1,7 +1,9 @@
import { afterEach, describe, expect, it, vi } from "vitest";
+import { defaultEveAudience } from "#eve-channel/audience.js";
import { createLocalTracesProcessor, resolveLocalTracesContent } from "#tracing/local-traces.js";
import { localTracePolicy } from "#tracing/local-instrumentation-runtime.js";
+import { resolveTracePolicy } from "#tracing/sampled-trace.js";
import { localTraces } from "#public/instrumentation/otel.js";
vi.mock("#tracing/local-trace-span-processor.js", () => ({
@@ -34,9 +36,9 @@ const traceContext = (audience: "public" | "private" | "unknown") => ({
agentName: "weather",
audience,
channel: { kind: "http" as const },
- environment: "production" as const,
+ environment: "development" as const,
mode: "conversation" as const,
- principalType: "anonymous",
+ principalType: "user",
});
afterEach(() => {
@@ -109,11 +111,23 @@ describe("resolveLocalTracesContent", () => {
});
describe("localTracePolicy", () => {
- it.each([
- ["public", true],
- ["unknown", true],
- ["private", false],
- ] as const)("accepts the %s audience: %s", (audience, accepted) => {
- expect(localTracePolicy(traceContext(audience))).toBe(accepted);
+ it("records an authenticated development session classified as private", () => {
+ const audience = defaultEveAudience({
+ auth: {
+ attributes: {},
+ authenticator: "vercel-oidc",
+ principalType: "user",
+ },
+ channel: { kind: "http" },
+ environment: "development",
+ mode: "conversation",
+ });
+
+ expect(audience).toBe("private");
+ expect(resolveTracePolicy(localTracePolicy, traceContext(audience))).toEqual({
+ action: "record",
+ recordInputs: true,
+ recordOutputs: true,
+ });
});
});
diff --git a/research/channel-audience-content-policy.md b/research/channel-audience-content-policy.md
index 942ac0297..c91e8e562 100644
--- a/research/channel-audience-content-policy.md
+++ b/research/channel-audience-content-policy.md
@@ -1,7 +1,7 @@
---
issue: https://github.com/vercel/eve/issues/2331
status: implemented
-last_updated: "2026-09-13"
+last_updated: "2026-09-15"
---
# Audience-aware trace content policy
@@ -187,14 +187,12 @@ policy remains subject to its process-wide audience ceiling.
The default policy for local tracing for `eve dev` is equivalent to:
```ts
-({ audience }) =>
- audience === "private"
- ? { emit: false }
- : { emit: true, recordInputs: true, recordOutputs: true },
+() => true,
```
-This keeps unclassified local HTTP/TUI sessions observable while still rejecting channels classified as `private`.
-Because local tracing runs in development, every emitted trace uses the development content default.
+This admits conversations classified as `private` to the local spool without changing
+the persisted conversation audience or forwarded origin audience. Because local
+tracing runs in development, every emitted trace uses the development content default.
The runtime order is: