[pull] develop from baserow:develop#94
Merged
pull[bot] merged 1 commit intocode:developfrom Nov 28, 2025
Merged
Conversation
) * Add PostHog telemetry tracing for LLM assistant operations This commit adds comprehensive PostHog telemetry integration to track and analyze LLM assistant operations including: - uDSPy module execution (ChainOfThought, ReAct, Predict) - LLM API calls with automatic generation tracking - Tool invocations - Performance metrics (latency, token usage) - Error tracking with exception messages The telemetry system: - Captures hierarchical span relationships for nested operations - Patches OpenAI client for automatic generation event tracking - Handles errors gracefully without breaking assistant execution - Respects POSTHOG_ENABLED setting - Adds workspace and user context to all events Run the telemetry test suite: ```bash just pytest -k test_telemetry ``` All 8 tests should pass, covering: - Trace context manager (success and exception paths) - Module execution tracing (ChainOfThought, ReAct, Predict) - LM callback enrichment - Tool execution tracing - Exception handling (module and tool failures) - Telemetry disabled state To test manually: 1. Ensure POSTHOG_ENABLED=True in settings 2. Set up PostHog project credentials 3. Use the assistant and verify events appear in PostHog 4. Check for $ai_trace, $ai_span, and $ai_generation events 5. Verify span hierarchy and context propagation * Fix issue when POSTHOG_PROJECT_API_KEY is not set * Fix tests; capture all spans; add trace input and output * Bump udspy version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )