Skip to content

fix(sdk): use sync shutdown flush fallback#150

Merged
abhinav-galileo merged 4 commits into
mainfrom
abhi/observability-sync-shutdown-flush
Mar 30, 2026
Merged

fix(sdk): use sync shutdown flush fallback#150
abhinav-galileo merged 4 commits into
mainfrom
abhi/observability-sync-shutdown-flush

Conversation

@abhinav-galileo

Copy link
Copy Markdown
Collaborator

Summary

  • replace the atexit shutdown fallback that spawned a helper thread and asyncio.run() with a synchronous httpx.Client flush path
  • reuse shared batch request construction for both async and sync send paths and clear the async client reference after fallback shutdown cleanup
  • add regression coverage for the sync fallback path and for a short-lived subprocess that emits an SDK-evaluated observability event and exits without explicit shutdown

Testing

  • make sync
  • make check
  • git push -u origin abhi/observability-sync-shutdown-flush (pre-push hook: lint, typecheck, contrib evaluator checks)

@codecov

codecov Bot commented Mar 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.64706% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdks/python/src/agent_control/observability.py 97.64% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread sdks/python/src/agent_control/observability.py Outdated
@abhinav-galileo abhinav-galileo merged commit 90265ba into main Mar 30, 2026
6 checks passed
@abhinav-galileo abhinav-galileo deleted the abhi/observability-sync-shutdown-flush branch March 30, 2026 06:52
galileo-automation pushed a commit that referenced this pull request Apr 7, 2026
## [2.2.0](ts-sdk-v2.1.0...ts-sdk-v2.2.0) (2026-04-07)

### Features

* **evaluators:** add starts_with/ends_with mode to list evaluator ([#154](#154)) ([bf1f7d7](bf1f7d7))
* **sdk:** [Enterprise Integration]: Add provider agnostic traceing ([#145](#145)) ([f1ca27c](f1ca27c))
* **sdk:** Add telemetry package to support sinks ([#164](#164)) ([2186ba1](2186ba1))
* **sdk:** default merge events in SDK ([#155](#155)) ([5984a60](5984a60))
* **server,sdk, ui:** Control Templates ([#158](#158)) ([78bb538](78bb538))
* **server:** Override PG password in dockerfile ([#148](#148)) ([5d70c7d](5d70c7d))
* **server:** Remove container name for dev postgres ([92b2d13](92b2d13))
* **server:** Start local dev pg under docker compose project endign with dev ([88bee63](88bee63))
* **ui, server:** Intuitive JSON editing for Controls ([#151](#151)) ([8c23cef](8c23cef))
* **ui:** add full control JSON editing and create-from-JSON ([#147](#147)) ([e685ed0](e685ed0))

### Bug Fixes

* **docs:** add explicit shutdown to quickstart example ([#149](#149)) ([b76014f](b76014f))
* **sdk:** use sync shutdown flush fallback ([#150](#150)) ([90265ba](90265ba))
* **server:**  remove unused evaluator config store ([#152](#152)) ([dea2873](dea2873))
* **server:** Omit null fields in control JSON editor ([#157](#157)) ([0aa2f3c](0aa2f3c))
* **server:** Update docker-compose.dev.yml to use different container name ([14d4c87](14d4c87))
* **ui:** improve edit control ux, no layout shift, consistent spacing ([#122](#122)) ([76d67b9](76d67b9))
@galileo-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants