feat: Add support for Langfuse LLM Tracing via OTEL (#12905)
This PR adds LLM instrumentation on langfuse for ai-editor feature ## Type of change New feature (non-breaking change which adds functionality) Needs langfuse account and env vars to be set ## How Has This Been Tested? I configured personal langfuse credentials and instrumented the app, traces can be seen in langfuse. each conversation is one session. <img width="1683" height="714" alt="image" src="https://github.com/user-attachments/assets/3fcba1c9-63cf-44b9-a355-fd6608691559" /> <img width="1446" height="172" alt="image" src="https://github.com/user-attachments/assets/dfa6e98f-4741-4e04-9a9e-078d1f01e97b" /> ## Checklist: - [x ] My code follows the style guidelines of this project - [ x] I have performed a self-review of my code - [ x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: aakashb95 <aakash@chatwoot.com> Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com> Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -199,7 +199,6 @@
|
||||
description: 'The limits for the Captain AI service for different plans'
|
||||
value:
|
||||
type: code
|
||||
|
||||
# End of Captain Config
|
||||
|
||||
# ------- Chatwoot Internal Config for Cloud ----#
|
||||
@@ -476,3 +475,28 @@
|
||||
locked: false
|
||||
description: 'Token expiry in days'
|
||||
## ------ End of Customizations for Customers ------ ##
|
||||
|
||||
## ----- LLM Observability ---- ##
|
||||
- name: OTEL_PROVIDER
|
||||
display_title: 'OpenTelemetry Provider'
|
||||
description: 'LLM observability provider (langfuse, langsmith, etc.)'
|
||||
value: ''
|
||||
locked: false
|
||||
- name: LANGFUSE_PUBLIC_KEY
|
||||
display_title: 'Langfuse Public Key'
|
||||
description: 'Public key for Langfuse authentication'
|
||||
value: ''
|
||||
locked: false
|
||||
type: secret
|
||||
- name: LANGFUSE_SECRET_KEY
|
||||
display_title: 'Langfuse Secret Key'
|
||||
description: 'Secret key for Langfuse authentication'
|
||||
value: ''
|
||||
locked: false
|
||||
type: secret
|
||||
- name: LANGFUSE_BASE_URL
|
||||
display_title: 'Langfuse Base URL'
|
||||
description: 'Langfuse endpoint (US: https://us.cloud.langfuse.com, EU: https://cloud.langfuse.com)'
|
||||
value: 'https://us.cloud.langfuse.com'
|
||||
locked: false
|
||||
## ---- End of LLM Observability ---- ##
|
||||
|
||||
Reference in New Issue
Block a user