traceloop / traceloop/openllmetry

๐Ÿ› Bug Report: Requirements for Langchain example

Open
#1,096 7 comments 0 reactions 0 assignees View on GitHub

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.

image

๐Ÿค– 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

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up โ€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.