Skip to content

feat: separate diagnostic and system events into history_diagnostic_events table#17

Open
chowbao wants to merge 1 commit intomasterfrom
claude/issue-16-20260223-2117
Open

feat: separate diagnostic and system events into history_diagnostic_events table#17
chowbao wants to merge 1 commit intomasterfrom
claude/issue-16-20260223-2117

Conversation

@chowbao
Copy link
Copy Markdown
Owner

@chowbao chowbao commented Feb 23, 2026

Closes #16

Summary

To improve performance of history_contract_events, this PR separates diagnostic and system events into a new history_diagnostic_events table.

Changes

  • Added eventTypes []xdr.ContractEventType filter parameter to TransformContractEvent
  • export_contract_events now only emits ContractEventTypeContract events
  • New export_diagnostic_events command emits ContractEventTypeDiagnostic + ContractEventTypeSystem events
  • Both commands share the same ContractEventOutput schema and parquet writer

Note

Integration test golden files need regeneration after merging (requires Docker + GCP credentials).

Generated with Claude Code

…c_events command

- Add eventTypes []xdr.ContractEventType filter parameter to TransformContractEvent
- history_contract_events (export_contract_events) now only emits ContractEventTypeContract events
- New export_diagnostic_events command emits ContractEventTypeDiagnostic and ContractEventTypeSystem events
- Both commands share the same ContractEventOutput schema and transform logic
- Add empty golden file placeholder for diagnostic_events integration test

Note: integration test golden files need regeneration:
  - testdata/contract_events/ golden file needs diagnostic events removed
  - testdata/diagnostic_events/ golden file needs to be generated
Run with: go test -v -run ^TestExportContractEvents$ ./cmd -args -update=true
         go test -v -run ^TestExportDiagnosticEvents$ ./cmd -args -update=true

Closes #16

Co-authored-by: chowbao <chowbao@users.noreply.github.com>
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.

Separate out diagnostic events from history_contract_events

1 participant