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

Integrate Langfuse for llm observability #34

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Conversation

schobele
Copy link
Collaborator

@schobele schobele commented Feb 5, 2025

This pull request introduces several changes to integrate OpenTelemetry for enhanced observability and telemetry, refactor imports for better organization, and add new utility functions. The most important changes are summarized below:

Integration of langfuse

  • Added dependencies for OpenTelemetry and Langfuse in package.json.
  • Updated src/ai/openai.ts to configure and start the OpenTelemetry SDK with Langfuse exporter.
  • Enabled experimental telemetry in various aisdk calls across multiple files to collect trace data. [1] [2] [3]

Added langfuse observability features to BaseAssistant Class

  • Modified the BaseAssistant class in src/ai/Assistant.ts to include tracing capabilities and optional run context parameters. [1] [2]

Miscellaneous Changes

  • Added initialization for Langfuse in src/langfuse/index.ts.
  • Ensured the OpenTelemetry SDK starts in the main application entry point src/index.ts.

src/index.ts Outdated Show resolved Hide resolved
@schobele schobele marked this pull request as ready for review February 6, 2025 11:32
src/index.ts Show resolved Hide resolved
@schobele schobele merged commit e23c34d into main Feb 6, 2025
1 check failed
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.

2 participants