You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Pull Request Template
Thanks for taking the time to fill out this pull request!
## Issue Reference
Please link to any related issues
- [ ] This PR fixes/closes #[issue number]
## Changes
Please describe the changes proposed in this pull request
[Describe your changes here...]
## Testing
Please describe how you tested these changes
- [ ] Unit tests added/updated
- [ ] Manual testing performed
- [ ] Tested in [environment]
## Screenshots
If applicable, add screenshots to help explain your changes
[Add screenshots here...]
## PR Checklist
Please ensure you've completed these items
- [ ] I have read and followed the contributing guidelines
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
## Additional Notes
Add any other context about the PR here
[Add any additional notes here...]
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds org billing fields/endpoints, hardens runtime tracing completion
(incl. cancellations), extends Python tracing/flush behavior, and
updates docs/tests for tracing.
>
> - **Backend/API (baml-rpc)**:
> - Add Stripe billing fields to `ui_control_plane_orgs::Organization`
(`stripe_entitlements`, `stripe_subscription_data`).
> - New endpoints: `DeleteOrganization` (`/v1/delete-organization`) and
`SyncStripeSubscription` (`/v1/billing/sync-stripe-subscription`).
> - `RelativeTime` adds `"5m"`; `FunctionSummary` includes `language`;
default limit for summaries raised to `400`.
> - **Runtime/Tracing (baml-runtime)**:
> - Introduce `TracingCallGuard` to always emit
`TraceEvent::new_function_end` and call `finish_baml_call`, including on
errors/cancellation.
> - Refactor `call_function_with_expr_events` to use guard; cancellation
emits `BamlError::External("Operation cancelled")`.
> - Normalize external error message to `ExternalException: …`.
> - Pass through `BOUNDARY_API_KEY`/`BOUNDARY_API_URL` to clients for
telemetry.
> - **Python client**:
> - Trace decorators now catch `BaseException` (e.g.,
`KeyboardInterrupt`, `CancelledError`).
> - Add `abort_all_active_operations()` and invoke on `flush()`; brief
delay to allow event emission.
> - **Docs**:
> - Observability guide: add section on tracing with
`ThreadPoolExecutor` and tag note tweak.
> - **Tests/CI**:
> - New comprehensive `test_tracing.py`; augment existing tests for call
stack/tag verification; update `.gitignore` for
`trace-events-debug.jsonl`; exclude tracing test in CI script.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7eb8672. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: hellovai <[email protected]>
0 commit comments