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
{{ message }}
Repository navigation
Commit 2186ba1
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sdk): Add telemetry package to support sinks (#164)
## Summary
Added a new shared top-level `telemetry/` package to hold common
telemetry contracts and trace-context primitives used across
AgentControl.
Refactored the SDK observability write path to use the shared
`ControlEventSink` contract internally while preserving the existing
default OSS behavior: queue-backed batching and delivery to
`/api/v1/observability/events`.
Aligned telemetry packaging with the existing models/engine bundling
pattern so telemetry is vendored into SDK and server builds rather than
treated as a separate runtime-only dependency.
## Scope
### User-facing / API changes
- No intended user-facing behavior changes.
- No change to default OSS event delivery behavior.
- No new public sink-selection API in this story.
### Internal changes
- Introduced shared telemetry types: `ControlEventSink`, `SinkResult`,
`BaseControlEventSink`, and shared trace-context helpers.
- Removed SDK-local ownership of trace-context internals and pointed SDK
code/tests to the shared telemetry package.
- Updated SDK observability internals so event writes flow through the
shared sink contract.
- Updated build/package wiring so telemetry is bundled like models and
engine.
### Out of scope
- Server write-path refactor to the shared sink contract.
- Config-driven sink selection.
- OTEL sink implementation and OTEL settings.
- Any changes to `/observability/events` server ingestion behavior.
## Risk and Rollout
**Risk level:** Medium
**Rollback plan:**
1. Revert the telemetry package introduction and SDK observability
refactor.
2. Restore the previous SDK-local telemetry module and direct
batcher-based event writes.
3. Remove telemetry vendoring from SDK/server build configuration.
## Testing
- [x] Added or updated automated tests
- [x] Ran `make check` (or explained why not)
> Focused validation is still pending locally; mypy surfaced follow-up
packaging/type issues during development and we have been resolving
those incrementally.
- [ ] Manually verified behavior
## Checklist
- [ ] Linked issue/spec (if applicable)
- [x] Updated docs/examples for user-facing changes
> No docs/example updates were needed because this story is
internal-only and no repo examples referenced the old telemetry module
path.
- [ ] Included any required follow-up tasks
0 commit comments