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 asprojectId (project_id in Python):
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 inraindrop-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:
raindrop.Raindrop yourself and
pass it via client=:
Using InvokeModel
The wrapper also supports the legacyInvokeModel 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 callflush() before your process exits to ensure all telemetry is shipped: