maple-agent-tracing-ag…
Trace Agno agents with Maple: installs the OpenInference Agno instrumentor with an OTLP exporter and GenAI attributes, and sets…
Trace Strands Agents (AWS, Python or TypeScript) with Maple: export Strands' built-in OpenTelemetry spans with messages on span attributes, a session id per conversation and per-call token counts, so each conversation is one Maple Agent Session with transcript, tool calls,
Claude Code
$ npx -y skills add mapletechlabs/maple --skill maple-agent-tracing-strands --agent claude-code
Codex
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a codex -y
Cursor
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a cursor -y
Gemini CLI
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a gemini-cli -y
GitHub Copilot
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a github-copilot -y
OpenCode
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a opencode -y
Windsurf
$ npx skills add mapletechlabs/maple --skill maple-agent-tracing-strands -a windsurf -y
name: maple-agent-tracing-strands description: "Trace Strands Agents (AWS, Python or TypeScript) with Maple: export Strands' built-in OpenTelemetry spans with messages on span attributes, a session id per conversation and per-call token counts, so each conversation is one Maple Agent Session with transcript, tool calls, sub-agent lanes and tokens. Triggers on 'trace my strands agent', 'add Maple to strands', 'agent sessions for strands', 'OpenTelemetry for strands agents'."
Goal: every conversation = one Maple Agent Session. Each `agent(...)` / `invoke_async` / `stream_async` call = one turn (one trace) with transcript, `chat` spans with tokens, `execute_tool` spans with args/results, failed tools marked failed, sub-agents in their own lanes.
Mechanism: Strands' native OTel tracer (scope `strands.telemetry.tracer`, `gen_ai.provider.name=strands-agents`). No extra instrumentation package. Maple reads `session.id` (then `gen_ai.conversation.id`) as the session key, and reads span ATTRIBUTES only (never span events).
1. Language and version.
2. Existing OTel setup. Search for `StrandsTelemetry(`, `TracerProvider(`, `set_tracer_provider`, `opentelemetry-instrument`, `aws-opentelemetry-distro`, `logfire.configure`, `sentry_sdk.init`, `setupTracer(`, `NodeSDK(`, `NodeTracerProvider(`.
3. Find: every `Agent(` construction (and whether it is module-level/shared), every place the agent is invoked, where the chat/thread/conversation id lives in the request, every `session_manager=`, every `.as_tool(`, `Swarm(`, `GraphBuilder(` / `Graph(`. 4. Other instrumentors on the same model calls (OpenLIT, OpenLLMetry `Traceloop.init`, OpenInference, `opentelemetry-instrumentation-openai*`, botocore/Bedrock GenAI instrumentation) → they double-trace model calls. Keep Strands' spans; ask before removing the others if they serve something else.
Python. Add with the repo's package manager, keeping existing extras (`openai`, `anthropic`, `litellm`, ...):
pip install 'strands-agents[otel]>=1.57'
Env vars. Put them where the repo keeps env (shell/.env/container). `OTEL_SEMCONV_STABILITY_OPT_IN` MUST be in the process environment before the first `Agent(` is constructed (Strands reads it once, into a singleton). Setting it via `os.environ` is only acceptable at the very top of the entry point, before any strands import.
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.maple.dev OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <key>" OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf OTEL_SERVICE_NAME=<service name> OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=<env> OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental,gen_ai_span_attributes_only
Init once, imported from the entry point before any agent runs (skip if Step 0 found an existing provider):
# telemetry.py from strands.telemetry import StrandsTelemetry telemetry = StrandsTelemetry().setup_otlp_exporter()
TypeScript. OTel packages are optional peers; install them:
npm install @strands-agents/sdk @opentelemetry/api @opentelemetry/sdk-trace-base @opentelemetry/sdk-trace-node @opentelemetry/resources @opentelemetry/exporter-trace-otlp-http @opentelemetry/sdk-metrics @opentelemetry/exporter-metrics-otlp-http
Same env vars.
import { setupTracer } from "@strands-agents/sdk/telemetry"
export const provider = setupTracer({ exporters: { otlp: true } }) // before the first Agent; reads OTEL_EXPORTER_OTLP_*Python: pass the conversation id as `session.id` in `trace_attributes` on the agent that handles the turn.
agent =
Trace Agno agents with Maple: installs the OpenInference Agno instrumentor with an OTLP exporter and GenAI attributes, and sets…
Trace Claude Agent SDK agents (TypeScript and Python) and Claude Code CLI sessions with Maple: configure Claude Code's built-in…
Trace Cloudflare Agents SDK agents (AIChatAgent, Agent on Durable Objects, npm `agents` / `@cloudflare/ai-chat`) with Maple:…
Trace CrewAI crews and flows with Maple: OpenInference CrewAI instrumentor plus the model-SDK instrumentor, GenAI dual-write, one…
Trace DSPy programs and ReAct agents with Maple: OpenInference DSPy instrumentor with GenAI dual-write, a DSPy callback for…
Trace eve agents (Vercel's eve framework, npm `eve`) with Maple: add one OpenTelemetry destination file under…
Kubeshark installation and deployment skill. Use this skill whenever the user wants to install Kubeshark, deploy Kubeshark to a…
Call the user on the phone for real-time voice conversations. Use this when you need input, want to report on completed work, or…