Repository navigation
fix/langchain: add tool definition to langchain - #966
Conversation
|
Claude finished @haneric00's task in 4m 35s —— View job Claude Code Review
Thanks for picking this up — the overall approach of adapting the upstream LangChain genai helpers and normalizing the four tool shapes is clean, and the parametrized subtest covering each format is a nice way to cover the surface. A few findings posted inline:
Nothing security-sensitive here; the attribute is derived purely from already-serialized provider request params. |
|
Claude finished @haneric00's task in 1m 6s —— View job Claude Code Review
Re-reviewed on the latest commit (
Nothing new to flag on this push — the test matrix across the four formats and the normalization helper itself look good. |
|
Claude finished @haneric00's task in 1m 52s —— View job Claude Code Review
Re-reviewed on the latest commit (
@haneric00's self-review ask to "augment tests for all models supported" was also addressed: the subtest matrix now covers 14 cases spanning ChatOpenAI (chat + responses), AzureChatOpenAI, ChatDeepSeek, ChatXAI, ChatAnthropic, ChatMistralAI, ChatGroq, ChatCohere, ChatGoogleGenerativeAI, ChatBedrock, ChatBedrockConverse, legacy OpenAI The github-advanced-security CodeQL findings at lines 97/108/118 of the test file ( Nothing new to raise on this push. |
|
TODO:
|
|
I'll analyze this and get back to you. |
|
Claude finished @haneric00's task in 1m 12s —— View job Claude Code Review
Re-reviewed on the latest commits (
The Spot-checked the 15-case subtest matrix (ChatOpenAI chat + responses, AzureChatOpenAI, ChatDeepSeek, ChatXAI, ChatMistralAI, ChatGroq, ChatGoogleGenerativeAI, ChatCohere, ChatAnthropic, ChatBedrock, ChatBedrockConverse, Anthropic built-in-tool exclusion, legacy OpenAI Nothing new to flag on this push. |
|
would document this as well in sensitive data: https://github.com/aws-observability/aws-otel-python-instrumentation/blob/main/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/instrumentation/langchain/README.rst#sensitive-data |
1. move extract definition function to utils, remove a helper as it already exists in utils file 2. add tool definitions to the sensitive data list 3. refactor test to include more tools
|
Claude finished @haneric00's task in 3m 12s —— View job Claude Code Review
Re-reviewed on the latest commit (
liustve's follow-ups on this push:
The README Nothing new to flag on this push. |
|
Claude finished @haneric00's task in 3m 37s —— View job Claude Code Review
Re-reviewed on the latest commit (
Changes on this push (
Nothing new to flag on this push. |

Previously tool definition was not available on ADOT langchain/langgraph spans.
We modify the existing instrumentation to add full tool definitions (name, description, parameters).
We add two functions to event handlers
_get_property_valueand_extract_tool_definitionsboth of which are copied/inspired by the upstream method of populating these attributes.Also added tests that cover the 4 possible format paths in
_extract_tool_definitions.example span with fix:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.