Commit 19297c0
fix: resolve protocol mismatch and add CLI validation for --observe flag
- Fix critical protocol mismatch: Remove ContextTraceEmitter setup that incorrectly used LangfuseSink (ActionEvent) with ContextEvent
- Add CLI validation: --observe now rejects unsupported values, only accepts 'langfuse' for Phase 1
- Update example: Use TraceEmitter (ActionEvent) instead of ContextTraceEmitter for correct protocol usage
- Add proper try/finally resource management in langfuse_example.py
Addresses all reviewer feedback from CodeRabbit, Copilot, and Gemini regarding:
✅ Protocol contract violations (LangfuseSink/ContextTraceEmitter mismatch)
✅ CLI input validation (typo prevention)
✅ Resource safety (sink cleanup)
✅ Architecture compliance (action-level tracing sufficient for Phase 1)
Co-authored-by: MervinPraison <454862+MervinPraison@users.noreply.github.com>1 parent 7de1755 commit 19297c0
1 file changed
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
151 | 146 | | |
152 | 147 | | |
153 | 148 | | |
154 | | - | |
155 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
156 | 153 | | |
157 | 154 | | |
158 | 155 | | |
| |||
0 commit comments