Skip to content

feat(server): refactor server ingestion to sink#165

Open
namrataghadi-galileo wants to merge 1 commit intofeature/61573-add-telemetry-sinkfrom
feature/61574-refactor-server-ingestion-to-sink
Open

feat(server): refactor server ingestion to sink#165
namrataghadi-galileo wants to merge 1 commit intofeature/61573-add-telemetry-sinkfrom
feature/61574-refactor-server-ingestion-to-sink

Conversation

@namrataghadi-galileo
Copy link
Copy Markdown
Contributor

Summary

Refactored the server observability write path to use the shared ControlEventSink abstraction while preserving the existing /api/v1/observability/events behavior and Postgres-backed OSS storage.

Added a default OSS server sink that adapts the existing EventStore write path into the shared sink contract.

Kept the current DirectEventIngestor usage stable by allowing existing store-based construction to continue working, while routing writes through sink semantics internally.

Scope

User-facing / API changes

  • No intended user-facing or HTTP API changes.
  • /api/v1/observability/events request/response behavior remains unchanged.
  • IngestResult and API response accounting semantics are preserved.

Internal changes

  • Updated the shared sink contract to support both sync and async sink writes.
  • Added a server-side default sink backed by the existing EventStore/Postgres path.
  • Refactored DirectEventIngestor to write through ControlEventSink internally.
  • Preserved existing server wiring by wrapping EventStore inputs into the default sink internally.
  • Added test coverage proving the ingestor can accept a sink directly.

Out of scope

  • Config-driven sink selection.
  • Alternate server sinks such as ClickHouse, OTEL, Kafka, or vendor-specific sinks.
  • Changes to server query/stats read-path behavior.
  • Changes to SDK behavior beyond the minimal shared sink contract compatibility needed for server support.

Risk and Rollout

Risk level: Medium

Rollback plan:

  1. Revert the shared sink contract async compatibility change.
  2. Remove the new server sink adapter.
  3. Restore DirectEventIngestor to writing directly to EventStore.store(...).
  4. Keep the server endpoint and startup wiring unchanged.

Testing

  • Added or updated automated tests
  • Ran make check (or explained why not)

Validation has not been run by me in this branch flow; recommended focused server tests should be run locally/CI.

  • Manually verified behavior

Checklist

  • Linked issue/spec (if applicable)
  • Updated docs/examples for user-facing changes

No docs/examples updates were needed because this story is internal-only and preserves existing API behavior.

  • Included any required follow-up tasks

@namrataghadi-galileo namrataghadi-galileo changed the base branch from main to feature/61573-add-telemetry-sink April 5, 2026 23:49
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

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

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant