Strands Agents — Jaeger Tracing Example
Send traces from a Strands agent to a local Jaeger instance and visualize them in the Jaeger UI.
Content
Strands Agents — Jaeger Tracing Example
Send traces from a Strands agent to a local Jaeger instance and visualize them in the Jaeger UI.
Architecture
flowchart LR
A["Strands Agent<br/>(your code)"] -- OTLP --> B["OTel Collector<br/>(batch + export)<br/>localhost:4318"]
B -- OTLP --> C["Jaeger<br/>(traces)<br/>localhost:16686"]
The agent exports spans over OTLP HTTP to an OpenTelemetry Collector, which batches and forwards them to Jaeger. Both the collector and Jaeger run locally via Docker Compose.
Prerequisites
- Docker (or Finch)
- Node.js 22+
- AWS credentials configured (for Bedrock model access)
Quick Start
- Start Jaeger and the OTel Collector:
docker compose up -d
(Or finch compose up -d if using Finch.)
- Install dependencies:
npm install
- Run the example:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 npm start
- Open the Jaeger UI at http://localhost:16686. Select
strands-agentsfrom the service dropdown and click Find Traces.
You'll see the full trace hierarchy — agent invocation, loop cycles, model calls, and tool executions nested under each agent span.
- Tear down when done:
docker compose downSource and license
- Source
- AWS Strands Agents
- Original
- strands-agents/sdk-python/strands-ts/examples/telemetry
- License
- Apache-2.0