Skip to content

Add LangChain workflow span support and refactor LLM invocation#4449

Draft
wrisa wants to merge 1 commit intoopen-telemetry:mainfrom
wrisa:langchain-workflow-type
Draft

Add LangChain workflow span support and refactor LLM invocation#4449
wrisa wants to merge 1 commit intoopen-telemetry:mainfrom
wrisa:langchain-workflow-type

Conversation

@wrisa
Copy link
Copy Markdown
Contributor

@wrisa wrisa commented Apr 16, 2026

Description

  • Introduces support for tracing LangChain workflow-level operations (first chain) via the callback handler.
  • Adds start/stop workflow invocation tracking alongside the existing LLM inference spans.
  • Refactors the callback handler to adress changes in #feat(util-genai): refactor and make API smaller and more user-friendly #4391.
  • Adds opentelemetry-util-genai as an explicit dependency in pyproject.toml.
  • Includes a workflow example (examples/workflow/main.py)
  • Comprehensive tests covering chain execution tracing.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@wrisa wrisa changed the title Add workflow and refactor LLM for langchain Add LangChain workflow span support and refactor LLM invocation Apr 16, 2026
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.

1 participant