Integrate Langtrace with AWS Bedrock
Obinna Okafor
⸱
Software Engineer
Oct 24, 2024
Introduction
AWS Bedrock is Amazon's fully managed service that offers a choice of high-performing foundation models through a single API. It provides access to leading models from Anthropic, AI21 Labs, Cohere, Meta, and Amazon's own models, making it an excellent choice for enterprises looking to build generative AI applications. Bedrock stands out for its enterprise-grade security, scalability, and seamless integration with other AWS services. Its pay-as-you-go pricing model and built-in model monitoring make it particularly attractive for production deployments.
We are excited to announce that Langtrace now supports AWS Bedrock natively. This means:
If you are using AWS Bedrock, you can set up Langtrace to automatically capture metrics such as token usage, cost, latency, and request metadata.
You can monitor your Bedrock model performance across different models.
Get detailed insights into your AWS Bedrock usage patterns and optimization opportunities.
Setup
Sign up to Langtrace, create a project and get a Langtrace API key
Install the Langtrace SDK
Setup the environment variable
Initialize Langtrace in your code
Configure AWS credentials
View traces in your Langtrace dashboard


Once set up, you can monitor your AWS Bedrock usage in real-time through the Langtrace dashboard. You'll be able to:
Track token usage across different Bedrock models
Monitor response times and costs
Analyze request patterns and optimization opportunities
Set up alerts for unusual patterns or cost thresholds
Useful Resources
Getting started with Langtrace https://docs.langtrace.ai/introduction
Langtrace Website https://langtrace.ai/
Langtrace Discord https://discord.langtrace.ai/
Langtrace Github https://github.com/Scale3-Labs/langtrace
Langtrace Twitter(X) https://x.com/langtrace_ai
Langtrace Linkedin https://www.linkedin.com/company/langtrace/about/
Ready to deploy?
Try out the Langtrace SDK with just 2 lines of code.
Want to learn more?
Check out our documentation to learn more about how langtrace works
Join the Community
Check out our Discord community to ask questions and meet customers