Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6d5d857
feat: add _otel.py module and opentelemetry optional dependency
cpsievert May 12, 2026
6c6aaee
feat: hook OTel spans into _chat.py
cpsievert May 12, 2026
e6db85a
tests/docs: add OTel tests and update monitoring documentation
cpsievert May 12, 2026
9d77a9a
refactor: make opentelemetry-api a hard dependency, simplify _otel.py
cpsievert May 12, 2026
e63a92c
Merge remote-tracking branch 'origin/main' into worktree-feat+otel-fr…
cpsievert Jun 2, 2026
ecf9473
feat(otel): activate chat & tool spans so third-party spans nest
cpsievert Jun 2, 2026
cdcff49
docs(otel): note that tool-internal spans nest under execute_tool
cpsievert Jun 2, 2026
7a4fb23
refactor(otel): hoist _otel imports in _chat.py to module top
cpsievert Jun 2, 2026
ce8ec39
feat(otel): record errors on chat and agent spans
cpsievert Jun 2, 2026
81726d7
refactor(otel): tighten span-parent typing and hoist imports
cpsievert Jun 2, 2026
df4b0de
fix(otel): nest generator-tool spans under the execute_tool span
cpsievert Jun 2, 2026
26f199f
test(otel): cover generator-tool span nesting
cpsievert Jun 2, 2026
fee23d9
refactor(otel): extract _otel_start_chat_span helper
cpsievert Jun 2, 2026
de94322
feat(otel): polish span attributes and tool-result encoding
cpsievert Jun 2, 2026
46ca5ff
refactor(otel): fold system-turn split into start_chat_span
cpsievert Jun 2, 2026
50c2323
fix(otel): define the [otel] extra and harden content-capture test
cpsievert Jun 2, 2026
5a6e39c
fix(otel): leave successful span status UNSET instead of OK
cpsievert Jun 2, 2026
7f860d9
fix(otel): nest provider stream-iteration spans under the chat span
cpsievert Jun 2, 2026
f9898be
docs(otel): correct the chat-span activation comment
cpsievert Jun 2, 2026
25a399a
fix(otel): trace early tool failures and lazy content capture
cpsievert Jun 2, 2026
1dbae06
docs(otel): rework monitoring guide with a real worked example
cpsievert Jun 2, 2026
4569c6e
docs(otel): lead the changelog note with user-facing value
cpsievert Jun 2, 2026
ecab24c
test(otel): refresh VCR recordings
cpsievert Jun 2, 2026
c9b6de1
docs(otel): add environment-based exporter config, with Connect as an…
cpsievert Jun 2, 2026
6d19840
docs(otel): make trace SVG generator resilient to HTTP semconv key re…
cpsievert Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ logs/

# setuptools_scm
chatlas/_version.py

# superpowers visual companion working dir
.superpowers/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### New features

* chatlas is now instrumented with [OpenTelemetry](https://opentelemetry.io/) (OTel) out of the box, making it much easier to see how your app behaves in production — where time goes, how many tokens you're spending, which tools run, and where things fail. Without writing any tracing code, you get spans that capture the full structure of a conversation as one connected trace: an `invoke_agent` span over the whole chat loop, a `chat` span per model call, and an `execute_tool` span per tool invocation, with attributes (token usage, response model/ID, tool errors) that follow the [OTel GenAI semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/). Because chatlas keeps its spans active during each call, HTTP spans from provider instrumentors and any spans your own tools emit nest underneath automatically. Point it at any OTel-compatible backend (Logfire, Datadog, Honeycomb, Jaeger, …); message content is omitted by default and opt-in via `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`. See the [monitoring guide](https://posit-dev.github.io/chatlas/get-started/monitor.html) to get started. (#310)
* `Chat` gains a `model` property to get (or set) the model after the chat is created. Setting it does not validate the model name.
* `ChatGoogle()`'s `reasoning` parameter now accepts a string thinking level (`"minimal"`, `"low"`, `"medium"`, or `"high"`) in addition to an integer token budget.
* `ChatAnthropic()`'s `reasoning` parameter now accepts a string effort level (`"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"`) to enable Claude's adaptive thinking, in addition to an integer token budget.
Expand Down
Loading