AnthropicBedrock client from the anthropic package. Calls made through boto3 (invoke_model, converse) and all Bedrock calls from Node.js are not auto-instrumented — use manual capture, the HTTP API, or OpenTelemetry for those paths.
Support matrix
Python: AnthropicBedrock client
Prerequisites
- Python 3.10 or later
- The
moda-aiandanthropicpackages - AWS credentials with Bedrock model access (environment variables, shared credentials file, or an IAM role)
- A Moda API key, created at Settings → Ingestion keys (see Authentication)
1
Install the packages
2
Initialize Moda before creating the client
moda.init() is synchronous. Call it before you construct the AnthropicBedrock client.app.py
client.messages.stream(...) and async clients are captured the same way.3
Verify in the dashboard
Open Conversations in the dashboard. Within minutes you should see a conversation with ID
session_8f2a containing the user message and the assistant response, with the model name and token counts attached.boto3 and Node.js
The Moda SDKs do not auto-instrumentboto3 or any Node.js Bedrock client. Pick one of the following.
Node.js: manual capture with Moda.withLLMCall
If you already use the Moda SDK for Node.js, wrap the Bedrock call and report the request and response yourself:
app.ts
withLLMCall reference.
Any language: HTTP API
Make the Bedrock call as usual, then post the messages toPOST /v1/ingest:
OpenTelemetry
If your service already exports OpenTelemetry spans, point them at Moda’s OTLP endpoint and add GenAI attributes to your Bedrock spans — see OpenTelemetry.In Python,
moda.init() also activates the opentelemetry-instrumentation-bedrock package for boto3 when both are installed. That package is third-party and is not bundled with moda-ai; install it separately if you want to try this path.Troubleshooting
Next steps
- Moda SDK for Python — init options, context APIs, and flush semantics.
- HTTP API — full event schema, limits, and error envelope.
- OpenTelemetry — send OTLP spans from an existing tracing setup.
- Anthropic — auto-instrumentation for the Anthropic API outside Bedrock.