Skip to content

Support ChatAnthropic for Langchain instrumentation (opentelemetry-instrumentation-langchain) #4495

@salaboy

Description

@salaboy

Describe your environment

OS: Mac OS
Python version: (e.g., Python 3.14.0)
Package version: @main

What happened?

When trying to use opentelemetry-instrumentation-langchain there is no support for ChatAnthropic hence anthropic users don't get any instrumentation.

Steps to Reproduce

Create a simple application like this one: https://github.com/salaboy/observing-ai/tree/main/python/langchain/python-merch-store-otel-langchain-official using Anthropic, no spans are created for Anthropic.

Expected Result

Instrumented ChatAnthropic

Actual Result

No spans being created for ChatAnthropic.

Additional context

No response

Would you like to implement a fix?

Yes

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions