Skip to content

feat(toolbox_core): enable telemetry_attribute for SQLCommenter - #634

Merged
anubhav756 merged 2 commits into
googleapis:mainfrom
AjmeraParth132:feat/sql-commenter
May 15, 2026
Merged

feat(toolbox_core): enable telemetry_attribute for SQLCommenter#634
anubhav756 merged 2 commits into
googleapis: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

@anubhav756 anubhav756 left a comment

Copy link
Copy Markdown
Contributor

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

3 similar comments
@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

Comment thread packages/toolbox-adk/src/toolbox_adk/tool.py Outdated
Comment thread packages/toolbox-core/src/toolbox_core/mcp_transport/v20250618/mcp.py Outdated
Comment thread packages/toolbox-core/src/toolbox_core/mcp_transport/transport_base.py Outdated
Comment thread packages/toolbox-core/tests/test_client.py Outdated
@anubhav756 anubhav756 added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Apr 22, 2026
@anubhav756
anubhav756 force-pushed the feat/sql-commenter branch from 0e0f07c to a01251c Compare May 12, 2026 06:03
@anubhav756

Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756

Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756

Copy link
Copy Markdown
Contributor

/gcbrun

@anubhav756
anubhav756 merged commit 323f60e into googleapis:main May 15, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send client telemetry attributes in _meta for Extended Telemetry and SQLCommenter

3 participants