---
title: Send Amazon Bedrock AgentCore traces to Agent Analytics
description: "Add an OTLP/HTTP exporter beside CloudWatch so an AgentCore agent reaches Agent Analytics, and scrub content before it leaves your infrastructure."
product: general
lang: en
last_updated: 2026-10-28
token_estimate: 1363
---
# Send Amazon Bedrock AgentCore traces to Agent Analytics

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

AgentCore is the host. The agent framework already emits the spans. Add an OTLP/HTTP exporter beside CloudWatch and follow the framework guide that matches the agent. You don't need the Amplitude AI SDK in the agent process.

This page has no separate capture. Strands on AgentCore is [AWS Strands](https://amplitude.com/docs/amplitude-ai/agent-analytics/integrations/strands). Other agents follow [Google ADK](https://amplitude.com/docs/amplitude-ai/agent-analytics/integrations/google-adk), [Pydantic AI](https://amplitude.com/docs/amplitude-ai/agent-analytics/integrations/pydantic-ai), [Microsoft Agent Framework](https://amplitude.com/docs/amplitude-ai/agent-analytics/integrations/microsoft-agent-framework), or [OpenInference](https://amplitude.com/docs/amplitude-ai/agent-analytics/integrations/openinference). Amplitude stores the spans you export. Scrub personal data before it leaves your infrastructure. Refer to [Agent Analytics privacy modes](https://amplitude.com/docs/amplitude-ai/agent-analytics/privacy-modes).

## Set up with your AI coding agent (recommended)

Paste this prompt into your AI coding agent, such as Cursor, Claude Code, Windsurf, GitHub Copilot, or Codex.

```text
Connect this Amazon Bedrock AgentCore agent to Amplitude Agent Analytics with native OpenTelemetry.

Fetch https://raw.githubusercontent.com/amplitude/Amplitude-AI-Node/main/docs/integrations/amazon-bedrock-agentcore.md
and follow "Part 2: Coding agent procedure".
If @amplitude/ai is installed, the same file is under node_modules/@amplitude/ai/docs/integrations/.
Also follow https://raw.githubusercontent.com/amplitude/Amplitude-AI-Node/main/docs/integrations/privacy.md
and scrub content before export.
Follow links in the guide. If your source isn't listed, start at https://raw.githubusercontent.com/amplitude/Amplitude-AI-Node/main/docs/integrations/README.md
```

Review the changes, then verify with the steps in [Get started](#get-started).

## What this means for you

- **You run**: The agent AgentCore is already running, with a second OTLP/HTTP exporter beside CloudWatch.
- **You need**: The framework guide for that agent, your Amplitude project API key, and a stable conversation id and product-analytics user ID on every turn.
- **Protocol**: OTLP over HTTP. Amplitude accepts protobuf and JSON. Amplitude doesn't accept gRPC.
- **Privacy**: Amplitude doesn't scrub content after receipt. Mask or drop content attributes before export.

## Export

Keep the CloudWatch exporter. Add these variables. Encode the space in the header value as `%20` when the value is in an environment variable. Leave `Authorization=` as written.

```bash
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.amplitude.com/otlp/v1/traces
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer%20<project API key>"
OTEL_SERVICE_NAME=order-support
```

EU data residency uses `https://api.eu.amplitude.com/otlp/v1/traces`.

AgentCore already accepts OpenInference, OpenLLMetry, OpenLIT, and Traceloop attributes. Amplitude already maps those.

## Identity

The framework guide sets the conversation, the product user, and the agent. AgentCore doesn't add those.

| Attribute | Value |
| --- | --- |
| `gen_ai.conversation.id` or `session.id` | The conversation, thread, or ticket ID. Use the same value on every turn. |
| `user.id` | The user ID product analytics already uses. Amplitude stores a missing user as `unknown`. |
| `gen_ai.agent.id` | A stable name for this agent. Amplitude doesn't read `gen_ai.agent.name`. |

## What carries over

The events are the events of the framework on the runtime. A model span with operation `chat` becomes an `[Agent] AI Response` plus an `[Agent] User Message` for each new user message. `execute_tool` becomes an `[Agent] Tool Call`.

## Session close

`[Agent] Session End` is optional and recommended. An AgentCore export doesn't send it. Amplitude closes the session after 30 minutes without a qualifying agent event by default, and 24 hours from the session start when no per-session override is set. The first close is the one that counts. Enrichment, including the Session Record and content-based signals, runs once after that close. The OpenTelemetry translator doesn't read an idle-timeout attribute from a span. Refer to [How sessions close](https://amplitude.com/docs/amplitude-ai/agent-analytics/sessions#how-sessions-close).

## Get started

Follow the [Amazon Bedrock AgentCore integration guide](https://github.com/amplitude/Amplitude-AI-Node/blob/main/docs/integrations/amazon-bedrock-agentcore.md), then the framework guide for the agent. Send two turns with the same session id, then confirm in Live Events:

1. Session ID is the conversation id, not a trace ID.
2. User ID is the product-analytics user, not `unknown`.
3. Agent ID is `gen_ai.agent.id`.
4. The turn shows User Message text, the tool call, and AI Response text, with the model name and both token counts.
5. The second turn doesn't duplicate the first user message.

Guide last verified on October 27, 2026, as a hosting page with no separate capture. Amazon Bedrock and AgentCore are trademarks of their owner. Amplitude isn't affiliated with or endorsed by that owner.

