[go: up one dir, main page]

Skip to content

Implement runtime schema validation for instrumentation events to catch errors earlier

Problem

https://gitlab.com/gitlab-data/analytics/-/work_items/24408#note_2645712717

Currently, instrumentation errors are only caught after events are sent to Snowplow, leading to:

  • Late detection of validation issues
  • Accumulation of bad events in the pipeline
  • Difficulty attributing errors to the engineering teams that implemented the instrumentation

Proposed Solution

Implement schema validation within the Ruby runtime using existing Iglu/event definition files to validate events before they're sent to Snowplow.

Benefits

  • Earlier validation: Catch issues at the source rather than downstream
  • Integrated testing: Make instrumentation validation part of regular development workflow
  • Prevent bad events: Stop invalid events from entering the pipeline
  • Better attribution: Errors surface during development/testing for the implementing team

Technical Approach

Leverage the existing monitor script that currently detects whether Snowplow events fire, and extend it to include schema validation that throws errors when validation fails.

Acceptance Criteria

  • Schema validation integrated into Ruby runtime
  • Validation errors thrown immediately when events fail schema checks
  • Existing monitor script enhanced with validation capabilities
  • Documentation updated with new validation workflow
  • Tests added to verify validation behavior
Edited by 🤖 GitLab Bot 🤖