Integrations
Amazon Bedrock AgentCore
Trace AWS Bedrock AgentCore agents in Muster via OpenTelemetry.
Amazon Bedrock AgentCore is AWS's runtime for production AI agents. Muster captures AgentCore runs via OpenTelemetry — disable AWS's built-in observability and forward OTLP traces to Muster instead.
Setup
pip install bedrock-agentcore-starter-toolkit "strands-agents[otel]" langfuse boto3 mcpimport os, base64
os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-..."
os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-..."
os.environ["LANGFUSE_BASE_URL"] = "https://app.getmuster.io"
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = (
os.environ["LANGFUSE_BASE_URL"] + "/api/public/otel"
)
auth = base64.b64encode(
f"{os.environ['LANGFUSE_PUBLIC_KEY']}:{os.environ['LANGFUSE_SECRET_KEY']}".encode()
).decode()
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = (
f"Authorization=Basic {auth},x-langfuse-ingestion-version=4"
)(Configure AWS credentials separately for Bedrock access.)
Wire up tracing
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from strands import Agent
from strands.telemetry import StrandsTelemetry
from langfuse import get_client
strands_telemetry = StrandsTelemetry()
strands_telemetry.setup_otlp_exporter()
with get_client().start_as_current_observation(name="agentcore-agent"):
response = agent(user_input)Deploy
When launching the AgentCore runtime, disable AWS observability and pass through the OTel env vars:
launch_result = runtime.launch(
env_vars={
"DISABLE_ADOT_OBSERVABILITY": "true",
"OTEL_EXPORTER_OTLP_ENDPOINT": os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"],
"OTEL_EXPORTER_OTLP_HEADERS": os.environ["OTEL_EXPORTER_OTLP_HEADERS"],
}
)