feat: Python telemetry client SDK v0.1.0
Standalone Python package (mosaicstack-telemetry) for reporting task-completion telemetry and querying predictions from the Mosaic Stack Telemetry server. - Sync/async TelemetryClient with context manager support - Thread-safe EventQueue with bounded deque - BatchSubmitter with httpx, exponential backoff, Retry-After - PredictionCache with TTL - EventBuilder convenience class - All types standalone (no server dependency) - 55 tests, 90% coverage, mypy strict clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,12 +100,7 @@ class TestEventBuilder:
|
||||
def test_custom_timestamp(self) -> None:
|
||||
"""Custom timestamp can be set."""
|
||||
ts = datetime(2026, 1, 15, 12, 0, 0, tzinfo=timezone.utc)
|
||||
event = (
|
||||
EventBuilder(instance_id=TEST_INSTANCE_ID)
|
||||
.timestamp(ts)
|
||||
.model("test-model")
|
||||
.build()
|
||||
)
|
||||
event = EventBuilder(instance_id=TEST_INSTANCE_ID).timestamp(ts).model("test-model").build()
|
||||
|
||||
assert event.timestamp == ts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user