Which Agent Steps Can Your Trace Actually Prove?
Join Amazon Bedrock AgentCore spans and Cloudflare Workers Logs to an independent staging ledger. Measure which completed steps have trace evidence, then calculate how many reruns your sampling rate warrants.
Measure coverage against an independent ledger
Create a staging route with a fixed task that calls a model, invokes a tool twice, and returns a result. At each wrapper boundary, record the operation and attempt number in a test ledger with a synthetic case ID. Keep the ledger independent of the telemetry export. AgentCore exposes harness timings in CloudWatch, so map the exported spans back to those attempt identifiers. One span for a tool called twice is only half the expected tool evidence. Record the expected and observed attempt lists before investigating individual payloads. If the harness spans are absent across the run, verify CloudWatch Transaction Search and the harness execution role first. If only the second attempt is absent, you have a specific boundary to instrument and retest.
Observability and cost controls - Amazon Bedrock AgentCoreSeparate sampling from gaps inside captured runs
Use a synthetic request per run when checking Cloudflare Workers Logs, and keep its case ID in the ledger even when no invocation log appears. The documented head sampling setting applies to Worker requests. An edge log therefore answers whether the edge request was captured, while the harness export answers which agent attempts are visible. In an illustrative run at 20% sampling, finding zero edge logs in five independent requests has a 32.8% probability. At full sampling, an absent edge record calls for checking the selected Worker environment, query window, and case ID. Compare only completed runs after your chosen export wait. When edge records appear consistently but attempt coverage remains low, inspect the handoff between the Worker and harness for lost correlation IDs.
Workers Logs · Cloudflare Workers docsWrite the question the trace must answer
Pick a failure an operator has to diagnose, such as a report assembled from the wrong source record. Create a root span for the run, then record each model request, lookup, and tool attempt as a child span with its outcome and elapsed time. Record a safe identifier for the selected record and an application validation result. Amazon Bedrock AgentCore documents per-step timing and payload details for its harness invocations, so inspect the generated trace before adding duplicate instrumentation there.
Run a controlled fixture and hand the trace to someone who did not run it. Pass if they can name the first incorrect operation and distinguish it from a later step that merely consumed the bad result.
Observability and cost controls - Amazon Bedrock AgentCoreDistinguish a successful call from a correct result
For an illustrative run, ask a staging agent to summarize customer C-104's invoice. Have a test lookup return a valid invoice for C-140 while reporting transport success. Record a sanitized requested ID, returned ID, and a failed identity check. If a subsequent model call still drafts a summary, the trace should show that it inherited a mismatch from the lookup.
On AgentCore, the documented application log fields include request, trace, and span IDs. Use the trace and span IDs where present to join a log entry to its operation. The exercise fails if the operator can see the final summary but cannot find the lookup, or if the successful transport status hides the failed identity check.
AgentCore generated built-in tools observability data - Amazon Bedrock AgentCoreFind out where a trace went missing
If an agent enters through a Cloudflare Worker, check ingress logging before concluding that later spans disappeared. Cloudflare Workers Logs supports head-based sampling of request logs. In a staging environment with Workers Logs enabled, set the documented head sampling rate to 1, redeploy, and send a fixture with a unique run ID that your application records at ingress and forwards to the agent.
Look for that ID in the Worker log and then in your trace backend. If ingress appears and the root span is absent, inspect the handoff and exporter. If the root appears but its tool spans sit under a different trace, inspect how you pass trace context across the worker boundary. Restore your intended sampling setting after the test.
Workers Logs · Cloudflare Workers docsDecide which field names and values to keep
OpenTelemetry's former GenAI conventions page points to a separate repository for the conventions. If multiple agent services feed a shared backend, record the convention version each service uses and choose a small set of fields your queries require. Export a fixture from each service and test that one query can find the operation, its duration, and its outcome in both traces.
Payload detail adds diagnostic value and creates more data to protect. Test your redaction with a fake secret and verify in the exported data that it is absent while the lookup mismatch remains visible. If redaction hides the evidence needed for diagnosis, add a safe outcome code or fixture identifier and rerun the test.
Moved: Generative AI semantic conventions | OpenTelemetry