Skip to content

Incompatible with updated opentelemetry-instrumentation-langchain #3520

@barseghyanartur

Description

@barseghyanartur

Area(s)

Dependency hell.

What's the problem?

The following pair works:

opentelemetry-instrumentation-langchain==0.51.1
opentelemetry-semantic-conventions-ai==0.4.13

The following pair does NOT:

opentelemetry-instrumentation-langchain==0.53.0
opentelemetry-semantic-conventions-ai==0.4.15

It's easy to reproduce:

% python -c "from opentelemetry.instrumentation.langchain import LangchainInstrumentor; print('OK')"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/me/repos/my-repo/.venv/lib/python3.11/site-packages/opentelemetry/instrumentation/langchain/__init__.py", line 11, in <module>
    from opentelemetry.instrumentation.langchain.callback_handler import (
  File "/Users/me/repos/my-repo/.venv/lib/python3.11/site-packages/opentelemetry/instrumentation/langchain/callback_handler.py", line 64, in <module>
    from opentelemetry.semconv_ai import (
ImportError: cannot import name 'GenAICustomOperationName' from 'opentelemetry.semconv_ai' (/Users/me/repos/my-repo/.venv/lib/python3.11/site-packages/opentelemetry/semconv_ai/__init__.py)

As a temporary workaround, I pinned these, but it's not a long-term sustainable solution.

Describe the solution you'd like

Ensure these do work well together.

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