docs: Clarify VT_SPAN_CONTEXT works with prepared statements#2102
Draft
promptless[bot] wants to merge 3 commits intoprodfrom
Draft
docs: Clarify VT_SPAN_CONTEXT works with prepared statements#2102promptless[bot] wants to merge 3 commits intoprodfrom
promptless[bot] wants to merge 3 commits intoprodfrom
Conversation
Add a note to the tracing docs explaining that VT_SPAN_CONTEXT works with both text queries (COM_QUERY) and prepared statements (COM_STMT_EXECUTE). This clarifies that trace context propagation works regardless of which MySQL protocol the client library uses, including PHP/Laravel, Python, and Go's database/sql with params. Relates to vitessio/vitess#19958
| /*VT_SPAN_CONTEXT=<base64 value>*/ SELECT * from product; | ||
| ``` | ||
|
|
||
| `VT_SPAN_CONTEXT` works with both text queries (`COM_QUERY`) and prepared statements (`COM_STMT_EXECUTE`). This means trace context propagation works regardless of which MySQL protocol your client library uses, including libraries that use prepared statements by default, such as PHP/Laravel, Python, and Go's `database/sql` with query parameters. |
Contributor
Author
There was a problem hiding this comment.
Added clarification that VT_SPAN_CONTEXT works with prepared statements based on PR #19958, which fixes a bug where VT_SPAN_CONTEXT extraction was only wired into ComQuery and ComQueryMulti but not ComStmtExecute. The fix adds startSpan() to ComStmtExecute in plugin_mysql_server.go.
Source: vitessio/vitess#19958
5 tasks
✅ Deploy Preview for vitess ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Open this suggestion in Promptless to view citations and reasoning process
Adds a clarification to the tracing docs that VT_SPAN_CONTEXT works with both text queries (COM_QUERY) and prepared statements (COM_STMT_EXECUTE), so trace context propagation works regardless of which MySQL protocol the client library uses.
Trigger Events
vtgate: extractVT_SPAN_CONTEXTfor prepared statementsTip: Adjust how proactive or focused Promptless is in Agent Settings ⚙️