Skip to content

feat: add LangWatch as optional observability backend alongside Langfuse#10

Open
tusharjadhav3302 wants to merge 2 commits intoeshulman2:mainfrom
tusharjadhav3302:feat/add-langwatch-integration
Open

feat: add LangWatch as optional observability backend alongside Langfuse#10
tusharjadhav3302 wants to merge 2 commits intoeshulman2:mainfrom
tusharjadhav3302:feat/add-langwatch-integration

Conversation

@tusharjadhav3302
Copy link
Copy Markdown

Summary

Adds LangWatch as an optional, parallel observability backend alongside Langfuse.

Full proposal with motivation, design, alternatives, and risks:
proposals/009-langwatch-integration.md

Changes

  • New src/forge/integrations/langwatch/ module (2 files, 143 lines)
  • Config additions: LANGWATCH_ENABLED, LANGWATCH_API_KEY, LANGWATCH_ENDPOINT
  • Callback merging in agent, API server startup, worker startup, container env passthrough
  • Updated .env.example and developer guide with LangWatch setup docs
  • Proposal 009 document

No Breaking Changes

  • Langfuse integration is untouched
  • LangWatch is disabled by default (LANGWATCH_ENABLED=false)
  • No new required dependencies

Test Plan

  • uv run forge-serve starts cleanly with LANGWATCH_ENABLED=false
  • uv run forge worker starts cleanly with LANGWATCH_ENABLED=false
  • With LangWatch enabled + valid API key, traces appear in dashboard
  • Langfuse traces still work when both are enabled
  • uv run pytest tests/unit/ passes

Copy link
Copy Markdown

@gryf gryf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small issue with imported module. Other than that - seems right to me.

Comment thread src/forge/main.py

# Startup - initialize LangWatch if enabled
if settings.langwatch_enabled and settings.langwatch_api_key.get_secret_value():
import os
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os is already imported.

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