Skip to content

openinference migration skill output for langchain#181

Draft
keith-decker wants to merge 1 commit into
open-telemetry:mainfrom
keith-decker:openinference-langchain-conversion
Draft

openinference migration skill output for langchain#181
keith-decker wants to merge 1 commit into
open-telemetry:mainfrom
keith-decker:openinference-langchain-conversion

Conversation

@keith-decker

@keith-decker keith-decker commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • uv run tox -e py312-test-instrumentation-genai-langchain -- -q
  • uv run tox -e py312-test-instrumentation-genai-langchain-conformance -- -q
  • uv run --python 3.12 tox -e lint-instrumentation-genai-langchain
  • git diff --check

Checklist

See CONTRIBUTING.md
for the style guide, changelog guidance, and more.

  • Followed the style guidelines of this project
  • Changelog updated if the change requires an entry
  • Unit tests added
  • Documentation updated

ToolCallRequest,
)

_PROVIDER_NAME_MAP = {

@rads-1996 rads-1996 Jun 29, 2026

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.

We should probably move this to genai-utils. openai instrumentation uses it as well I believe.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

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.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale Issue or PR has been inactive label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale Issue or PR has been inactive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants