Skip to content

feat(toolbox_core): enable telemetry_attribute for SQLCommenter#634

Open
AjmeraParth132 wants to merge 4 commits intogoogleapis:mainfrom
AjmeraParth132:feat/sql-commenter
Open

feat(toolbox_core): enable telemetry_attribute for SQLCommenter#634
AjmeraParth132 wants to merge 4 commits intogoogleapis:mainfrom
AjmeraParth132:feat/sql-commenter

Conversation

@AjmeraParth132
Copy link
Copy Markdown
Contributor

The server needs client identity and user-provided metadata (model, user ID, agent ID) on tools/call to propagate into database query logs via SQLCommenter. Currently _meta only carries traceparent/tracestate

Solution:
Add telemetry_attributes to MCPMeta with serialization alias dev.mcp-toolbox/telemetry.
Accept at call time: pop telemetry_attributes from kwargs before signature validation:
Build payload in transport: always include client.name + client.version from transport state; merge user-provided attrs with client. prefix. Attach to _meta on every tools/call

Issue: #632

@AjmeraParth132 AjmeraParth132 requested a review from a team as a code owner April 15, 2026 07:39
@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

Copy link
Copy Markdown
Contributor

@anubhav756 anubhav756 left a comment

Choose a reason for hiding this comment

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

PTAL at the failing assertions.

Thanks for the PR!

@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

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.

2 participants