Skip to main content

Installation

Quick Start

What Gets Traced

The Bedrock integration automatically captures:
  • Converse API — input messages, output text, model ID, token usage (inputTokens/outputTokens), stop reason, cached token counts
  • InvokeModel API — raw request/response, model ID, token usage (supports Claude, Titan, and Llama response formats), stop reason, cached tokens (Claude)
  • Errors — captured with error status on the span, re-thrown to caller

Captured Properties

Configuration

Projects

Route events to a specific project by passing its slug as projectId (project_id in Python):
This sets the X-Raindrop-Project-Id header on every event. Omit it (or pass "default") to use your org’s default Production project, which is the existing behavior. Single-project orgs need nothing new.

Multiple projects in one process

Available in raindrop-ai>=0.0.56. When one service wraps several Bedrock clients that should report to different projects, create one RaindropBedrock wrapper per project. Each wrapper owns its own raindrop.Raindrop client, so the two route independently — there is no shared module-level state:
Each wrapper owns its configuration and delivery pipeline, so clients handled by different wrappers route independently. To share a single client across wrappers (or with the module-level API), construct a raindrop.Raindrop yourself and pass it via client=:

Using InvokeModel

The wrapper also supports the legacy InvokeModel API. Token usage extraction works with Claude, Titan, and Llama response formats:

Identifying Users

Associate a user with optional traits:

Tracking Signals

Track feedback, edits, or custom signals:

Flushing and Shutdown

Always call flush() before your process exits to ensure all telemetry is shipped: