langfuse-docs icon indicating copy to clipboard operation
langfuse-docs copied to clipboard

Add missing requirements.txt, core module libraries, and bedrock-agents-config.json to support Bedrock agent observability example

Open aboavent opened this issue 8 months ago • 5 comments

This PR addresses https://github.com/langfuse/langfuse-docs/issues/1445, which reports missing files required to reproduce the Bedrock agent integration example from the Langfuse documentation.

  1. Adds the missing requirements.txt file listing necessary dependencies
  2. Includes core module with instrument_agent_invocation and flush_telemetry functions used by the example notebook
  3. Adds bedrock-agents-config.json to support agent and langfuse setup
  4. Updated the example notebook to streamline the flow and make better use of these components

These components were sourced from the AWS-provided sample at: https://github.com/awslabs/amazon-bedrock-agent-samples/tree/main/examples/agent_observability/OpenTelemetry-Agent-Instrumentation


[!IMPORTANT] Adds missing files and modules for Bedrock agent observability, including OpenTelemetry integration and configuration, sourced from AWS samples.

  • Files Added:
    • requirements.txt with dependencies for Bedrock agent observability.
    • Core modules in core/ for OpenTelemetry integration, including agent.py, configuration.py, constants.py, handlers.py, processes.py, streaming_wrapper.py, timer_lib.py, tracing.py, and utils.py.
    • bedrock-agents-config.json for agent and Langfuse setup.
  • Functionality:
    • Implements OpenTelemetry tracing for Bedrock agent using SpanManager in agent.py.
    • Provides utility functions and constants for tracing in tracing.py and constants.py.
    • Handles various trace events in handlers.py and processes.py.
    • Supports streaming responses with streaming_wrapper.py.
    • Manages timing with timer_lib.py.
  • Example Update:
    • Updates example notebook to integrate new components for improved flow.
  • Source:
    • Components sourced from AWS sample repository for Bedrock agent.

This description was created by Ellipsis for 3da36393f9640e84c2b520b707c7548c9a72ac32. It will automatically update as commits are pushed.

aboavent avatar Apr 17 '25 20:04 aboavent

@aboavent is attempting to deploy a commit to the langfuse Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 17 '25 20:04 vercel[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 17 '25 20:04 CLAassistant

Heads-up: Vercel deployment requires manual approval from the langfuse team since this PR comes from a fork. Could someone from the team please approve the deployment?

aboavent avatar Apr 17 '25 21:04 aboavent

Thanks a lot for addressing the issue

ystarikovich avatar May 07 '25 08:05 ystarikovich