chatwoot/lib/integrations
Aakash Bakhle eaffad12e7
feat(langfuse): propagate observation metadata for evals (#14634)
# Pull Request Template

## Description

We need to pass on trace level attributes down to the spans inside them
like tool calls, observations, etc.
This way, we can filter observations based on trace level attributes.


## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.

Attributes added to observation metadata for easy filtering
<img width="1327" height="708" alt="image"
src="https://github.com/user-attachments/assets/8f1d1bf8-cde4-481d-a2c2-7920ad2fc52e"
/>

added a `generation_stage` to differentiate llm_calls that call tools vs
those that generate a `final_response`
<img width="1806" height="968" alt="CleanShot 2026-06-03 at 15 11 09@2x"
src="https://github.com/user-attachments/assets/db1fa8e0-7f2d-404b-a719-27a16d400442"
/>


propagated attributes to tool calls for future use
<img width="903" height="517" alt="image"
src="https://github.com/user-attachments/assets/edc61ce8-93db-465c-a66e-043138e2dc15"
/>



## 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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2026-06-03 16:45:19 +05:30
..
captain feat: Generate SSO URL in Chatwoot, move Captain to primary tab (#9871) 2024-08-01 19:22:34 -07:00
dialogflow feat(dialogflow): make language_code configurable instead of hardcoded (#13221) 2026-03-25 21:30:17 -07:00
dyte feat: Upgrade Dyte apis to v2 (#10706) 2025-02-19 14:47:48 -08:00
facebook feat: Facebook delivery reports (#8136) 2023-11-20 12:22:45 +05:30
google_translate fix: Rendering of translations based on the user's locale (#13211) 2026-01-08 18:37:42 -08:00
linear feat(linear): Auto link Linear issues from private notes (#14405) 2026-05-12 13:03:40 +04:00
openai fix: validate OpenAI hook credentials (#14068) 2026-05-18 14:08:57 +05:30
slack fix: render slack emoji shortcodes as unicode characters (#12928) 2026-04-29 23:19:52 +05:30
bot_processor_service.rb feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
llm_base_service.rb fix: log only on system api key failures (#13968) 2026-04-09 18:04:52 +05:30
llm_instrumentation_completion_helpers.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30
llm_instrumentation_constants.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30
llm_instrumentation_context.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30
llm_instrumentation_helpers.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30
llm_instrumentation_spans.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30
llm_instrumentation.rb feat(langfuse): propagate observation metadata for evals (#14634) 2026-06-03 16:45:19 +05:30