Bedrock OpenTelemetry Integration
Overview
This integration provides support for using OpenTelemetry with the Bedrock framework. It enables tracing and monitoring of applications built with Bedrock.
Installation
- Install traceAI Bedrock
pip install traceAI-bedrock
- Install boto3
pip install boto3
Set Environment Variables
Set up your environment variables to authenticate with FutureAGI.
import os
os.environ["AWS_ACCESS_KEY_ID"] = AWS_ACCESS_KEY_ID
os.environ["AWS_SECRET_ACCESS_KEY"] = AWS_SECRET_ACCESS_KEY
os.environ["FI_API_KEY"] = FI_API_KEY
os.environ["FI_SECRET_KEY"] = FI_SECRET_KEY
Quickstart
Register Tracer Provider
Set up the trace provider to establish the observability pipeline. The trace provider:
from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType
trace_provider = register(
project_type=ProjectType.OBSERVE,
project_name="bedrock_app"
)
Configure Bedrock Instrumentation
Instrument the Bedrock client to enable telemetry collection. This step ensures that all interactions with the Bedrock SDK are tracked and monitored.
from traceai_bedrock import BedrockInstrumentor
BedrockInstrumentor().instrument(tracer_provider=trace_provider)
Create Bedrock Components
Set up your Bedrock client with built-in observability.
def converse_with_claude():
system_prompt = [{"text": "You are an expert at creating music playlists"}]
messages = [
{
"role": "user",
"content": [{"text": "Hello, how are you?"}, {"text": "What's your name?"}],
}
]
inference_config = {"maxTokens": 1024, "temperature": 0.0}
try:
response = client.converse(
modelId="model_id",
system=system_prompt,
messages=messages,
inferenceConfig=inference_config,
)
out = response["output"]["message"]
messages.append(out)
print(out)
except Exception as e:
print(f"Error: {str(e)}")
if __name__ == "__main__":
converse_with_claude()
Metadata
Release files for traceAI-bedrock 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| traceai_bedrock-0.1.13.tar.gz | 40.2 kB | With provenance | Details for traceai_bedrock-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traceai_bedrock-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for traceai_bedrock-0.1.13-py3-none-any.whl |
Total release size: 89.4 kB
Release files / traceai_bedrock-0.1.13.tar.gz
| Download URL | traceai_bedrock-0.1.13.tar.gz |
|---|---|
| Size | 40.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79ae8fbf3dde0ee2a66497689bbd67af07bf7ae737d73fe53772c71184e8aae4
|
|
BLAKE2b-256 checksum How to use checksums |
a21305a44b65cae89030159c9bac93b0f6f6722c5122b6540949f6e62a0d6616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / traceai_bedrock-0.1.13-py3-none-any.whl
| Download URL | traceai_bedrock-0.1.13-py3-none-any.whl |
|---|---|
| Size | 49.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
264defa5c39cc4c55f8d96f1a75f986c3e2d609f04a6cc7cdb577ce4e8d04a1b
|
|
BLAKE2b-256 checksum How to use checksums |
e3998f2fc42c0dbad741b133c67eb23b0025036e880903a96d77e4414eb5ebc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for traceAI-bedrock 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for traceai_bedrock-0.1.13.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.