Skip to content

Commit

Permalink
feat(llm-observability): LangChain spans (#176)
Browse files Browse the repository at this point in the history
* feat: refactor to dataclasses

* feat: spans

* test: fix part 1

* test: fix part 2

* test: fix part 3

* test: fix part n

* test: add langgraph agent test

* chore: bump and linters

* chore: bump

* fix: correctly capture a parent id when a custom trace_id is set

* test: multiple spans parent_ids

* fix: exception serialization

* refactor: ai_trace_name -> ai_span_name and ai_generation_id -> ai_span_id

* fix: logs typos

* Add minor breaking change note to changelog

* fix: naming

---------

Co-authored-by: Michael Matloka <[email protected]>
  • Loading branch information
skoob13 and Twixes authored Jan 28, 2025
1 parent eb07aaf commit 8f43bbc
Show file tree
Hide file tree
Showing 4 changed files with 802 additions and 399 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
## 3.11.0 - 2025-01-27
## 3.11.0 - 2025-01-28

1. Fix serialiazation of Pydantic models in methods.
1. Add the `$ai_span` event to the LangChain callback handler to capture the input and output of intermediary chains.
> LLM observability naming change: event property `$ai_trace_name` is now `$ai_span_name`.
2. Fix serialiazation of Pydantic models in methods.

## 3.10.0 - 2025-01-24

1. Add `$ai_error` and `$ai_is_error` properties to LangChain callback handler, OpenAI, and Anthropic.

## 3.9.3 - 2025-01-23

1. Fix capturing of multiple traces in the LangChain callback handler.

## 3.9.2 - 2025-01-22

1. Fix importing of LangChain callback handler under certain circumstances.
Expand Down
Loading

0 comments on commit 8f43bbc

Please sign in to comment.