Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(langfuse): langfuse tracing sample app #173

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

athewsey
Copy link

@athewsey athewsey commented Mar 25, 2025

Issue #, if available: awslabs/generative-ai-cdk-constructs#1031

Description of changes:

Add a new deployable sample app companion for awslabs/generative-ai-cdk-constructs#1037 - showing how to use the constructs to deploy a self-hosted Langfuse environment, and then instrument Lambda function(s) to send traces into Langfuse when calling Bedrock.

Marking ready for review as this is now tested working end-to-end, but with outstanding actions:

  • Update package.json to sensible versions of aws-cdk-lib, constructs, @aws-cdk/aws-lambda-python-alpha, and @cdklabs/generative-ai-cdk-constructs when the constructs library is released

Feedback very welcome!


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@athewsey
Copy link
Author

athewsey commented Mar 25, 2025

I'm actually having some trouble with the "file://../../../generative-ai-cdk-constructs" dependency in package.json ending up with a load of typing errors because it seems to result in multiple parallel versions of aws-cdk-lib and etc... Any tips on avoiding this?


Update: Seems to be working as of b1fd0f5 (using npm link to link in the local construct library package), but I'm still working through issues with CDK-Nag

CfnOutputs in the Langfuse demo app were referencing incorrect
attributes of the Secret and PythonFunction constructs, due to issues
with local dependency linking preventing testing earlier
Update package.json & package-lock.json for current working local
workflow using `npm link` to link in the under-development copy of
`@cdklabs/generative-ai-cdk-constructs`.
Add screenshots to README. Move CfnOutputs to top level of stack so
their names are constant, and add descriptions. Fix issue where
demoInvokers langfuseUrl had not been set up to be optional.
@athewsey athewsey marked this pull request as ready for review March 26, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant