Skip to content

Commit 33afa20

Browse files
committed
added entry point and fixed unwrap
1 parent f4ae1ce commit 33afa20

File tree

2 files changed

+4
-1
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-langchain

2 files changed

+4
-1
lines changed

instrumentation-genai/opentelemetry-instrumentation-langchain/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ instruments = [
3535
"langchain >= 0.3.21",
3636
]
3737

38+
[project.entry-points.opentelemetry_instrumentor]
39+
langchain = "opentelemetry.instrumentation.langchain:LangChainInstrumentor"
40+
3841
[project.urls]
3942
Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation-genai/opentelemetry-instrumentation-langchain"
4043
Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"

instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _uninstrument(self, **kwargs):
9292
"""
9393
Cleanup instrumentation (unwrap).
9494
"""
95-
unwrap("langchain_core.callbacks.base", "BaseCallbackManager.__init__")
95+
unwrap("langchain_core.callbacks.base.BaseCallbackManager", "__init__")
9696

9797

9898
class _BaseCallbackManagerInitWrapper:

0 commit comments

Comments
 (0)