Skip to content

docs: Clarify VT_SPAN_CONTEXT works with prepared statements#2102

Draft
promptless[bot] wants to merge 3 commits intoprodfrom
promptless/vt-span-context-prepared-statements
Draft

docs: Clarify VT_SPAN_CONTEXT works with prepared statements#2102
promptless[bot] wants to merge 3 commits intoprodfrom
promptless/vt-span-context-prepared-statements

Conversation

@promptless
Copy link
Copy Markdown
Contributor

@promptless promptless Bot commented Apr 24, 2026

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


Tip: Adjust how proactive or focused Promptless is in Agent Settings ⚙️

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.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for vitess ready!

Name Link
🔨 Latest commit 4847aac
🔍 Latest deploy log https://app.netlify.com/projects/vitess/deploys/69eb9c287081f80008baf72c
😎 Deploy Preview https://deploy-preview-2102--vitess.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants