-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: add traceId to Goldfish UI #18726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
This commit adds comprehensive trace ID tracking and visualization to the goldfish query comparison tool, along with major architectural refactoring. Key features added: - Capture and store trace IDs from both query cells (cell A and cell B) - Generate Grafana Explore links for traces when Tempo datasource is configured - Generate Grafana Explore links for logs when Loki datasource is configured - Display trace IDs in the UI with clickable links to explore - Add namespace configuration for cell-specific log queries Major refactoring: - Extract shared goldfish storage logic from tools/querytee into pkg/goldfish - Create unified Storage interface used by both querytee and UI - Move database migrations to shared pkg/goldfish/migrations - Consolidate MySQL storage implementations (CloudSQL, RDS) into single implementation - Add performance optimization indexes for query retrieval Database schema changes: - Add cell_a_trace_id and cell_b_trace_id columns to sampled_queries table - Add performance indexes for faster query filtering and pagination - Migration 20250729000002 adds trace ID columns - Migration 20250805000001 adds performance indexes Configuration additions: - GOLDFISH_GRAFANA_URL: Base URL for Grafana instance - GOLDFISH_TRACES_DATASOURCE_UID: Tempo datasource UID for trace exploration - GOLDFISH_LOGS_DATASOURCE_UID: Loki datasource UID for log exploration - GOLDFISH_CELL_A_NAMESPACE: Namespace for cell A log queries - GOLDFISH_CELL_B_NAMESPACE: Namespace for cell B log queries Frontend improvements: - Display trace IDs in query diff view with visual indicators - Show clickable links when explore configuration is available - Add namespace labels to cell headers when configured - Update TypeScript types to include trace ID fields This enables developers to quickly navigate from query comparison results to the underlying distributed traces and logs, significantly improving the debugging workflow for query performance issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Contributor
|
💻 Deploy preview deleted. |
JordanRushing
approved these changes
Aug 5, 2025
Contributor
JordanRushing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, no nits
This was referenced Nov 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it:
This commit adds tracIDs to the sampled queries captured by Goldfish, and adds links to explore in the UI for both the traces and logs (via traceId line filter). It also refactors the duplicate database logic between the
querteeand UI into a new, shared, goldfish package.Key features added:
Database refactoring:
Database schema changes:
Frontend improvements:
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR