Skip to content

Conversation

@sitole
Copy link
Member

@sitole sitole commented Oct 22, 2025

Insert and query the UUID for each sandbox event. Clickhouse migration to add fields to all existing events.


Note

Add a UUID id to sandbox events and propagate it through schema, models, queries, insert batching, and event emission; remove unused product usage insert batcher.

  • ClickHouse schema:
    • Add id UUID DEFAULT generateUUIDv4() to sandbox_events_local and sandbox_events (with down migration to drop it).
  • Data models & queries:
    • Add id to clickhouse.SandboxEvent and shared/events.SandboxEvent.
    • Include id in SELECT queries in packages/clickhouse/pkg/sandbox_events.go.
  • Ingestion/batching:
    • Update InsertSandboxEventQuery to write id; append event.ID in batcher.
  • Event production:
    • Generate uuid.New() for each emitted sandbox event in server handlers and pass through SandboxEventsService to ClickHouse.
  • Cleanup:
    • Remove product_usage_insert_batcher implementation.

Written by Cursor Bugbot for commit 82f3a80. This will update automatically on new commits. Configure here.

Database table for product usage stays as its still used from some
internal tools. Will be removed later.
@sitole sitole marked this pull request as ready for review October 22, 2025 09:20
@sitole sitole merged commit f8d5a64 into main Oct 22, 2025
27 checks passed
@sitole sitole deleted the chore/clickhouse-events-with-id branch October 22, 2025 21:27
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.

2 participants