Skip to content

Emit cutover metrics#45

Open
grodowski wants to merge 1 commit into
pb/consolidate_metrics_emittersfrom
grodowski/issue-5457-cutover-metrics
Open

Emit cutover metrics#45
grodowski wants to merge 1 commit into
pb/consolidate_metrics_emittersfrom
grodowski/issue-5457-cutover-metrics

Conversation

@grodowski
Copy link
Copy Markdown
Member

@grodowski grodowski commented Jun 2, 2026

Closes https://github.com/Shopify/schema-migrations/issues/5457

Add cutover metric helpers and instrument cutover attempts, phase
durations, and terminal duration.

Metrics emitted:

  • cut_over.attempts_total tagged with outcome
  • cut_over.phase_duration_milliseconds tagged with phase and outcome
  • cut_over.total_duration_milliseconds tagged with outcome

Phase coverage includes the magic lock, original table lock, magic rename,
and unlock paths. Durations are reported in milliseconds to preserve
sub-second granularity.

Add unit coverage for the cutover metric helper.

🎩

Cherry-picked this commit plus a few others onto a separate branch, ran a dev tophat run to add name to fake_data:
Screenshot 2026-06-02 at 9 58 34 PM

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@grodowski grodowski added the #gsd:50633 Data Storage: gh-ost Observability Instrumentation label Jun 2, 2026
@grodowski grodowski changed the base branch from grodowski/metrics-client-histogram to pb/refactor_metrics_emitter June 2, 2026 09:51
@grodowski grodowski force-pushed the grodowski/issue-5457-cutover-metrics branch from 116813d to e91b206 Compare June 2, 2026 13:02
@grodowski grodowski changed the base branch from pb/refactor_metrics_emitter to pb/consolidate_metrics_emitters June 2, 2026 13:02
   Add cutover metric helpers and instrument cutover attempts, phase
   durations, and terminal duration.

   Metrics emitted:
   - cut_over.attempts_total tagged with outcome
   - cut_over.phase_duration_milliseconds tagged with phase and outcome
   - cut_over.total_duration_milliseconds tagged with outcome

   Phase coverage includes the magic lock, original table lock, magic rename,
   and unlock paths. Durations are reported in milliseconds to preserve
   sub-second granularity.

   Add unit coverage for the cutover metric helper.
@grodowski grodowski force-pushed the grodowski/issue-5457-cutover-metrics branch from e91b206 to 73aab6f Compare June 2, 2026 13:18
@grodowski grodowski marked this pull request as ready for review June 2, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50633 Data Storage: gh-ost Observability Instrumentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant