Skip to main content

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

  1. Install traceAI Bedrock
pip install traceAI-bedrock
  1. 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.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceAI-bedrock 0.1.11
File Size Uploaded Provenance Actions
traceai_bedrock-0.1.11.tar.gz 36.3 kB With provenance Details for traceai_bedrock-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceAI-bedrock 0.1.11
File Interpreter ABI Platform Actions
traceai_bedrock-0.1.11-py3-none-any.whl Python 3 none any Details for traceai_bedrock-0.1.11-py3-none-any.whl

Total release size: 79.9 kB

Release files / traceai_bedrock-0.1.11.tar.gz

Download URL traceai_bedrock-0.1.11.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
55f3bbab1e9cb21abe23342520bf516930f489497b4ad660f19b11b223c9316d
BLAKE2b-256 checksum
How to use checksums
e8d4a9cb7ed1c3af203dfb40dcc93dbf050d46bf5bdb5d66e68a7f91b57adde9
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 Oct 31, 2026.

Transparency log

Release files / traceai_bedrock-0.1.11-py3-none-any.whl

Download URL traceai_bedrock-0.1.11-py3-none-any.whl
Size 43.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17f91da9f8f98aa4a227d5d1f94ebccf4c0a7e9cf4ade0927c33d4b9e84c08a2
BLAKE2b-256 checksum
How to use checksums
b1b827267035f334bf5bfe067fd2a5cffa1de2b4802596789d0de9855e3f6d3d
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 Oct 31, 2026.

Transparency log

Security for traceAI-bedrock 0.1.11

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.

Select from 2 files

Attestation for traceai_bedrock-0.1.11.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 Oct 31, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page