Skip to content

Emit cutover metrics#45

Open
grodowski wants to merge 6 commits into
pb/consolidate_metrics_emittersfrom
grodowski/issue-5457-cutover-metrics
Open

Emit cutover metrics#45
grodowski wants to merge 6 commits 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.

forge33 added 5 commits June 1, 2026 13:29
Use a single metrics emitter abstraction for gauge, count, and histogram samples so metric helpers share one testable client contract.
Keep the small metric emission helpers, runtime reporter, and their tests together so the metrics package has fewer one-function files.
@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
@forge33 forge33 mentioned this pull request Jun 3, 2026
2 tasks
@forge33 forge33 force-pushed the pb/consolidate_metrics_emitters branch 2 times, most recently from bd9bdb1 to c4e2b06 Compare June 3, 2026 14:41
@forge33 forge33 mentioned this pull request Jun 3, 2026
2 tasks
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 to-upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants