traceloop / traceloop/openllmetry
๐ Bug Report: Requirements for Langchain example
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.1k
- Avg merge
- 8d 14h
- Merged PRs (30d)
- 2
Description
Which component is this bug for?
Langchain Instrumentation
๐ Description
When using the default pyproject.toml generated by
langchain app new ...
Langchain instrumentation does not occur.
๐ Reproduction steps
'''
langchain app new chat
'''
Results in the following pyproject.toml
[tool.poetry]
name = "chat"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [
{ include = "app" },
]
[tool.poetry.dependencies]
python = "^3.11"
uvicorn = "^0.23.2"
langserve = {extras = ["server"], version = ">=0.0.30"}
pydantic = "<2"
[tool.poetry.group.dev.dependencies]
langchain-cli = ">=0.0.15"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
๐ Expected behavior
The docs should describe what else needs to be added to show full instrumentation for a langchain example.
๐ Actual Behavior with Screenshots
This results in only the LLM being traced.
๐ค Python Version
3.11
๐ Provide any additional context for the Bug.
It looks like the following modules need to be added to get the following trace.
langchain
opentelemetry-instrumentation-fastapi
In the langchain example described here - https://github.com/traceloop/openllmetry/pull/1043 langchain is explicitly added, and opentelemetry-instrumentation-fastapi is pulled in by chromadb.
๐ Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up โ it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated pyproject.toml from langchain app new chat and compare it with the LangChain example described in pull request 1043. Update the relevant documentation to identify the dependencies needed for full instrumentation, then verify that the documented setup traces more than the LLM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- documentation, observability
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100