feat: Add SQL Query Summary - Tokenizer, Parser, Cache#1918
Open
hannahramadan wants to merge 39 commits intoopen-telemetry:mainfrom
Open
feat: Add SQL Query Summary - Tokenizer, Parser, Cache#1918hannahramadan wants to merge 39 commits intoopen-telemetry:mainfrom
hannahramadan wants to merge 39 commits intoopen-telemetry:mainfrom
Conversation
54930b3 to
c72f16a
Compare
hannahramadan
commented
Jan 9, 2026
| Parser.build_summary_from_tokens(tokens) | ||
| end | ||
| rescue StandardError | ||
| 'UNKNOWN' |
Member
Author
There was a problem hiding this comment.
db.query.summary should be used as a database span name, but if the summary is not available, then the name should be {db.operation.name} {target}. We should keep that in mind when changing db instrumentation. If the return value of the summary is UNKNOWN, then we have more work to do to create the span name.
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 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.
This PR adds the framework for a query summary generator, including a tokenizer, parser, and cache. It is meant to generate the
db.query.summaryattribute for database spans.Query Pipeline: SQL Query → Cache Lookup → Tokenizer → FSM Parser → Summary
Fast Path & Caching
Tokenizer
Parser
Summary Generation
Resources: