Skip to content

chore: release main#461

Open
stainless-app[bot] wants to merge 2 commits into
mainfrom
release-please--branches--main--changes--next
Open

chore: release main#461
stainless-app[bot] wants to merge 2 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app

@stainless-app stainless-app Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

✨ Stainless prepared a new release

agentex-client: 0.18.1

0.18.1 (2026-07-13)

Full Changelog: agentex-client-v0.18.0...agentex-client-v0.18.1

Bug Fixes

  • tracing: capture span body exceptions and export SGP status=ERROR (#460) (6c23d76)
agentex-sdk: 0.18.1

0.18.1 (2026-07-13)

Full Changelog: agentex-sdk-v0.18.0...agentex-sdk-v0.18.1

Chores

  • agentex-sdk: Synchronize agentex versions

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

This patch release (0.18.1) fixes a gap in span error reporting: exceptions raised inside Trace.span / AsyncTrace.span context managers were previously swallowed without being surfaced to SGP, so all spans appeared as SUCCESS even when the body raised. The fix captures Exception subclasses, records type and message onto span.data, and propagates status=ERROR through _build_sgp_span.

  • span_error.py — new module with set_span_error / get_span_error helpers that store error metadata in span.data[\"__error__\"]; safely no-ops on None and list-shaped data.
  • trace.py — both sync and async context managers now catch, record, and re-raise Exception; finally continues to call end_span so span lifecycle is unchanged.
  • sgp_tracing_processor.py_build_sgp_span reads the recorded error and calls sgp_span.set_error(...) before returning, ensuring SGP receives status=ERROR and error metadata.

Confidence Score: 5/5

Safe to merge — the change is narrowly scoped to error capture in span context managers with no side effects on the happy path.

The exception path in both sync and async context managers is handled correctly: set_span_error is called before raise, and end_span still runs via finally. The get_span_error call in _build_sgp_span is guarded by a None check, so spans with no error are unaffected. BaseException subclasses like KeyboardInterrupt and asyncio.CancelledError are intentionally not captured.

No files require special attention.

Important Files Changed

Filename Overview
src/agentex/lib/core/tracing/span_error.py New module with set_span_error / get_span_error helpers; writes error info into span.data[SPAN_ERROR_KEY] with safe handling for None and list-shaped data
src/agentex/lib/core/tracing/trace.py Both Trace.span and AsyncTrace.span context managers now capture Exception subclasses, record the error via set_span_error, and re-raise; finally still calls end_span as before
src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py _build_sgp_span reads the recorded error from the span and calls sgp_span.set_error() to propagate status=ERROR to SGP
tests/lib/core/tracing/test_span_error.py Comprehensive new test file covering helpers, sync/async context manager capture, and SGP span mapping; uses patch to avoid real HTTP calls
pyproject.toml Version bump agentex-client 0.18.0 to 0.18.1
adk/pyproject.toml Version bump agentex-sdk 0.18.0 to 0.18.1

Reviews (1): Last reviewed commit: "chore: release main" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant