Skip to content

Content-free traces

Time: 5–8 minutes

Flue’s Cloudflare tracing includes prompts, responses, instructions, tool arguments, and results by default. Keep the execution shape while turning that content capture off.

Update src/app.ts to install content-free tracing before creating the route map. The diff starts from completed checkpoint 6; Complete file includes the existing chat UI, ping endpoint, and agent route:

src/app.ts+4−0

Changes from Checkpoint 6 (guide) → Content-free traces bonus

src/app.ts
===================================================================
--- a/src/app.ts Checkpoint 6 (guide)
+++ b/src/app.ts Content-free traces bonus
@@ -1,8 +1,12 @@
import { Hono } from 'hono';
import { createAgentRouter } from '@flue/runtime/routing';
+import { instrument } from '@flue/runtime';
+import { createCloudflareTracing } from '@flue/runtime/cloudflare';
import { FieldTrip } from './agents/field-trip.ts';
import chatUi from './ui/index.html?raw';
+instrument(createCloudflareTracing({ content: false }));
+
// src/app.ts is the Flue route map. Its default export owns every HTTP request
// the Worker receives. Agents get mounted here with createAgentRouter(...)
// starting in checkpoint 1.

This explicit instrumentation replaces Flue’s built-in tracing install. The existing wrangler.jsonc already enables Workers Traces.

Terminal window
npm run typecheck
npm run deploy
sleep 5
npm run smoke -- https://field-trip-agent.<subdomain>.workers.dev private-trace \
"Plan a Lisbon offsite from <START> to <END> for 8 people. What's the weather?"

Use the exact deployed URL and the workshop dates. After ingestion, open the newest trace in Workers & Pages → field-trip-agent → Observability → Traces.

Save your workers.dev subdomain to open this test ↗https://field-trip-agent.<subdomain>.workers.dev/?id=private-trace

This opens the same conversation as the smoke test. If you repeat this checkpoint, before copying its commands.

Verification gate

Prove it works

  • invoke_agent, chat, and execute_tool spans remain.
  • Timing, status, model identity, and token usage remain.
  • Messages, system instructions, tool arguments, and tool results are absent.

Remove both imports and instrument(...), then redeploy. Existing traces retain the policy used when they were recorded; only new traces change.

Reference: Flue Cloudflare tracing.