AWS Builder Center
Tracing a Full Agentic App in the Omni IDE with AWS Emulator

Tracing a Full Agentic App in the Omni IDE with AWS Emulator

I ran an agent's whole serverless backend in AWS Emulator and traced every hop in Omni Studios. Lessons and screenshots.

I made CloudWatch Omni IDE Extension trace a whole serverless app on my laptop, and I can't stop playing with AWS Emulator... seriously.... I stayed up waaaaaaaaaaay tooo late with this.. lol.
I'll start with a confession: I really like  CloudWatch Omni  and the  Amazon CloudWatch Omni IDE extension . When I build agents, I want a tight loop. Change a prompt, run the agent, see every LLM call and tool call, fix what's wrong, repeat. Omni IDE extension gives me exactly that inside VS Code, against a local dev server, with no deploy step in the middle. It has quietly become my favorite way to develop agents locally.
I also know what Omni IDE extension is built for. It's an agent development tool. It understands LLM spans, tool spans and agent spans, it counts tokens, and it lets me replay a model call in its playground. It is not designed for full application observability yet. It doesn't pretend to be a service map or a dashboard for your whole backend.
But hey. AWS Emulator just launched, my agent's tools are fake, and I had an evening. So I tried something a little crazy: what if the agent's whole backend ran locally in AWS Emulator, and every hop of it showed up in CloudWatch Omni IDE Extension next to the agent's own spans?
Spoiler: it works, it's ridiculous in the best way, and I already have a list of things I want to try next.

The over-architected plan

I started from Omni's sample agent, a LangGraph customer support system for a fictional retailer called AnyCompany. A router classifies each request and hands it to a product, account, return or general sub-agent. Out of the box, the tools return mock data, and one of them searches the public web.
I wanted every tool to call real AWS APIs, with only the Claude Sonnet 4.6 calls on Amazon Bedrock leaving my machine. So I replaced the mocks one by one, and then I kept going, because why stop at a database when you can have a saga:
Architecture Drawing for this solution

Is a Step Functions saga with five Lambda functions, a dead-letter queue and an SNS fan-out the right design for "return my headphones"? Absolutely not. Is it a great way to find out whether one trace can hold all of it? Absolutely yes.
I also swapped the template's public MCP endpoint for a small order-tracking MCP server on 127.0.0.1, so even the MCP calls stay local, and I kept them in the trace because I wanted to see them.

First, how does Omni even get its traces?

Before writing code, I wanted to know where the data lands. It turns out to be wonderfully simple. Omni IDE Extension runs a small OTLP receiver inside the extension and appends every request it gets to a file in my project,  .omni/traces.jsonl . Trace Explorer reads that file. There's no database and no cloud backend in the loop.
The one catch: Omni sets the exporter environment (the OTLP endpoint plus  session.id  and  omni.workspace.path ) only for the dev server process it starts. Anything else running on my machine doesn't know where to send telemetry, or sends it without the session ID, and Omni never shows it.
So I made Omni's start command a launcher script. When I press Start, the script brings up the emulator if it isn't running, provisions it when the resources are missing, and then starts the MCP server, a telemetry bridge, the demo UI and the agent as its children. They all inherit Omni's settings. One button, everything wired.

The crazy part: getting Lambda telemetry out of the emulator

I you read my previous article  AWS Emulator Deep Dive: A Fully Observable Serverless App Locally  than this isn't news.
The agent and the MCP server use ADOT zero-code instrumentation, so their LangGraph, Bedrock, MCP and boto3 spans came for free. The UI makes its own spans with the OpenTelemetry Node SDK and passes a  traceparent  header to the agent, so one click in the UI becomes one trace.
The Lambda functions were the fun puzzle. AWS Emulator runs Python handlers on RustPython inside its own process, and a function can only talk to the emulator. It can't send OTLP anywhere. So each function writes its spans and logs as JSON lines to stdout with a tiny tracer I wrote, and those lines land in the emulator's CloudWatch Logs. A bridge process polls three things in the emulator every 1.5 seconds and forwards them to Omni as real OTLP, keeping the original trace and span IDs:
  • CloudWatch Logs, for the functions' own span and log records
  • X-Ray, for the Lambda segments the emulator records
  • Step Functions execution history, for one span per execution and one per state
The agent's  process_return  tool puts its  traceparent  into the execution input. Each task state passes a carrier that names the execution and the state, and the bridge and the Lambda tracer compute that state's span ID with the same hash. That's how a refund Lambda ends up nested under the  IssueRefund  state, which is nested under the agent's tool call.

The user journey

Here's the demo UI. I pick a scenario, the agent works for about 15 seconds, and the answer comes back with a trace card that reads the same file Omni does.
The demo UI with the scenario buttons and the trace card

I ran four chats: one happy return and three faults. Omni's Trace Explorer shows exactly one trace per chat, with the customer's question as the input and the agent's reply as the output.
Trace Explorer with one trace per chat turn


Order 999: the happy path

"I want to return order 999, the headphones don't fit well." The agent reads the return policy, a verifier sub-agent checks the order in DynamoDB, and then the agent hands off to the saga. That single trace holds 70 spans from 10 services, from the UI click all the way to the customer notification written to S3.
Also... please forgive my long screenshots that trail off the right side of the window. I only scrolled the Timeline view so you only see partially what Omni would show you on the right.
The order 999 trace from the UI click to the customer notification

The gear icons are Omni being honest with me. It recognizes agent spans, and everything from the emulator shows up as unclassified. I love that the timeline still lays the whole thing out.

Order 555: the refund gets declined

This order was paid with the card my fake payment gateway always declines. The refund Lambda's gateway call fails, the saga compensates by marking the return failed and emitting a  ReturnFailed  event, and the customer still gets notified. The agent then explains the failure in plain language.
The refund-declined trace, with the root cause and the compensation path


Order 333: the agent says yes, the backend says no

This is my favorite one. The return goes through, the label is created, and the agent tells the customer everything is "fully processed and approved." Then the carrier pickup fails three times, about 6 seconds apart, and SQS moves the message to the dead-letter queue. Those failures land at +19 and +25 seconds, after the agent already answered at 15.8 seconds.
That gap between what the agent said and what actually happened is exactly the kind of thing I want to catch while I'm still developing.
The carrier-failure trace: the agent says approved, the pickups fail afterwards


The Graph view

The Graph view is where Omni's agent focus is easiest to see. It draws the agent's flow beautifully, with the entry point, the agent, its LLM calls and its tools, and it folds the entire backend into the single  return_saga.run  node. For agent development that's the right call. For this experiment, the Timeline view is where the backend lives.
Graph view: the agent's flow, with the backend folded into one node


What I learned the hard way

Omni shows nothing until something happens. My first reaction to an empty Trace Explorer was "it's broken." It wasn't. Nothing had called the agent yet. One request later, the traces were there.
Omni only sees what it starts. A process launched from another terminal sends nothing, or sends it without the session ID. Running everything as a child of Omni's start command fixed it.
One endpoint variable is too blunt. Setting  AWS_ENDPOINT_URL  would have sent my Bedrock calls to the emulator too. I gave every emulator client its own endpoint, CA certificate and the emulator's generated keys instead, and removed the environment credentials from that client session so my real credentials never sign an emulator request.
A warm Lambda re-sent its old spans. At one point my return trace had 102 spans instead of 70. A warm function keeps writing to the same log stream, and the emulator returned that stream's older events along with the new ones. My bridge forgot what it had already sent after two minutes and sent those spans again. My headless test runs were too short to hit it; real use a few minutes apart did. The fix filters events by time, remembers them for 30 minutes, and refuses to send the same span twice.
Omni shows attributes, not status messages. The error text was in every failed span, in the OTLP status message and the exception event, but Omni's span details didn't display either. Now every error span also carries  error.type  and  error.message  attributes, and the X-Ray segments borrow the handler's error, since the emulator only records "fault" for them.
70 spans is not a bug. I asked myself that too. It breaks down cleanly: about 30 spans on the agent side (6 Bedrock calls recorded twice each by ADOT, tool calls, the MCP handshake, the UI and agent entry spans) and 40 on the backend (the saga, its states, five Lambda invocations with two X-Ray segments each, their API calls and the EventBridge hop). Every scenario matched its expected count exactly.
Python Lambdas mostly just work.  boto3  is available inside RustPython and its calls go to the emulator. There's no  _ssl  module, and each invocation spends about 400 ms starting the interpreter, which you can see right in the X-Ray spans.
Step Functions history needs a little interpreting. The emulator stamps every history event with the execution's start time, runs the execution inside  StartExecution , and can report a stop time before the last Lambda finishes. The bridge lays the states out from the Lambda timings in X-Ray and labels those spans  aws.step_functions.timing=derived .
The emulator holds me to real AWS rules. Provisioning failed until each queue's visibility timeout was at least its consumer function's timeout, which is how AWS behaves too.  CreateQueue  on an existing queue with different attributes fails, so my script looks the queue up first.
My cloud desktop isn't my laptop. The demo UI runs on my developer desktop on 127.0.0.1. VS Code's Ports panel forwards it to my Mac over the existing SSH session, so nothing listens on the network.

Where I want to take this next

I'm honestly having a blast, and this feels like the start of something. Here's what's on my list:
  • Evaluate the "agent said yes, backend said no" case. Omni IDE Extension has evaluators and datasets. I want an evaluator that reads the backend spans and flags any trace where the agent promised success but a Lambda failed afterwards.
  • More fault scenarios. Throttled DynamoDB writes, a poison message in the notifier queue, a slow Step Functions task with retries. The emulator makes breaking things cheap, and I want to see how each one reads in Omni.
  • Compare local and cloud. I'd like to deploy the same agent to Amazon Bedrock AgentCore with CloudWatch, and put the cloud traces next to the local ones to see what lines up and what doesn't.
  • Trim the noise. I could drop a few layering spans (an X-Ray segment per invocation, the MCP tool listing on every request) to get the return trace closer to 60 spans without losing the story.
  • Try other agent frameworks. I'd love to see how a Strands version of the same agent looks in Omni with the same backend.

Conclusion

AWS Emulator turned an agent with fake tools into one that exercises a real serverless backend, and it did it on my laptop with nothing deployed. Omni IDE Extension, a tool built for agent development, ended up showing me the full request path from a UI click to a dead-letter queue, because all it needed was OTLP in the right file with the right session ID. It isn't a full application observability tool, and it doesn't need to be for this to be useful. Seeing the agent's reasoning and the backend's reality in one timeline changed how I think about testing agents.
If you want to try something similar:
  1. Run your agent's backend in AWS Emulator and point only the backend clients at it.
  1. Make Omni's start command launch every process that produces telemetry, so they all share its session.
  1. Bridge anything that can't export on its own, and break a few things on purpose to see how they look.
I'm going to keep breaking things. I'll report back.
These are my own views and do not represent my employer.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article