openinference migration skill output for langchain#181
Conversation
| ToolCallRequest, | ||
| ) | ||
|
|
||
| _PROVIDER_NAME_MAP = { |
There was a problem hiding this comment.
We should probably move this to genai-utils. openai instrumentation uses it as well I believe.
|
This PR has review comments. Review suggestions, whether from maintainers or automated reviewers, aren't always correct or required. Please evaluate each comment on its merits, then make sure each thread has a clear outcome. For example, link to the commit if you applied a suggestion, explain why it wasn't applied, or ask a follow-up question. Automation flags a PR for human review once every review thread has a reply or is marked as resolved. Status across open PRs is visible on the pull request dashboard. |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
Description
Augments the LangChain GenAI instrumentation with coverage from the OpenInference migration work.
This expands chat model handling beyond the previous OpenAI/Bedrock-only path by using LangChain metadata to resolve provider and model names, normalizing known provider values, and improving request/response message parsing for raw dict messages, multimodal content, tool calls, and tool responses.
It also adds LangChain retriever callback support using
TelemetryHandler.retrieval(), including retrieval query text, data source id, provider/model/server metadata, retrieved document mapping, and a retrieval conformance scenario.Related to #124.
Type of change
How has this been tested?
uv run tox -e py312-test-instrumentation-genai-langchain -- -quv run tox -e py312-test-instrumentation-genai-langchain-conformance -- -quv run --python 3.12 tox -e lint-instrumentation-genai-langchaingit diff --checkChecklist
See CONTRIBUTING.md
for the style guide, changelog guidance, and more.